diff --git a/cspell.json b/cspell.json index 04ec80f1f602..5fa26241300a 100644 --- a/cspell.json +++ b/cspell.json @@ -26,7 +26,10 @@ "arbitrum", "areth", "artblocks", + "arthswap", "arweave", + "astar", + "astarexchange", "attrace", "avalanche", "avax", @@ -326,6 +329,7 @@ "numberish", "nyfi", "okex", + "onfinality", "openocean", "pausable", "pkts", @@ -360,7 +364,10 @@ "vitalik", "walletlink", "wnative", - "xsushi" + "xsushi", + "xyumi", + "yumi", + "yumiswap" ], "ignoreRegExpList": ["/@servie/", "/[A-Za-z0-9]{46}/"], "overrides": [ diff --git a/packages/dashboard/stories/components/Wallet/CreateWalletForm.tsx b/packages/dashboard/stories/components/Wallet/CreateWalletForm.tsx index 650fdd4ae53b..13ab807afb78 100644 --- a/packages/dashboard/stories/components/Wallet/CreateWalletForm.tsx +++ b/packages/dashboard/stories/components/Wallet/CreateWalletForm.tsx @@ -1,6 +1,6 @@ import { story } from '@masknet/storybook-shared' import { CreateWalletForm as C } from '../../../src/components/CreateWalletForm' -import { ETH } from '@masknet/icons' +import { Icons } from '@masknet/icons' const { meta, of } = story(C) @@ -10,6 +10,6 @@ export default meta({ export const CreateWalletForm = of({ args: { - options: [{ label: 'ETH', value: 1, icon: }], + options: [{ label: 'ETH', value: 1, icon: }], }, }) diff --git a/packages/mask/background/services/helper/r2d2Fetch.ts b/packages/mask/background/services/helper/r2d2Fetch.ts index 756ea7060119..0a0bc656f7c7 100644 --- a/packages/mask/background/services/helper/r2d2Fetch.ts +++ b/packages/mask/background/services/helper/r2d2Fetch.ts @@ -84,6 +84,11 @@ export async function r2d2Fetch(input: RequestInfo, init?: RequestInit): Promise return proxiedFetch(url.replace(u.origin, `https://${r2deWorkerType}.${R2D2_ROOT_URL}`), info) } + // hack astar rpc fetch + if (url.includes('astar.api.onfinality.io')) { + return originalFetch(input, { ...init, headers: { ...init?.headers, 'Content-type': 'application/JSON' } }) + } + // fallback return originalFetch(input, init) } diff --git a/packages/mask/shared/flags.ts b/packages/mask/shared/flags.ts index e461eef90abf..f774449317fa 100644 --- a/packages/mask/shared/flags.ts +++ b/packages/mask/shared/flags.ts @@ -36,6 +36,7 @@ export const Flags = { fantom_enabled: true, celo_enabled: true, aurora_enabled: true, + astar_enabled: true, harmony_enabled: true, nft_airdrop_enabled: false, post_actions_enabled: true, diff --git a/packages/mask/src/extension/popups/pages/Wallet/GasSetting/Prior1559GasSetting.tsx b/packages/mask/src/extension/popups/pages/Wallet/GasSetting/Prior1559GasSetting.tsx index 58825bce73a1..9aa542de4c19 100644 --- a/packages/mask/src/extension/popups/pages/Wallet/GasSetting/Prior1559GasSetting.tsx +++ b/packages/mask/src/extension/popups/pages/Wallet/GasSetting/Prior1559GasSetting.tsx @@ -93,6 +93,7 @@ const minGasPriceOfChain: ChainIdOptionalRecord = { [ChainId.BSC]: pow10(9).multipliedBy(5), // 5 Gwei [ChainId.Conflux]: pow10(9).multipliedBy(5), // 5 Gwei [ChainId.Matic]: pow10(9).multipliedBy(30), // 30 Gwei + [ChainId.Astar]: pow10(9).multipliedBy(5), // 5 Gwei } export const Prior1559GasSetting = memo(() => { diff --git a/packages/mask/src/plugins/Approval/SNSAdaptor/pipes.ts b/packages/mask/src/plugins/Approval/SNSAdaptor/pipes.ts index a109aad46905..f6f3f0a76d5c 100644 --- a/packages/mask/src/plugins/Approval/SNSAdaptor/pipes.ts +++ b/packages/mask/src/plugins/Approval/SNSAdaptor/pipes.ts @@ -18,6 +18,7 @@ export const resolveNetworkOnRabby = createLookupTableResolver = { ChainId.Aurora, ChainId.Avalanche, ChainId.Fantom, + ChainId.Astar, ChainId.Optimism, ChainId.Harmony, ], diff --git a/packages/mask/src/plugins/Trader/constants/0x.ts b/packages/mask/src/plugins/Trader/constants/0x.ts index e8bb3312e04f..0cf63218cf27 100644 --- a/packages/mask/src/plugins/Trader/constants/0x.ts +++ b/packages/mask/src/plugins/Trader/constants/0x.ts @@ -16,6 +16,7 @@ export const ZRX_BASE_URL: Record = { [NetworkType.Metis]: '', [NetworkType.Harmony]: '', [NetworkType.Conflux]: '', + [NetworkType.Astar]: '', } export const ZRX_AFFILIATE_ADDRESS = '0x934B510D4C9103E6a87AEf13b816fb080286D649' diff --git a/packages/mask/src/plugins/Trader/constants/arthswap.ts b/packages/mask/src/plugins/Trader/constants/arthswap.ts new file mode 100644 index 000000000000..248bcc59da7e --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/arthswap.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WNATIVE, WNATIVE_ONLY } from '@masknet/web3-shared-evm' +import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types' + +/** + * Some tokens can only be swapped via certain pairs, + * so we override the list of bases that are considered for these tokens. + */ +export const ARTHSWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const ARTHSWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Astar]: [WNATIVE, USDC, USDT].map((x) => x[ChainId.Astar]), +} diff --git a/packages/mask/src/plugins/Trader/constants/astarexchange.ts b/packages/mask/src/plugins/Trader/constants/astarexchange.ts new file mode 100644 index 000000000000..aca2f119b0b6 --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/astarexchange.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WNATIVE, WNATIVE_ONLY } from '@masknet/web3-shared-evm' +import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types' + +/** + * Some tokens can only be swapped via certain pairs, + * so we override the list of bases that are considered for these tokens. + */ +export const ASTAREXCHANGE_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const ASTAREXCHANGE_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Astar]: [WNATIVE, USDC, USDT].map((x) => x[ChainId.Astar]), +} diff --git a/packages/mask/src/plugins/Trader/constants/dodo.ts b/packages/mask/src/plugins/Trader/constants/dodo.ts index a01e52cb9cee..7e56a1525f19 100644 --- a/packages/mask/src/plugins/Trader/constants/dodo.ts +++ b/packages/mask/src/plugins/Trader/constants/dodo.ts @@ -19,4 +19,5 @@ export const networkNames: Record = { [NetworkType.Optimism]: '', [NetworkType.Harmony]: 'harmony', [NetworkType.Conflux]: '', + [NetworkType.Astar]: '', } diff --git a/packages/mask/src/plugins/Trader/constants/index.ts b/packages/mask/src/plugins/Trader/constants/index.ts index 07cf8b525b40..9b72195ed959 100644 --- a/packages/mask/src/plugins/Trader/constants/index.ts +++ b/packages/mask/src/plugins/Trader/constants/index.ts @@ -15,5 +15,9 @@ export * from './trisolaris' export * from './venomswap' export * from './openswap' export * from './mdex' +export * from './arthswap' +export * from './versa' +export * from './astarexchange' export * from './defikingdoms' +export * from './yumiswap' export type { ERC20TokenCustomizedBase, ERC20AgainstToken } from './types' diff --git a/packages/mask/src/plugins/Trader/constants/openocean.ts b/packages/mask/src/plugins/Trader/constants/openocean.ts index 020fdd6ba702..dd69d9ecc8cf 100644 --- a/packages/mask/src/plugins/Trader/constants/openocean.ts +++ b/packages/mask/src/plugins/Trader/constants/openocean.ts @@ -19,4 +19,5 @@ export const networkNames: Record = { [NetworkType.Optimism]: '', [NetworkType.Harmony]: '', [NetworkType.Conflux]: '', + [NetworkType.Astar]: '', } diff --git a/packages/mask/src/plugins/Trader/constants/versa.ts b/packages/mask/src/plugins/Trader/constants/versa.ts new file mode 100644 index 000000000000..6814d95a07c6 --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/versa.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, VERSA, BUSD, WNATIVE, WNATIVE_ONLY } from '@masknet/web3-shared-evm' +import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types' + +/** + * Some tokens can only be swapped via certain pairs, + * so we override the list of bases that are considered for these tokens. + */ +export const VERSA_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const VERSA_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Astar]: [WNATIVE, USDC, USDT, BUSD, VERSA].map((x) => x[ChainId.Astar]), +} diff --git a/packages/mask/src/plugins/Trader/constants/yumiswap.ts b/packages/mask/src/plugins/Trader/constants/yumiswap.ts new file mode 100644 index 000000000000..c7161ca1b75d --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/yumiswap.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WNATIVE, YUMI, DAI, xYUMI, WNATIVE_ONLY } from '@masknet/web3-shared-evm' +import type { ERC20AgainstToken, ERC20TokenCustomizedBase } from './types' + +/** + * Some tokens can only be swapped via certain pairs, + * so we override the list of bases that are considered for these tokens. + */ +export const YUMISWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const YUMISWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Astar]: [WNATIVE, USDC, USDT, YUMI, DAI, xYUMI].map((x) => x[ChainId.Astar]), +} diff --git a/packages/mask/src/plugins/Trader/pipes.ts b/packages/mask/src/plugins/Trader/pipes.ts index 0d0289fb7d19..f25da6fef57c 100644 --- a/packages/mask/src/plugins/Trader/pipes.ts +++ b/packages/mask/src/plugins/Trader/pipes.ts @@ -44,7 +44,11 @@ export const resolveTradeProviderName = createLookupTableResolver { throw new Error(`Unknown provider type: ${tradeProvider}`) diff --git a/packages/mask/src/plugins/Trader/trader/0x/useTrade.ts b/packages/mask/src/plugins/Trader/trader/0x/useTrade.ts index ac3c8e13e9a6..d832bb536e06 100644 --- a/packages/mask/src/plugins/Trader/trader/0x/useTrade.ts +++ b/packages/mask/src/plugins/Trader/trader/0x/useTrade.ts @@ -29,6 +29,7 @@ export function getNativeTokenLabel(networkType: NetworkType) { case NetworkType.Optimism: case NetworkType.Harmony: case NetworkType.Conflux: + case NetworkType.Astar: return NATIVE_TOKEN_ADDRESS default: safeUnreachable(networkType) diff --git a/packages/mask/src/plugins/Trader/trader/native/useTradeCallback.ts b/packages/mask/src/plugins/Trader/trader/native/useTradeCallback.ts index 42c4e80693c5..a8fa9eb2f6cc 100644 --- a/packages/mask/src/plugins/Trader/trader/native/useTradeCallback.ts +++ b/packages/mask/src/plugins/Trader/trader/native/useTradeCallback.ts @@ -1,11 +1,15 @@ import { useAsyncFn } from 'react-use' import { useNativeTokenWrapperCallback } from '@masknet/plugin-infra/web3-evm' -import { SchemaType, GasOptionConfig } from '@masknet/web3-shared-evm' +import { SchemaType, GasOptionConfig, ChainId } from '@masknet/web3-shared-evm' import { TradeComputed, TradeStrategy } from '../../types' import type { NativeTokenWrapper } from './useTradeComputed' -export function useTradeCallback(trade: TradeComputed | null, gasConfig?: GasOptionConfig) { - const [wrapCallback, unwrapCallback] = useNativeTokenWrapperCallback() +export function useTradeCallback( + trade: TradeComputed | null, + gasConfig?: GasOptionConfig, + targetChainId?: ChainId, +) { + const [wrapCallback, unwrapCallback] = useNativeTokenWrapperCallback(targetChainId) return useAsyncFn(async () => { if (!trade?.trade_?.isNativeTokenWrapper) return diff --git a/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts b/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts index 4edd0ec5315b..b7046d88b7a9 100644 --- a/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts +++ b/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts @@ -220,6 +220,34 @@ export function useAllTradeComputed( traderEstimateGas: mdexEstimateGas, } = useUniswapV2Like(tradeProviders, TradeProvider.MDEX, inputAmount_, inputToken, outputToken) + // Arthswap + const { + trader_: arthswap_, + trader: arthswap, + traderEstimateGas: arthswapEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.ARTHSWAP, inputAmount_, inputToken, outputToken) + + // Versa Finance + const { + trader_: versa_, + trader: versa, + traderEstimateGas: versaEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.VERSA, inputAmount_, inputToken, outputToken) + + // Astar Exchange + const { + trader_: astarexchange_, + trader: astarexchange, + traderEstimateGas: astarexchangeEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.ASTAREXCHANGE, inputAmount_, inputToken, outputToken) + + // Yumi Swap + const { + trader_: yumiswap_, + trader: yumiswap, + traderEstimateGas: yumiswapEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.YUMISWAP, inputAmount_, inputToken, outputToken) + const allTradeResult = [ { provider: TradeProvider.UNISWAP_V2, ...uniswapV2_, value: uniswapV2, gas: uniswapV2EstimateGas }, { provider: TradeProvider.SUSHISWAP, ...sushiSwap_, value: sushiSwap, gas: sushiSwapEstimateGas }, @@ -238,6 +266,20 @@ export function useAllTradeComputed( { provider: TradeProvider.VENOMSWAP, ...venomswap_, value: venomswap, gas: venomswapEstimateGas }, { provider: TradeProvider.OPENSWAP, ...openswap_, value: openswap, gas: openswapEstimateGas }, { provider: TradeProvider.MDEX, ...mdex_, value: mdex, gas: mdexEstimateGas }, + { provider: TradeProvider.ARTHSWAP, ...arthswap_, value: arthswap, gas: arthswapEstimateGas }, + { provider: TradeProvider.VERSA, ...versa_, value: versa, gas: versaEstimateGas }, + { + provider: TradeProvider.ASTAREXCHANGE, + ...astarexchange_, + value: astarexchange, + gas: astarexchangeEstimateGas, + }, + { + provider: TradeProvider.YUMISWAP, + ...yumiswap_, + value: yumiswap, + gas: yumiswapEstimateGas, + }, ] return nativeToken_.value diff --git a/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts b/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts index 30f1a7dd6e98..3b233d792465 100644 --- a/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts +++ b/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts @@ -25,8 +25,16 @@ import { OPENSWAP_CUSTOM_BASES, MDEX_BASE_AGAINST_TOKENS, MDEX_CUSTOM_BASES, + ARTHSWAP_BASE_AGAINST_TOKENS, + ARTHSWAP_CUSTOM_BASES, + VERSA_BASE_AGAINST_TOKENS, + VERSA_CUSTOM_BASES, + ASTAREXCHANGE_BASE_AGAINST_TOKENS, + ASTAREXCHANGE_CUSTOM_BASES, DEFIKINGDOMS_BASE_AGAINST_TOKENS, DEFIKINGDOMS_CUSTOM_BASES, + YUMISWAP_BASE_AGAINST_TOKENS, + YUMISWAP_CUSTOM_BASES, } from '../constants' import { unreachable } from '@dimensiondev/kit' import { TargetChainIdContext } from '@masknet/plugin-infra/web3-evm' @@ -166,6 +174,58 @@ export function useGetTradeContext(tradeProvider?: TradeProvider) { ADDITIONAL_TOKENS: {}, CUSTOM_TOKENS: MDEX_CUSTOM_BASES, } + case TradeProvider.ARTHSWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.ARTHSWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.ARTHSWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.ARTHSWAP_ROUTER_ADDRESS, + SPENDER_CONTRACT_ADDRESS: DEX_TRADE.ARTHSWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.ARTHSWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: ARTHSWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: ARTHSWAP_CUSTOM_BASES, + } + case TradeProvider.VERSA: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.VERSA_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.VERSA_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.VERSA_ROUTER_ADDRESS, + SPENDER_CONTRACT_ADDRESS: DEX_TRADE.VERSA_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.VERSA_FACTORY_ADDRESS, + AGAINST_TOKENS: VERSA_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: VERSA_CUSTOM_BASES, + } + case TradeProvider.ASTAREXCHANGE: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.ASTAREXCHANGE_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.ASTAREXCHANGE_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.ASTAREXCHANGE_ROUTER_ADDRESS, + SPENDER_CONTRACT_ADDRESS: DEX_TRADE.ASTAREXCHANGE_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.ASTAREXCHANGE_FACTORY_ADDRESS, + AGAINST_TOKENS: ASTAREXCHANGE_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: ASTAREXCHANGE_CUSTOM_BASES, + } + case TradeProvider.YUMISWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.YUMISWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.YUMISWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.YUMISWAP_ROUTER_ADDRESS, + SPENDER_CONTRACT_ADDRESS: DEX_TRADE.YUMISWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.YUMISWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: YUMISWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: YUMISWAP_CUSTOM_BASES, + } case TradeProvider.VENOMSWAP: return { TYPE: tradeProvider, diff --git a/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts b/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts index 677cace10a95..83069b1c47b5 100644 --- a/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts +++ b/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts @@ -81,6 +81,7 @@ export function useTradeCallback( const nativeTokenWrapper = useNativeTokenWrapperCallback( tradeComputed as TradeComputed, gasConfig, + targetChainId, ) if (isNativeTokenWrapper_) return nativeTokenWrapper @@ -106,6 +107,14 @@ export function useTradeCallback( return uniswapV2Like case TradeProvider.MDEX: return uniswapV2Like + case TradeProvider.ARTHSWAP: + return uniswapV2Like + case TradeProvider.VERSA: + return uniswapV2Like + case TradeProvider.ASTAREXCHANGE: + return uniswapV2Like + case TradeProvider.YUMISWAP: + return uniswapV2Like case TradeProvider.DEFIKINGDOMS: return uniswapV2Like case TradeProvider.ZRX: diff --git a/packages/mask/src/plugins/Trader/types/trader.ts b/packages/mask/src/plugins/Trader/types/trader.ts index a1e1f9f24a74..107e55a9c915 100644 --- a/packages/mask/src/plugins/Trader/types/trader.ts +++ b/packages/mask/src/plugins/Trader/types/trader.ts @@ -72,9 +72,13 @@ export enum ZrxTradePool { Trisolaris = 'Trisolaris', WannaSwap = 'WannaSwap', Mdex = 'Mdex', + Arthswap = 'ArthSwap', + Versa = 'Versa', VenomSwap = 'VenomSwap', OpenSwap = 'OpenSwap', DefiKingdoms = 'DefiKingdoms', + YumiSwap = 'YumiSwap', + AstarExchange = 'AstarExchange', } export interface TradeComputed { diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/GasSetting1559.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/GasSetting1559.tsx index 9cc5b994de43..abd0e3a24452 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/GasSetting1559.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/GasSetting1559.tsx @@ -3,7 +3,7 @@ import { zodResolver } from '@hookform/resolvers/zod' import { FC, memo, useCallback, useEffect, useMemo, useState } from 'react' import { useUpdateEffect } from 'react-use' import { Controller, useForm } from 'react-hook-form' -import { formatGweiToEther, formatGweiToWei, useTokenConstants } from '@masknet/web3-shared-evm' +import { formatGweiToEther, formatGweiToWei, formatWeiToEther, useTokenConstants } from '@masknet/web3-shared-evm' import { Typography } from '@mui/material' import { LoadingButton } from '@mui/lab' import BigNumber from 'bignumber.js' @@ -23,7 +23,7 @@ import { NetworkPluginID, toFixed, } from '@masknet/web3-shared-base' -import { useChainId, useFungibleTokenBalance, useGasOptions } from '@masknet/plugin-infra/web3' +import { useChainId, useFungibleTokenPrice, useGasOptions } from '@masknet/plugin-infra/web3' const HIGH_FEE_WARNING_MULTIPLIER = 1.5 @@ -35,7 +35,7 @@ export const GasSetting1559: FC = memo( const { NATIVE_TOKEN_ADDRESS } = useTokenConstants(chainId) const [selectedGasOption, setGasOptionType] = useState(gasOptionType) - const { value: nativeTokenPrice = 0 } = useFungibleTokenBalance( + const { value: nativeTokenPrice = 0 } = useFungibleTokenPrice( NetworkPluginID.PLUGIN_EVM, NATIVE_TOKEN_ADDRESS, { @@ -209,7 +209,7 @@ export const GasSetting1559: FC = memo( usd: formatGweiToEther(content?.suggestedMaxFeePerGas ?? 0) .times(nativeTokenPrice) .times(21000) - .toPrecision(3), + .toFixed(2), })} @@ -245,10 +245,10 @@ export const GasSetting1559: FC = memo( {t('popups_wallet_gas_fee_settings_usd', { - usd: formatGweiToEther(Number(maxPriorityFeePerGas) ?? 0) + usd: formatWeiToEther(Number(maxPriorityFeePerGas) ?? 0) .times(nativeTokenPrice) .times(inputGasLimit || 1) - .toPrecision(3), + .toFixed(2), })} @@ -280,10 +280,10 @@ export const GasSetting1559: FC = memo( {t('popups_wallet_gas_fee_settings_usd', { - usd: formatGweiToEther(Number(maxFeePerGas) ?? 0) + usd: formatWeiToEther(Number(maxFeePerGas) ?? 0) .times(nativeTokenPrice) .times(inputGasLimit || 1) - .toPrecision(3), + .toFixed(2), })} diff --git a/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/Prior1559GasSetting.tsx b/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/Prior1559GasSetting.tsx index cf06f8e401e5..61562d0526a2 100644 --- a/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/Prior1559GasSetting.tsx +++ b/packages/mask/src/plugins/Wallet/SNSAdaptor/GasSettingDialog/Prior1559GasSetting.tsx @@ -20,6 +20,7 @@ const minGasPriceOfChain: ChainIdOptionalRecord = { [ChainId.BSC]: pow10(9).multipliedBy(5), // 5 Gwei [ChainId.Conflux]: pow10(9).multipliedBy(5), // 5 Gwei [ChainId.Matic]: pow10(9).multipliedBy(30), // 30 Gwei + [ChainId.Astar]: pow10(9).multipliedBy(5), // 5 Gwei } export const Prior1559GasSetting: FC = memo( diff --git a/packages/mask/src/plugins/Wallet/services/account.ts b/packages/mask/src/plugins/Wallet/services/account.ts index f04947b979a2..4817a133cb88 100644 --- a/packages/mask/src/plugins/Wallet/services/account.ts +++ b/packages/mask/src/plugins/Wallet/services/account.ts @@ -83,6 +83,7 @@ export async function getSupportedNetworks() { Flags.fantom_enabled ? NetworkType.Fantom : undefined, Flags.avalanche_enabled ? NetworkType.Avalanche : undefined, Flags.aurora_enabled ? NetworkType.Aurora : undefined, + Flags.astar_enabled ? NetworkType.Astar : undefined, Flags.harmony_enabled ? NetworkType.Harmony : undefined, ].filter(Boolean) as NetworkType[] } diff --git a/packages/mask/src/plugins/Wallet/services/send.ts b/packages/mask/src/plugins/Wallet/services/send.ts index a9d432cd0d0f..de4ca4c8c997 100644 --- a/packages/mask/src/plugins/Wallet/services/send.ts +++ b/packages/mask/src/plugins/Wallet/services/send.ts @@ -1,7 +1,7 @@ import Web3 from 'web3' import type { HttpProvider } from 'web3-core' import type { JsonRpcPayload, JsonRpcResponse } from 'web3-core-helpers' -import { isNil } from 'lodash-unified' +import { isNil, omit } from 'lodash-unified' import { defer } from '@dimensiondev/kit' import { ChainId, @@ -202,6 +202,22 @@ export async function sendPayload(payload: JsonRpcPayload, options?: Options) { if (options?.popupsWindow) openPopupWindow() return } + + if (options?.chainId === ChainId.Astar) { + await send( + { + ...payload, + params: payload.params?.map((x) => { + if (x?.chainId) return omit(x, 'chainId') + return x + }), + }, + callback, + options, + ) + + return + } send(payload, callback, options) }) } diff --git a/packages/mask/src/utils/components/WalletStatusBar/WalletDescription.tsx b/packages/mask/src/utils/components/WalletStatusBar/WalletDescription.tsx index d2030638b332..b7020928f29b 100644 --- a/packages/mask/src/utils/components/WalletStatusBar/WalletDescription.tsx +++ b/packages/mask/src/utils/components/WalletStatusBar/WalletDescription.tsx @@ -50,6 +50,7 @@ const useStyles = makeStyles()((theme) => ({ linkIcon: { color: theme.palette.maskColor.second, cursor: 'pointer', + height: 14, }, })) diff --git a/packages/plugins/EVM/src/state/Connection/connection.ts b/packages/plugins/EVM/src/state/Connection/connection.ts index e902a6548cad..77364372663f 100644 --- a/packages/plugins/EVM/src/state/Connection/connection.ts +++ b/packages/plugins/EVM/src/state/Connection/connection.ts @@ -591,7 +591,7 @@ class Connection implements EVM_Connection { const balances = await contract?.methods.balances([options.account], listOfNonNativeAddress).call({ // cannot check the sender's balance in the same contract from: undefined, - chainId: numberToHex(options.account), + chainId: numberToHex(options.chainId), }) listOfNonNativeAddress.forEach((x, i) => { diff --git a/packages/plugins/EVM/src/state/Hub/hub.ts b/packages/plugins/EVM/src/state/Hub/hub.ts index 41ab4391885c..26cad080c52f 100644 --- a/packages/plugins/EVM/src/state/Hub/hub.ts +++ b/packages/plugins/EVM/src/state/Hub/hub.ts @@ -5,6 +5,7 @@ import { DeBank, EthereumWeb3, MetaSwap, + AstarGas, NFTScan, OpenSea, Rarible, @@ -91,7 +92,8 @@ class Hub implements EVM_Hub { }) try { const isEIP1559 = chainResolver.isSupport(options.chainId, 'EIP1559') - if (isEIP1559) return await MetaSwap.getGasOptions(options.chainId) + if (isEIP1559 && chainId !== ChainId.Astar) return await MetaSwap.getGasOptions(options.chainId) + if (chainId === ChainId.Astar) return await AstarGas.getGasOptions(options.chainId) return await DeBank.getGasOptions(options.chainId) } catch (error) { return EthereumWeb3.getGasOptions(options.chainId) diff --git a/packages/public-api/src/web.ts b/packages/public-api/src/web.ts index 973465f3d0a3..1fb8c3f84298 100644 --- a/packages/public-api/src/web.ts +++ b/packages/public-api/src/web.ts @@ -197,6 +197,10 @@ export enum TradeProvider { VENOMSWAP = 16, OPENSWAP = 17, DEFIKINGDOMS = 18, + ARTHSWAP = 19, + VERSA = 20, + ASTAREXCHANGE = 21, + YUMISWAP = 22, } /** Supported language settings */ diff --git a/packages/web3-constants/compile-constants.ts b/packages/web3-constants/compile-constants.ts index 34993a35d2f4..8d376361f800 100644 --- a/packages/web3-constants/compile-constants.ts +++ b/packages/web3-constants/compile-constants.ts @@ -65,6 +65,7 @@ compileConstants(path.join(__dirname, 'evm'), [ 'Conflux', 'Harmony', 'Harmony_Test', + 'Astar', ]) compileConstants(path.join(__dirname, 'solana'), ['Mainnet', 'Testnet', 'Devnet']) diff --git a/packages/web3-constants/evm/aave.json b/packages/web3-constants/evm/aave.json index 0bf55e3c6776..0f5bb61c50de 100644 --- a/packages/web3-constants/evm/aave.json +++ b/packages/web3-constants/evm/aave.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "AAVE_LENDING_POOL_ADDRESSES_PROVIDER_CONTRACT_ADDRESS": { "Mainnet": "0xb53c1a33016b2dc2ff3653530bff1848a515c8c5", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "AAVE_PROTOCOL_DATA_PROVIDER_CONTRACT_ADDRESS": { "Mainnet": "0x057835Ad21a177dbdd3090bB1CAE03EaCF78Fc6d", @@ -75,6 +77,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/airdrop.json b/packages/web3-constants/evm/airdrop.json index ffa11a8b10b9..e5386f150278 100644 --- a/packages/web3-constants/evm/airdrop.json +++ b/packages/web3-constants/evm/airdrop.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/artblocks.json b/packages/web3-constants/evm/artblocks.json index 223eb773598b..00b6b94d9f51 100644 --- a/packages/web3-constants/evm/artblocks.json +++ b/packages/web3-constants/evm/artblocks.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/coingecko.json b/packages/web3-constants/evm/coingecko.json index 60978bbcfeec..30ee7aa89a28 100644 --- a/packages/web3-constants/evm/coingecko.json +++ b/packages/web3-constants/evm/coingecko.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "harmony", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "astar" }, "COIN_ID": { "Mainnet": "ethereum", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "conflux-token", "Harmony": "harmony", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "astar" } } diff --git a/packages/web3-constants/evm/coinmarketcap.json b/packages/web3-constants/evm/coinmarketcap.json index 128110d4e2ca..3d7adf421939 100644 --- a/packages/web3-constants/evm/coinmarketcap.json +++ b/packages/web3-constants/evm/coinmarketcap.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "7334", "Harmony": "3945", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "12885" } } diff --git a/packages/web3-constants/evm/cryptoartai.json b/packages/web3-constants/evm/cryptoartai.json index 75d55cd32818..04236eb0da47 100644 --- a/packages/web3-constants/evm/cryptoartai.json +++ b/packages/web3-constants/evm/cryptoartai.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ARTIST_ACCEPTING_BIDS_V2": { "Mainnet": "0x78C889749f29D2965a76Ede3BBb232A9729Ccf0b", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "CANFT_MARKET": { "Mainnet": "0x72d081953957723e540780a0C6bA31725469238E", @@ -75,6 +77,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/debank.json b/packages/web3-constants/evm/debank.json index 7580c816c580..8db3f255bfb6 100644 --- a/packages/web3-constants/evm/debank.json +++ b/packages/web3-constants/evm/debank.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "hmy", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "astar" } } diff --git a/packages/web3-constants/evm/dhedge.json b/packages/web3-constants/evm/dhedge.json index 3b32d4bfcd3d..b24e328e1838 100644 --- a/packages/web3-constants/evm/dhedge.json +++ b/packages/web3-constants/evm/dhedge.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "API_URL": { "Mainnet": "https://api-v2.dhedge.org/graphql", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/ethereum.json b/packages/web3-constants/evm/ethereum.json index d974e40a1b9c..62276c263dba 100644 --- a/packages/web3-constants/evm/ethereum.json +++ b/packages/web3-constants/evm/ethereum.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xc119574d5fb333f5ac018658d4d8b5035e16bf39", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51" }, "MULTICALL_ADDRESS": { "Mainnet": "0x1F98415757620B543A52E61c46B32eB19261F984", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "0x19f179d7e0d7d9f9d5386afff64271d98a91615b", "Harmony": "0x6cc1b1058f9153358278c35e0b2d382f1585854b", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x1410304B91a280ad083196B0B50e9d8df749d860" }, "ENS_REGISTRAR_ADDRESS": { "Mainnet": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", @@ -75,7 +77,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ENS_REVERSE_RECORDS_ADDRESS": { "Mainnet": "0x3671aE578E63FdF66ad4F3E12CC0c0d71Ac7510C", @@ -101,6 +104,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/explorer.json b/packages/web3-constants/evm/explorer.json index 3dd782754f6e..b6abf785ba13 100644 --- a/packages/web3-constants/evm/explorer.json +++ b/packages/web3-constants/evm/explorer.json @@ -23,7 +23,8 @@ "Aurora_Testnet": [], "Conflux": [], "Harmony": [], - "Harmony_Test": [] + "Harmony_Test": [], + "Astar": [] }, "EXPLORER_API": { "Mainnet": "https://api.etherscan.io/api", @@ -49,6 +50,7 @@ "Aurora_Testnet": "https://explorer.testnet.aurora.dev/api", "Conflux": "https://evmapi.confluxscan.net/api", "Harmony": "https://explorer.harmony.one", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "https://blockscout.com/astar/api" } } diff --git a/packages/web3-constants/evm/game.json b/packages/web3-constants/evm/game.json index e871f1cd6b3e..436b13a31116 100644 --- a/packages/web3-constants/evm/game.json +++ b/packages/web3-constants/evm/game.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/gitcoin.json b/packages/web3-constants/evm/gitcoin.json index 225bf27c7fe9..9d2167daa67f 100644 --- a/packages/web3-constants/evm/gitcoin.json +++ b/packages/web3-constants/evm/gitcoin.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BULK_CHECKOUT_ADDRESS": { "Mainnet": "0x7d655c57f71464B6f83811C55D84009Cd9f5221C", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GITCOIN_ETH_ADDRESS": { "Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", @@ -75,7 +77,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GITCOIN_TIP_PERCENTAGE": { "Mainnet": 5, @@ -101,6 +104,7 @@ "Aurora_Testnet": 0, "Conflux": 0, "Harmony": 0, - "Harmony_Test": 0 + "Harmony_Test": 0, + "Astar": 0 } } diff --git a/packages/web3-constants/evm/good-ghosting.json b/packages/web3-constants/evm/good-ghosting.json index 3ae13683d3e6..2d94cd18fe20 100644 --- a/packages/web3-constants/evm/good-ghosting.json +++ b/packages/web3-constants/evm/good-ghosting.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GOOD_GHOSTING_INCENTIVES_CONTRACT_ADDRESS": { "Mainnet": "", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/ito.json b/packages/web3-constants/evm/ito.json index 0208dbb59b0e..27d11d272bf2 100644 --- a/packages/web3-constants/evm/ito.json +++ b/packages/web3-constants/evm/ito.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MASK_ITO_CONTRACT_ADDRESS": { "Mainnet": "0x86812da3A623ab9606976078588b80C315E55FA3", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ITO2_CONTRACT_ADDRESS": { "Mainnet": "0xc2CFbF22d6Dc87D0eE18d38d73733524c109Ff46", @@ -75,7 +77,8 @@ "Aurora_Testnet": "0xdcA6F476EebCDE8FE8b072e3fC80dBC28dC209b3", "Conflux": "0x066804d9123bf2609ed4a4a40b1177a9c5a9ed51", "Harmony": "0x5b966f3a32db9c180843bcb40267a66b73e4f022", - "Harmony_Test": "0x578a7fee5f0d8cec7d00578bf37374c5b95c4b98" + "Harmony_Test": "0x578a7fee5f0d8cec7d00578bf37374c5b95c4b98", + "Astar": "0x1D720657e6B11F468BACE2d513b10C8CbfF247Cd" }, "ITO2_CONTRACT_CREATION_BLOCK_HEIGHT": { "Mainnet": 12766513, @@ -101,7 +104,8 @@ "Aurora_Testnet": 77919102, "Conflux": 37722805, "Harmony": 24133305, - "Harmony_Test": 22744597 + "Harmony_Test": 22744597, + "Astar": 915536 }, "DEFAULT_QUALIFICATION_ADDRESS": { "Mainnet": "0x81b6ae377e360dcad63611846a2516f4ba8c88ac", @@ -127,7 +131,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DEFAULT_QUALIFICATION2_ADDRESS": { "Mainnet": "0x4dC5f343Fe57E4fbDA1B454d125D396A3181272c", @@ -153,7 +158,8 @@ "Aurora_Testnet": "", "Conflux": "0x05ee315e407c21a594f807d61d6cc11306d1f149", "Harmony": "0x02Ea0720254F7fa4eca7d09A1b9C783F1020EbEF", - "Harmony_Test": "0x812463356F58fc8194645A1838ee6C52D8ca2D26" + "Harmony_Test": "0x812463356F58fc8194645A1838ee6C52D8ca2D26", + "Astar": "0xdd2Cf3fF67769d49613587CcE8A452D3b58AfC33" }, "SUBGRAPH_URL": { "Mainnet": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-mainnet", @@ -179,6 +185,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-harmony", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/lido.json b/packages/web3-constants/evm/lido.json index 17fc27cb4c3a..1e793008bd82 100644 --- a/packages/web3-constants/evm/lido.json +++ b/packages/web3-constants/evm/lido.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "LIDO_REFERRAL_ADDRESS": { "Mainnet": "0x934b510d4c9103e6a87aef13b816fb080286d649", @@ -49,6 +50,7 @@ "Aurora_Testnet": "0x934b510d4c9103e6a87aef13b816fb080286d649", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/mask-box.json b/packages/web3-constants/evm/mask-box.json index 5ee57e0038e7..a33db94318cd 100644 --- a/packages/web3-constants/evm/mask-box.json +++ b/packages/web3-constants/evm/mask-box.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "0xB4D669bc117735FdA44e90e52795132187705B21", "Conflux": "", "Harmony": "0xDc0905F2Dac875E29A36f22F1Ea046e063875D3e", - "Harmony_Test": "0x4Fda6d9Bb68Af18E5d686555b18cCeA7C82E0A3F" + "Harmony_Test": "0x4Fda6d9Bb68Af18E5d686555b18cCeA7C82E0A3F", + "Astar": "0x041Bdc5b713aFc3AA06b9511E1e55552138b139A" }, "MASK_BOX_CONTRACT_FROM_BLOCK": { "Mainnet": 13687866, @@ -49,6 +50,7 @@ "Aurora_Testnet": 77919118, "Conflux": 0, "Harmony": 24172689, - "Harmony_Test": 22787067 + "Harmony_Test": 22787067, + "Astar": 911315 } } diff --git a/packages/web3-constants/evm/nft-red-packet.json b/packages/web3-constants/evm/nft-red-packet.json index 8fea7f5a9378..b03f4715f708 100644 --- a/packages/web3-constants/evm/nft-red-packet.json +++ b/packages/web3-constants/evm/nft-red-packet.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "0x97369fEE7db34E0BfE47861f2ec44b4378d13eB4", "Conflux": "0x5b966f3a32db9c180843bcb40267a66b73e4f022", "Harmony": "0x83d6b366f21e413f214eb077d5378478e71a5ed2", - "Harmony_Test": "0x981be454a930479d92c91a0092d204b64845a5d6" + "Harmony_Test": "0x981be454a930479d92c91a0092d204b64845a5d6", + "Astar": "0xc3e62b2CC70439C32a381Bfc056aCEd1d7162cef" }, "SUBGRAPH_URL": { "Mainnet": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-mainnet", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-harmony", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-astar" } } diff --git a/packages/web3-constants/evm/openocean.json b/packages/web3-constants/evm/openocean.json index 76bc36a20122..4caf9affa412 100644 --- a/packages/web3-constants/evm/openocean.json +++ b/packages/web3-constants/evm/openocean.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/opensea-api.json b/packages/web3-constants/evm/opensea-api.json index c4145343db8e..ac840bc2c6bc 100644 --- a/packages/web3-constants/evm/opensea-api.json +++ b/packages/web3-constants/evm/opensea-api.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GET_SINGLE_ASSET_URL": { "Mainnet": "https://api.opensea.io/api/v1/asset", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GET_ASSETS_URL": { "Mainnet": "https://api.opensea.io/api/v1/assets", @@ -75,6 +77,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/pet.json b/packages/web3-constants/evm/pet.json index 5350972cb45f..dbcaf8d5ee46 100644 --- a/packages/web3-constants/evm/pet.json +++ b/packages/web3-constants/evm/pet.json @@ -23,6 +23,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/pooltogether.json b/packages/web3-constants/evm/pooltogether.json index 3c7def4c4af1..abe784fd43ee 100644 --- a/packages/web3-constants/evm/pooltogether.json +++ b/packages/web3-constants/evm/pooltogether.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MASK_POOL_ADDRESS": { "Mainnet": "", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/red-packet.json b/packages/web3-constants/evm/red-packet.json index 36d0e8de748c..a9b0b9f585f5 100644 --- a/packages/web3-constants/evm/red-packet.json +++ b/packages/web3-constants/evm/red-packet.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "HAPPY_RED_PACKET_ADDRESS_V2": { "Mainnet": "0x8D8912E1237F9FF3EF661F32743CFB276E052F98", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "HAPPY_RED_PACKET_ADDRESS_V3": { "Mainnet": "", @@ -75,7 +77,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "HAPPY_RED_PACKET_ADDRESS_V4": { "Mainnet": "0xaBBe1101FD8fa5847c452A6D70C8655532B03C33", @@ -101,7 +104,8 @@ "Aurora_Testnet": "0xdB93cCd481012bB5D1E2c8d0aF7C5f2940c00fdC", "Conflux": "0x96c7d011cdfd467f551605f0f5fce279f86f4186", "Harmony": "0xab7b1be4233a04e5c43a810e75657eced8e5463b", - "Harmony_Test": "0x96c7d011cdfd467f551605f0f5fce279f86f4186" + "Harmony_Test": "0x96c7d011cdfd467f551605f0f5fce279f86f4186", + "Astar": "0x2cF46Db820e279c5fBF778367D49d9C931D54524" }, "HAPPY_RED_PACKET_ADDRESS_V4_BLOCK_HEIGHT": { "Mainnet": 12939427, @@ -127,7 +131,8 @@ "Aurora_Testnet": 77918765, "Conflux": 37670572, "Harmony": 24134162, - "Harmony_Test": 22701101 + "Harmony_Test": 22701101, + "Astar": 910985 }, "SUBGRAPH_URL": { "Mainnet": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-mainnet", @@ -153,6 +158,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-harmony", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-astar" } } diff --git a/packages/web3-constants/evm/rpc.json b/packages/web3-constants/evm/rpc.json index 382719aaf616..3de44c5b48bc 100644 --- a/packages/web3-constants/evm/rpc.json +++ b/packages/web3-constants/evm/rpc.json @@ -75,7 +75,8 @@ "https://api.s0.t.hmny.io", "https://rpc.hermesdefi.io/" ], - "Harmony_Test": ["https://api.s0.b.hmny.io/"] + "Harmony_Test": ["https://api.s0.b.hmny.io/"], + "Astar": ["https://astar.api.onfinality.io/public"] }, "RPC_WEIGHTS": { "Mainnet": [0, 1, 2, 3, 4], @@ -101,6 +102,7 @@ "Aurora_Testnet": [0, 0, 0, 0, 0], "Conflux": [0, 0, 0, 0, 0], "Harmony": [0, 0, 0, 0, 0], - "Harmony_Test": [0, 0, 0, 0, 0] + "Harmony_Test": [0, 0, 0, 0, 0], + "Astar": [0, 0, 0, 0, 0] } } diff --git a/packages/web3-constants/evm/space-station-galaxy.json b/packages/web3-constants/evm/space-station-galaxy.json index f5b9de415f7e..5ba4bd5fb224 100644 --- a/packages/web3-constants/evm/space-station-galaxy.json +++ b/packages/web3-constants/evm/space-station-galaxy.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "SUBGRAPH_URL": { "Mainnet": "", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/token-asset-base-url.json b/packages/web3-constants/evm/token-asset-base-url.json index 298656945d41..b49815bd5955 100644 --- a/packages/web3-constants/evm/token-asset-base-url.json +++ b/packages/web3-constants/evm/token-asset-base-url.json @@ -74,6 +74,10 @@ "https://raw.githubusercontent.com/dimensiondev/assets/master/blockchains/harmony", "https://rawcdn.githack.com/dimensiondev/assets/master/blockchains/harmony" ], - "Harmony_Test": [] + "Harmony_Test": [], + "Astar": [ + "https://raw.githubusercontent.com/dimensiondev/assets/master/blockchains/astar", + "https://rawcdn.githack.com/dimensiondev/assets/master/blockchains/astar" + ] } } diff --git a/packages/web3-constants/evm/token-list.json b/packages/web3-constants/evm/token-list.json index 65a741276c2c..697c65114f88 100644 --- a/packages/web3-constants/evm/token-list.json +++ b/packages/web3-constants/evm/token-list.json @@ -23,7 +23,8 @@ "Aurora_Testnet": [], "Conflux": ["https://tokens.r2d2.to/latest/1030/tokens.json"], "Harmony": ["https://tokens.r2d2.to/latest/1666600000/tokens.json"], - "Harmony_Test": ["https://tokens.r2d2.to/latest/1666700000/tokens.json"] + "Harmony_Test": ["https://tokens.r2d2.to/latest/1666700000/tokens.json"], + "Astar": ["https://tokens.r2d2.to/latest/592/tokens.json"] }, "NON_FUNGIBLE_TOKEN_LISTS": { "Mainnet": ["https://tokens.r2d2.to/latest/1/non-fungible-tokens.json"], @@ -49,6 +50,7 @@ "Aurora_Testnet": [], "Conflux": [], "Harmony": [], - "Harmony_Test": [] + "Harmony_Test": [], + "Astar": ["https://tokens.r2d2.to/latest/592/non-fungible-tokens.json"] } } diff --git a/packages/web3-constants/evm/token.json b/packages/web3-constants/evm/token.json index a6b4d1d6b3b0..b441a6767904 100644 --- a/packages/web3-constants/evm/token.json +++ b/packages/web3-constants/evm/token.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xcF664087a5bB0237a0BAd6742852ec6c8d69A27a", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720" }, "LDO_stETH_ADDRESS": { "Mainnet": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ELK_ADDRESS": { "Mainnet": "0xeEeEEb57642040bE42185f49C52F7E9B38f8eeeE", @@ -101,7 +103,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x985458E523dB3d53125813eD68c274899e9DfAb4", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x6a2d262D56735DbA19Dd70682B39F6bE9a931D98" }, "USDT_ADDRESS": { "Mainnet": "0xdAC17F958D2ee523a2206206994597C13D831ec7", @@ -127,7 +130,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x3795C36e7D12A8c252A20C5a7B455f7c57b60283" }, "aUSDT_ADDRESS": { "Mainnet": "0x71fc860F7D3A592A4a98740e39dB31d25db65ae8", @@ -153,7 +157,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x3C2B8Be99c50593081EAA2A724F0B8285F5aba8f", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "HUSD_ADDRESS": { "Mainnet": "0xdf574c24545e5ffecb9a659c229253d4111d87e1", @@ -179,7 +184,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BUSD_ADDRESS": { "Mainnet": "0x4fabb145d64652a948d72533023f6e7a623c7c53", @@ -205,7 +211,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xE176EBE47d621b984a73036B9DA5d834411ef734", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x4Bf769b05E832FCdc9053fFFBC78Ca889aCb5E1E" }, "COMP_ADDRESS": { "Mainnet": "0xc00e94Cb662C3520282E6f5717214004A7f26888", @@ -231,7 +238,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "EASY_ADDRESS": { "Mainnet": "", @@ -257,7 +265,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MKR_ADDRESS": { "Mainnet": "0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2", @@ -283,7 +292,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MASK_ADDRESS": { "Mainnet": "0x69af81e73A73B40adF4f3d4223Cd9b1ECE623074", @@ -309,7 +319,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MSKA_ADDRESS": { "Mainnet": "", @@ -335,7 +346,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MSKB_ADDRESS": { "Mainnet": "", @@ -361,7 +373,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MSKC_ADDRESS": { "Mainnet": "", @@ -387,7 +400,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MSKD_ADDRESS": { "Mainnet": "", @@ -413,7 +427,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MSKE_ADDRESS": { "Mainnet": "", @@ -439,7 +454,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DAI_ADDRESS": { "Mainnet": "0x6B175474E89094C44Da98b954EedeAC495271d0F", @@ -465,7 +481,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xEf977d2f931C1978Db5F6747666fa1eACB0d0339", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x6De33698e9e9b787e09d3Bd7771ef63557E148bb" }, "AMPL_ADDRESS": { "Mainnet": "0xD46bA6D942050d489DBd938a2C909A5d5039A161", @@ -491,7 +508,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OKB_ADDRESS": { "Mainnet": "0x75231F58b43240C9718Dd58B4967c5114342a86c", @@ -517,7 +535,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UST_ADDRESS": { "Mainnet": "0xa47c8bf37f92aBed4A126BDA807A7b7498661acD", @@ -543,7 +562,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x224e64ec1BDce3870a6a6c777eDd450454068FEC", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "eUSDC_ADDRESS": { "Mainnet": "", @@ -569,7 +589,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "eUSDT_ADDRESS": { "Mainnet": "", @@ -595,7 +616,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "fUSDT_ADDRESS": { "Mainnet": "", @@ -621,7 +643,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "eDAI_ADDRESS": { "Mainnet": "", @@ -647,7 +670,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNITOKEN_ADDRESS": { "Mainnet": "", @@ -673,7 +697,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TT01_ADDRESS": { "Mainnet": "", @@ -699,7 +724,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TT02_ADDRESS": { "Mainnet": "", @@ -725,7 +751,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "QUICK_ADDRESS": { "Mainnet": "", @@ -751,7 +778,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNA_ADDRESS": { "Mainnet": "", @@ -777,7 +805,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WBTC_ADDRESS": { "Mainnet": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", @@ -803,7 +832,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x3095c7557bCb296ccc6e363DE01b760bA031F2d9", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0xad543f18cFf85c77E140E3E5E3c3392f6Ba9d5CA" }, "IGG_ADDRESS": { "Mainnet": "", @@ -829,7 +859,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OM_ADDRESS": { "Mainnet": "", @@ -855,7 +886,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "SUSHI_ADDRESS": { "Mainnet": "0x6B3595068778DD592e39A122f4f5a5cF09C90fE2", @@ -881,7 +913,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xBEC775Cb42AbFa4288dE81F387a9b1A3c4Bc552A", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "YAM_ADDRESS": { "Mainnet": "0x0e2298E3B3390e3b945a5456fBf59eCc3f55DA16", @@ -907,7 +940,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "RUNE_ADDRESS": { "Mainnet": "0x3155BA85D5F96b2d030a4966AF206230e46849cb", @@ -933,7 +967,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "YFI_ADDRESS": { "Mainnet": "0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e", @@ -959,7 +994,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "sUSD_ADDRESS": { "Mainnet": "0x57ab1ec28d129707052df4df418d58a2d46d5f51", @@ -985,7 +1021,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BTCB_ADDRESS": { "Mainnet": "", @@ -1011,7 +1048,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "CAKE_ADDRESS": { "Mainnet": "", @@ -1037,7 +1075,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "maUSDC_ADDRESS": { "Mainnet": "", @@ -1063,7 +1102,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "stETH_ADDRESS": { "Mainnet": "0xDFe66B14D37C77F4E9b180cEb433d1b164f0281D", @@ -1089,7 +1129,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "NFTX_ADDRESS": { "Mainnet": "0x87d73E916D7057945c9BcD8cdd94e42A6F47f776", @@ -1115,7 +1156,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "cUSD_ADDRESS": { "Mainnet": "", @@ -1141,7 +1183,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "cEUR_ADDRESS": { "Mainnet": "", @@ -1167,7 +1210,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "xTRI_ADDRESS": { "Mainnet": "", @@ -1193,7 +1237,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "JOE_ADDRESS": { "Mainnet": "", @@ -1219,7 +1264,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PNG_ADDRESS": { "Mainnet": "", @@ -1245,7 +1291,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "VIPER_ADDRESS": { "Mainnet": "", @@ -1271,7 +1318,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xEa589E93Ff18b1a1F1e9BaC7EF3E86Ab62addc79", - "Harmony_Test": "0x69A655c56087D927eb05247FB56495a0f19B9f70" + "Harmony_Test": "0x69A655c56087D927eb05247FB56495a0f19B9f70", + "Astar": "" }, "JEWEL_ADDRESS": { "Mainnet": "", @@ -1297,7 +1345,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x72Cb10C6bfA5624dD07Ef608027E366bd690048F", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "CRYSTAL_ADDRESS": { "Mainnet": "", @@ -1323,7 +1372,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x72Cb10C6bfA5624dD07Ef608027E366bd690048F", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENX_ADDRESS": { "Mainnet": "", @@ -1349,7 +1399,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x01A4b054110d57069c1658AFBC46730529A3E326", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ETHER_ADDRESS": { "Mainnet": "", @@ -1375,7 +1426,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "NATIVE_TOKEN_ADDRESS": { "Mainnet": "0x0000000000000000000000000000000000000000", @@ -1401,7 +1453,8 @@ "Aurora_Testnet": "", "Conflux": "0x0000000000000000000000000000000000000000", "Harmony": "0x0000000000000000000000000000000000000000", - "Harmony_Test": "0x0000000000000000000000000000000000000000" + "Harmony_Test": "0x0000000000000000000000000000000000000000", + "Astar": "0x0000000000000000000000000000000000000000" }, "WETH_ADDRESS": { "Mainnet": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", @@ -1427,7 +1480,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "0x81ECac0D6Be0550A00FF064a4f9dd2400585FE9c" }, "aWETH_ADDRESS": { "Mainnet": "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e", @@ -1453,7 +1507,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xe50fA9b3c56FfB159cB0FCA61F5c9D750e8128c8", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ZRX_ADDRESS": { "Mainnet": "0xE41d2489571d322189246DaFA5ebDe1F4699F498", @@ -1479,7 +1534,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aZRX_ADDRESS": { "Mainnet": "0xDf7FF54aAcAcbFf42dfe29DD6144A69b629f8C9e", @@ -1505,7 +1561,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNI_ADDRESS": { "Mainnet": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984", @@ -1531,7 +1588,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aUNI_ADDRESS": { "Mainnet": "0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1", @@ -1557,7 +1615,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "LIDO_ADDRESS": { "Mainnet": "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32", @@ -1583,7 +1642,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "AAVE_ADDRESS": { "Mainnet": "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9", @@ -1609,7 +1669,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xcF323Aad9E522B93F11c352CaA519Ad0E14eB40F", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aAAVE_ADDRESS": { "Mainnet": "0xFFC97d72E13E01096502Cb8Eb52dEe56f74DAD7B", @@ -1635,7 +1696,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xf329e36C7bF6E5E86ce2150875a84Ce77f477375", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BAT_ADDRESS": { "Mainnet": "0x0D8775F648430679A709E98d2b0Cb6250d2887EF", @@ -1661,7 +1723,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aBAT_ADDRESS": { "Mainnet": "0x05Ec93c0365baAeAbF7AefFb0972ea7ECdD39CF1", @@ -1687,7 +1750,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ENJ_ADDRESS": { "Mainnet": "0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c", @@ -1713,7 +1777,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aENJ_ADDRESS": { "Mainnet": "0xaC6Df26a590F08dcC95D5a4705ae8abbc88509Ef", @@ -1739,7 +1804,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "KNC_ADDRESS": { "Mainnet": "0xdd974D5C2e2928deA5F71b9825b8b646686BD200", @@ -1765,7 +1831,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aKNC_ADDRESS": { "Mainnet": "0x39C6b3e42d6A679d7D776778Fe880BC9487C2EDA", @@ -1791,7 +1858,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "LINK_ADDRESS": { "Mainnet": "0x514910771AF9Ca656af840dff83E8264EcF986CA", @@ -1817,7 +1885,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x218532a12a389a4a92fC0C5Fb22901D1c19198aA", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aLINK_ADDRESS": { "Mainnet": "0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0", @@ -1843,7 +1912,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MANA_ADDRESS": { "Mainnet": "0x0F5D2fB29fb7d3CFeE444a200298f468908cC942", @@ -1869,7 +1939,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aMANA_ADDRESS": { "Mainnet": "0xa685a61171bb30d4072B338c80Cb7b2c865c873E", @@ -1895,7 +1966,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "REN_ADDRESS": { "Mainnet": "0x408e41876cCCDC0F92210600ef50372656052a38", @@ -1921,7 +1993,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aREN_ADDRESS": { "Mainnet": "0xCC12AbE4ff81c9378D670De1b57F8e0Dd228D77a", @@ -1947,7 +2020,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "SNX_ADDRESS": { "Mainnet": "0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F", @@ -1973,7 +2047,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aSNX_ADDRESS": { "Mainnet": "0x35f6B052C598d933D69A4EEC4D04c73A191fE6c2", @@ -1999,7 +2074,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TUSD_ADDRESS": { "Mainnet": "0x0000000000085d4780B73119b644AE5ecd22b376", @@ -2025,7 +2101,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aTUSD_ADDRESS": { "Mainnet": "0x101cc05f4A51C0319f570d5E146a8C625198e636", @@ -2051,7 +2128,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "CRV_ADDRESS": { "Mainnet": "0xD533a949740bb3306d119CC777fa900bA034cd52", @@ -2077,7 +2155,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aCRV_ADDRESS": { "Mainnet": "0x8dAE6Cb04688C62d939ed9B68d32Bc62e49970b1", @@ -2103,7 +2182,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "GUSD_ADDRESS": { "Mainnet": "0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd", @@ -2129,7 +2209,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aGUSD_ADDRESS": { "Mainnet": "0xD37EE7e4f452C6638c96536e68090De8cBcdb583", @@ -2155,7 +2236,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BAL_ADDRESS": { "Mainnet": "0xba100000625a3754423978a60c9317c58a424e3D", @@ -2181,7 +2263,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aBAL_ADDRESS": { "Mainnet": "0x272F97b7a56a387aE942350bBC7Df5700f8a4576", @@ -2207,7 +2290,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "xSUSHI_ADDRESS": { "Mainnet": "0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272", @@ -2233,7 +2317,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aXSUSHI_ADDRESS": { "Mainnet": "0xF256CC7847E919FAc9B808cC216cAc87CCF2f47a", @@ -2259,7 +2344,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "renFIL_ADDRESS": { "Mainnet": "0xD5147bc8e386d91Cc5DBE72099DAC6C9b99276F5", @@ -2285,7 +2371,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aRENFIL_ADDRESS": { "Mainnet": "0x514cd6756CCBe28772d4Cb81bC3156BA9d1744aa", @@ -2311,7 +2398,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "RAI_ADDRESS": { "Mainnet": "0x03ab458634910AaD20eF5f1C8ee96F1D6ac54919", @@ -2337,7 +2425,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aRAI_ADDRESS": { "Mainnet": "0xc9BC48c72154ef3e5425641a3c747242112a46AF", @@ -2363,7 +2452,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "USDP_ADDRESS": { "Mainnet": "0x8E870D67F660D95d5be530380D0eC0bd388289E1", @@ -2389,7 +2479,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aUSDP_ADDRESS": { "Mainnet": "0x2e8F4bdbE3d47d7d7DE490437AeA9915D930F1A3", @@ -2415,7 +2506,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DPI_ADDRESS": { "Mainnet": "0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b", @@ -2441,7 +2533,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aDPI_ADDRESS": { "Mainnet": "0x6F634c6135D2EBD550000ac92F494F9CB8183dAe", @@ -2467,7 +2560,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "FRAX_ADDRESS": { "Mainnet": "0x853d955aCEf822Db058eb8505911ED77F175b99e", @@ -2493,7 +2587,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xFa7191D292d5633f702B0bd7E3E3BcCC0e633200", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aFRAX_ADDRESS": { "Mainnet": "0xd4937682df3C8aEF4FE912A96A74121C0829E664", @@ -2519,7 +2614,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "FEI_ADDRESS": { "Mainnet": "0x956F47F50A910163D8BF957Cf5846D573E7f87CA", @@ -2545,7 +2641,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aFEI_ADDRESS": { "Mainnet": "0x683923dB55Fead99A79Fa01A27EeC3cB19679cC3", @@ -2571,7 +2668,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aWBTC_ADDRESS": { "Mainnet": "0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656", @@ -2597,7 +2695,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x078f358208685046a11C85e8ad32895DED33A249", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aYFI_ADDRESS": { "Mainnet": "0x5165d24277cD063F5ac44Efd447B27025e888f37", @@ -2623,7 +2722,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aBUSD_ADDRESS": { "Mainnet": "0xA361718326c15715591c299427c62086F69923D9", @@ -2649,7 +2749,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aDAI_ADDRESS": { "Mainnet": "0x028171bCA77440897B824Ca71D1c56caC55b68A3", @@ -2675,7 +2776,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aMKR_ADDRESS": { "Mainnet": "0xc713e5E149D5D0715DcD1c156a020976e7E56B88", @@ -2701,7 +2803,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aSUSD_ADDRESS": { "Mainnet": "0x6C5024Cd4F8A59110119C56f8933403A539555EB", @@ -2727,7 +2830,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aUSDC_ADDRESS": { "Mainnet": "0xBcca60bB61934080951369a648Fb03DF4F96263C", @@ -2753,7 +2857,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "aAMPL_ADDRESS": { "Mainnet": "0x1E6bb68Acec8fefBD87D192bE09bb274170a0548", @@ -2779,7 +2884,107 @@ "Aurora_Testnet": "", "Conflux": "0x0000000000000000000000000000000000000000", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" + }, + "SDN_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Optimism": "", + "Astar": "" + }, + "VERSA_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Optimism": "", + "Astar": "0xB9dEDB74bd7b298aBf76b9dFbE5b62F0aB05a57b" + }, + "YUMI_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Optimism": "", + "Astar": "0x665F8B21878bDECa8bD94507120730a40dCd4F61" + }, + "xYUMI_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xCc7a1Bd54375fa5bc408aC319569eCc81c8d4208" }, "ZIP_ADDRESS": { "Mainnet": "", @@ -2805,7 +3010,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OP_ADDRESS": { "Mainnet": "", @@ -2831,6 +3037,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/trader.json b/packages/web3-constants/evm/trader.json index 121a6c952dba..a8fd2bfd848f 100644 --- a/packages/web3-constants/evm/trader.json +++ b/packages/web3-constants/evm/trader.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V2_FACTORY_ADDRESS": { "Mainnet": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V2_THEGRAPH": { "Mainnet": "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2", @@ -75,7 +77,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V2_INIT_CODE_HASH": { "Mainnet": "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", @@ -101,7 +104,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_SWAP_ROUTER_ADDRESS": { "Mainnet": "0xe592427a0aece92de3edee1f18e0157c05861564", @@ -127,7 +131,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V3_FACTORY_ADDRESS": { "Mainnet": "0x1F98431c8aD98523631AE4a59f267346ea31F984", @@ -153,7 +158,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V3_QUOTER_ADDRESS": { "Mainnet": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", @@ -179,7 +185,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V3_THEGRAPH": { "Mainnet": "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3", @@ -205,7 +212,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V3_INIT_CODE_HASH": { "Mainnet": "0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea89325f843f87b8b54", @@ -231,7 +239,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "SUSHISWAP_ROUTER_ADDRESS": { "Mainnet": "0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F", @@ -257,7 +266,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", - "Harmony_Test": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506" + "Harmony_Test": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "Astar": "" }, "SUSHISWAP_FACTORY_ADDRESS": { "Mainnet": "0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac", @@ -283,7 +293,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", - "Harmony_Test": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4" + "Harmony_Test": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", + "Astar": "" }, "SUSHISWAP_THEGRAPH": { "Mainnet": "https://api.thegraph.com/subgraphs/name/zippoxer/sushiswap-subgraph-fork", @@ -309,7 +320,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "SUSHISWAP_INIT_CODE_HASH": { "Mainnet": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", @@ -335,7 +347,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", - "Harmony_Test": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303" + "Harmony_Test": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", + "Astar": "" }, "QUICKSWAP_ROUTER_ADDRESS": { "Mainnet": "", @@ -361,7 +374,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "QUICKSWAP_FACTORY_ADDRESS": { "Mainnet": "", @@ -387,7 +401,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "QUICKSWAP_THEGRAPH": { "Mainnet": "", @@ -413,7 +428,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "QUICKSWAP_INIT_CODE_HASH": { "Mainnet": "", @@ -439,7 +455,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANCAKESWAP_ROUTER_ADDRESS": { "Mainnet": "", @@ -465,7 +482,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANCAKESWAP_FACTORY_ADDRESS": { "Mainnet": "", @@ -491,7 +509,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANCAKESWAP_THEGRAPH": { "Mainnet": "", @@ -517,7 +536,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANCAKESWAP_INIT_CODE_HASH": { "Mainnet": "", @@ -543,7 +563,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BALANCER_ETH_ADDRESS": { "Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", @@ -569,7 +590,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BALANCER_EXCHANGE_PROXY_ADDRESS": { "Mainnet": "0x3E66B66Fd1d0b02fDa6C811Da9E0547970DB2f21", @@ -595,7 +617,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BALANCER_POOLS_URL": { "Mainnet": "https://ipfs.fleek.co/ipns/balancer-bucket.storage.fleek.co/balancer-exchange/pools", @@ -621,7 +644,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DODO_ETH_ADDRESS": { "Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", @@ -647,7 +671,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DODO_EXCHANGE_PROXY_ADDRESS": { "Mainnet": "0xCB859eA579b28e02B87A1FDE08d087ab9dbE5149", @@ -673,7 +698,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BANCOR_ETH_ADDRESS": { "Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", @@ -699,7 +725,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "BANCOR_EXCHANGE_PROXY_ADDRESS": { "Mainnet": "0x2F9EC37d6CcFFf1caB21733BdaDEdE11c823cCB0", @@ -725,7 +752,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRADERJOE_ROUTER_ADDRESS": { "Mainnet": "", @@ -751,7 +779,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRADERJOE_FACTORY_ADDRESS": { "Mainnet": "", @@ -777,7 +806,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRADERJOE_THEGRAPH": { "Mainnet": "https://api.thegraph.com/subgraphs/name/traderjoe-xyz/exchange", @@ -803,7 +833,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRADERJOE_INIT_CODE_HASH": { "Mainnet": "", @@ -829,7 +860,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENOCEAN_ETH_ADDRESS": { "Mainnet": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", @@ -855,7 +887,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENOCEAN_EXCHANGE_PROXY_ADDRESS": { "Mainnet": "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64", @@ -881,7 +914,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANGOLIN_ROUTER_ADDRESS": { "Mainnet": "", @@ -907,7 +941,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANGOLIN_FACTORY_ADDRESS": { "Mainnet": "", @@ -933,7 +968,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANGOLIN_THEGRAPH": { "Mainnet": "", @@ -959,7 +995,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "PANGOLIN_INIT_CODE_HASH": { "Mainnet": "", @@ -985,7 +1022,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNASWAP_ROUTER_V2_ADDRESS": { "Mainnet": "", @@ -1011,7 +1049,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNASWAP_ROUTER_ADDRESS": { "Mainnet": "", @@ -1037,7 +1076,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNASWAP_FACTORY_ADDRESS": { "Mainnet": "", @@ -1063,7 +1103,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNASWAP_THEGRAPH": { "Mainnet": "", @@ -1089,7 +1130,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "WANNASWAP_INIT_CODE_HASH": { "Mainnet": "", @@ -1115,7 +1157,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRISOLARIS_ROUTER_ADDRESS": { "Mainnet": "", @@ -1141,7 +1184,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRISOLARIS_FACTORY_ADDRESS": { "Mainnet": "", @@ -1167,7 +1211,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRISOLARIS_THEGRAPH": { "Mainnet": "", @@ -1193,7 +1238,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "TRISOLARIS_INIT_CODE_HASH": { "Mainnet": "", @@ -1219,7 +1265,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MDEX_ROUTER_ADDRESS": { "Mainnet": "0x74119c3bca85bEA0538A62319a79b4a372590B47", @@ -1245,7 +1292,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MDEX_FACTORY_ADDRESS": { "Mainnet": "0x7DAe51BD3E3376B8c7c4900E9107f12Be3AF1bA8", @@ -1271,7 +1319,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MDEX_THEGRAPH": { "Mainnet": "", @@ -1297,7 +1346,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "MDEX_INIT_CODE_HASH": { "Mainnet": "0x8ecc069c645df696f2ca5116ab459c5c2889f299e73c1b208aaa3cdd7d110b16", @@ -1427,7 +1477,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "VENOMSWAP_ROUTER_ADDRESS": { "Mainnet": "", @@ -1453,7 +1504,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xf012702a5f0e54015362cbca26a26fc90aa832a3", - "Harmony_Test": "0x8e9A3cE409B13ef459fE4448aE97a79d6Ecd8b4b" + "Harmony_Test": "0x8e9A3cE409B13ef459fE4448aE97a79d6Ecd8b4b", + "Astar": "" }, "VENOMSWAP_FACTORY_ADDRESS": { "Mainnet": "", @@ -1479,7 +1531,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x7D02c116b98d0965ba7B642ace0183ad8b8D2196", - "Harmony_Test": "0x066bafafC84607a956967F6f050bD14A8347952F" + "Harmony_Test": "0x066bafafC84607a956967F6f050bD14A8347952F", + "Astar": "" }, "VENOMSWAP_THEGRAPH": { "Mainnet": "", @@ -1505,7 +1558,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "VENOMSWAP_INIT_CODE_HASH": { "Mainnet": "", @@ -1531,7 +1585,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x162f79e638367cd45a118c778971dfd8d96c625d2798d3b71994b035cfe9b6dc", - "Harmony_Test": "0x162f79e638367cd45a118c778971dfd8d96c625d2798d3b71994b035cfe9b6dc" + "Harmony_Test": "0x162f79e638367cd45a118c778971dfd8d96c625d2798d3b71994b035cfe9b6dc", + "Astar": "" }, "OPENSWAP_ROUTER_ADDRESS": { "Mainnet": "", @@ -1557,7 +1612,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x2F99992024DCC51324BA4956bB1c510F36FA54F5", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENSWAP_FACTORY_ADDRESS": { "Mainnet": "", @@ -1583,7 +1639,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x5d2F9817303b940C9bB4F47C8C566c5C034d9848", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENSWAP_THEGRAPH": { "Mainnet": "", @@ -1609,7 +1666,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "OPENSWAP_INIT_CODE_HASH": { "Mainnet": "", @@ -1635,7 +1693,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x613b6eaa34b43dcb7eb8881dd4b5af85805be104d5f2f385304ffa8bda5e219c", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DEFIKINGDOMS_ROUTER_ADDRESS": { "Mainnet": "", @@ -1661,7 +1720,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x24ad62502d1C652Cc7684081169D04896aC20f30", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DEFIKINGDOMS_FACTORY_ADDRESS": { "Mainnet": "", @@ -1687,7 +1747,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0x9014B937069918bd319f80e8B3BB4A2cf6FAA5F7", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DEFIKINGDOMS_THEGRAPH": { "Mainnet": "", @@ -1713,7 +1774,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "DEFIKINGDOMS_INIT_CODE_HASH": { "Mainnet": "", @@ -1739,6 +1801,391 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "0xf1c21a825f13eff153022ddea53156462dd79972b6f88adf06f79ca8b042c3c1", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" + }, + "ARTHSWAP_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xE915D2393a08a00c5A463053edD31bAe2199b9e7" + }, + "ARTHSWAP_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xA9473608514457b4bF083f9045fA63ae5810A03E" + }, + "ARTHSWAP_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "" + }, + "ARTHSWAP_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0x613b36de6401276e4d938ad0db4063490e66bb3ab2e4aec17cab78a15ea7a0b6" + }, + "VERSA_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xDAC282cA5534DC5936165197263E5f08b2C4577c" + }, + "VERSA_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0x4346A7C8C39Bf91b8a80933c2fdb10d815c401dB" + }, + "VERSA_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "" + }, + "VERSA_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xd85454abf78812c626635684bd82ec9bbcf160e8f7b0cfb33b5fd6f4db851b88" + }, + "ASTAREXCHANGE_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xD38F0bC4a0728d2a1fCAaFa364F7c8422Ba1CD14" + }, + "ASTAREXCHANGE_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0x95f506E72777efCB3C54878bB4160b00Cd11cd84" + }, + "ASTAREXCHANGE_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "" + }, + "ASTAREXCHANGE_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xc2cba59c13ce63f268e47d20538deaff688bc65268a5214b851a42ba61d73118" + }, + "YUMISWAP_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xa4183Dca1d46580970d19CB25f4735065018e4E9" + }, + "YUMISWAP_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xD3CFB8A232Ad5D0A7ABc817ae3BD1F3E7AE4b5E0" + }, + "YUMISWAP_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "" + }, + "YUMISWAP_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "", + "Conflux": "", + "Harmony": "", + "Harmony_Test": "", + "Astar": "0xa40fa53e635b27774c3263c392063fc460318850b3a47e9d53f199b16e18bb23" } } diff --git a/packages/web3-constants/evm/trending.json b/packages/web3-constants/evm/trending.json index 56b1854253ff..e9842ff672bb 100644 --- a/packages/web3-constants/evm/trending.json +++ b/packages/web3-constants/evm/trending.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "UNISWAP_V2_HEALTH_URL": { "Mainnet": "https://api.thegraph.com/index-node/graphql", @@ -49,7 +50,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" }, "ETHEREUM_BLOCKS_SUBGRAPH_URL": { "Mainnet": "https://api.thegraph.com/subgraphs/name/blocklytics/ethereum-blocks", @@ -75,6 +77,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "" } } diff --git a/packages/web3-constants/evm/zerion.json b/packages/web3-constants/evm/zerion.json index 106a9bce00e3..f963ad6eafb0 100644 --- a/packages/web3-constants/evm/zerion.json +++ b/packages/web3-constants/evm/zerion.json @@ -23,7 +23,8 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "harmony-assets", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "astar-assets" }, "TRANSACTIONS_SCOPE_NAME": { "Mainnet": "transactions", @@ -49,6 +50,7 @@ "Aurora_Testnet": "", "Conflux": "", "Harmony": "harmony-transactions", - "Harmony_Test": "" + "Harmony_Test": "", + "Astar": "astar-transactions" } } diff --git a/packages/web3-providers/src/astar/index.ts b/packages/web3-providers/src/astar/index.ts new file mode 100644 index 000000000000..8b5f1b01ea63 --- /dev/null +++ b/packages/web3-providers/src/astar/index.ts @@ -0,0 +1,38 @@ +import { GasOptionType } from '@masknet/web3-shared-base' +import type { ChainId, GasOption } from '@masknet/web3-shared-evm' +import type { GasOptionAPI } from '../types' +import type { EstimateSuggestResponse } from './types' +import { formatWeiToGwei } from '@masknet/web3-shared-evm' + +const ASTAR_API = 'https://gas.astar.network/api/gasnow?network=astar' + +export class AstarAPI implements GasOptionAPI.Provider { + async getGasOptions(chainId: ChainId): Promise> { + const response = await fetch(ASTAR_API) + const gas = await response.json() + + const result = gas.data as EstimateSuggestResponse + const { priorityFeePerGas } = result.eip1559 + + return { + [GasOptionType.FAST]: { + estimatedBaseFee: formatWeiToGwei(result.eip1559.baseFeePerGas).toString() ?? '0', + estimatedSeconds: 15, + suggestedMaxFeePerGas: formatWeiToGwei(result.fast ?? 0).toString(), + suggestedMaxPriorityFeePerGas: formatWeiToGwei(priorityFeePerGas.fast).toString() ?? '0', + }, + [GasOptionType.NORMAL]: { + estimatedBaseFee: formatWeiToGwei(result.eip1559.baseFeePerGas).toString() ?? '0', + estimatedSeconds: 30, + suggestedMaxFeePerGas: formatWeiToGwei(result.average ?? 0).toString(), + suggestedMaxPriorityFeePerGas: formatWeiToGwei(priorityFeePerGas.average).toString() ?? '0', + }, + [GasOptionType.SLOW]: { + estimatedBaseFee: formatWeiToGwei(result.eip1559.baseFeePerGas).toString() ?? '0', + estimatedSeconds: 60, + suggestedMaxFeePerGas: formatWeiToGwei(result.slow ?? 0).toString(), + suggestedMaxPriorityFeePerGas: formatWeiToGwei(priorityFeePerGas.slow).toString() ?? '0', + }, + } + } +} diff --git a/packages/web3-providers/src/astar/types.ts b/packages/web3-providers/src/astar/types.ts new file mode 100644 index 000000000000..f0acd75b62ff --- /dev/null +++ b/packages/web3-providers/src/astar/types.ts @@ -0,0 +1,27 @@ +export interface EstimateSuggestOption { + maxWaitTimeEstimate: number + minWaitTimeEstimate: number + suggestedMaxFeePerGas: string + suggestedMaxPriorityFeePerGas: string +} + +export interface EstimateSuggestResponse { + tip: Tip + slow?: string + average?: string + fast?: string + estimatedBaseFee: string + eip1559: Eip1559 + timestamp: number +} + +export interface Eip1559 { + priorityFeePerGas: Tip + baseFeePerGas: string +} + +export interface Tip { + average: string + slow: string + fast: string +} diff --git a/packages/web3-providers/src/index.ts b/packages/web3-providers/src/index.ts index 65e98d41e210..60b478985192 100644 --- a/packages/web3-providers/src/index.ts +++ b/packages/web3-providers/src/index.ts @@ -14,6 +14,7 @@ import { InstagramAPI } from './instagram' import { DeBankAPI } from './debank' import { ZerionAPI } from './zerion' import { MetaSwapAPI } from './metaswap' +import { AstarAPI } from './astar' import { GoPlusLabsAPI } from './gopluslabs' import { NextIDProofAPI, NextIDStorageAPI } from './NextID' import { Alchemy_EVM_API, Alchemy_FLOW_API } from './alchemy' @@ -50,6 +51,7 @@ export const TokenList = new TokenListAPI() export const DeBank = new DeBankAPI() export const Zerion = new ZerionAPI() export const MetaSwap = new MetaSwapAPI() +export const AstarGas = new AstarAPI() export const NextIDStorage = new NextIDStorageAPI() export const EthereumWeb3 = new EthereumWeb3API() export const NextIDProof = new NextIDProofAPI() diff --git a/packages/web3-providers/src/rabby/helpers.tsx b/packages/web3-providers/src/rabby/helpers.tsx index 6e69a88018ea..00481d436e8f 100644 --- a/packages/web3-providers/src/rabby/helpers.tsx +++ b/packages/web3-providers/src/rabby/helpers.tsx @@ -83,6 +83,7 @@ export const resolveNetworkOnRabby = createLookupTableResolver { const balance = leftShift(quantity, asset.decimals).toNumber() const value = (asset as ZerionAsset).price?.value ?? (asset as ZerionCovalentAsset).value ?? 0 - const isNativeToken = (symbol: string) => ['ETH', 'BNB', 'MATIC', 'ARETH', 'AETH', 'ONE'].includes(symbol) + const isNativeToken = (symbol: string) => + ['ETH', 'BNB', 'MATIC', 'ARETH', 'AETH', 'ONE', 'ASTR'].includes(symbol) const address = isNativeToken(asset.symbol) ? getTokenConstant(chainId, 'NATIVE_TOKEN_ADDRESS', '') : asset.asset_code diff --git a/packages/web3-shared/evm/assets/astar.png b/packages/web3-shared/evm/assets/astar.png new file mode 100644 index 000000000000..8a1a25913b80 Binary files /dev/null and b/packages/web3-shared/evm/assets/astar.png differ diff --git a/packages/web3-shared/evm/constants/chains.json b/packages/web3-shared/evm/constants/chains.json index 8c8a974ac7f9..23d942a8c1e5 100644 --- a/packages/web3-shared/evm/constants/chains.json +++ b/packages/web3-shared/evm/constants/chains.json @@ -3088,5 +3088,55 @@ "decimals": 18 }, "infoURL": "https://evm.confluxscan.net" + }, + { + "chainId": 592, + "type": "Astar", + "name": "Astar", + "network": "mainnet", + "shortName": "Astar", + "rpc": ["https://evm.astar.network"], + "faucets": [], + "features": ["EIP1559"], + "nativeCurrency": { + "chainId": 592, + "name": "ASTAR", + "symbol": "ASTR", + "decimals": 18, + "logoURI": "https://static.debank.com/image/chain/logo_url/astar/398c7e0014bdada3d818367a7273fabe.png" + }, + "infoURL": "https://blockscout.com/astar/", + "explorers": [ + { + "name": "blockscout", + "url": "https://blockscout.com/astar/", + "standard": "EIP3091" + } + ] + }, + { + "chainId": 81, + "type": "Shibuya", + "name": "Shibuya", + "network": "testnet", + "shortName": "Shibuya", + "rpc": ["https://evm.shibuya.network"], + "faucets": [], + "features": ["EIP1559"], + "nativeCurrency": { + "chainId": 81, + "name": "sby", + "symbol": "sby", + "decimals": 18, + "logoURI": "https://static.debank.com/image/chain/logo_url/astar/398c7e0014bdada3d818367a7273fabe.png" + }, + "infoURL": "https://blockscout.com/shibuya/", + "explorers": [ + { + "name": "blockscout", + "url": "https://blockscout.com/shibuya/", + "standard": "EIP3091" + } + ] } ] diff --git a/packages/web3-shared/evm/constants/descriptors.ts b/packages/web3-shared/evm/constants/descriptors.ts index a4fdc9fee761..72595aee748b 100644 --- a/packages/web3-shared/evm/constants/descriptors.ts +++ b/packages/web3-shared/evm/constants/descriptors.ts @@ -247,6 +247,17 @@ export const NETWORK_DESCRIPTORS: Array> averageBlockDelay: 15, isMainnet: true, }, + { + ID: `${PLUGIN_ID}_astar`, + networkSupporterPluginID: PLUGIN_ID, + chainId: ChainId.Astar, + type: NetworkType.Astar, + name: 'Astar', + icon: new URL('../assets/astar.png', import.meta.url), + iconColor: 'rgb(36, 150, 238)', + averageBlockDelay: 15, + isMainnet: true, + }, { ID: `${PLUGIN_ID}_optimism`, networkSupporterPluginID: PLUGIN_ID, diff --git a/packages/web3-shared/evm/constants/getContractOwnerDomain.ts b/packages/web3-shared/evm/constants/getContractOwnerDomain.ts index b38f5de4fe91..cd957ae4311f 100644 --- a/packages/web3-shared/evm/constants/getContractOwnerDomain.ts +++ b/packages/web3-shared/evm/constants/getContractOwnerDomain.ts @@ -50,6 +50,7 @@ const domainAddressMap: Record = { 'WANNASWAP_ROUTER_ADDRESS', 'WANNASWAP_FACTORY_ADDRESS', ]), + 'yumiswap.com': collect(Trader, ['YUMISWAP_ROUTER_ADDRESS', 'YUMISWAP_FACTORY_ADDRESS']), 'www.trisolaris.io': collect(Trader, ['TRISOLARIS_ROUTER_ADDRESS', 'TRISOLARIS_FACTORY_ADDRESS']), 'mdex.com': collect(Trader, ['MDEX_ROUTER_ADDRESS', 'MDEX_FACTORY_ADDRESS']), 'aave.com': collect(Aave, ['AAVE_LENDING_POOL_ADDRESSES_PROVIDER_CONTRACT_ADDRESS']), diff --git a/packages/web3-shared/evm/constants/tokens.ts b/packages/web3-shared/evm/constants/tokens.ts index 1dbbc255c2d5..aabfb7a63b51 100644 --- a/packages/web3-shared/evm/constants/tokens.ts +++ b/packages/web3-shared/evm/constants/tokens.ts @@ -53,9 +53,12 @@ export const CUSD = createERC20Tokens('cUSD_ADDRESS', 'Celo Dollar', 'cUSD', 18) export const CEUR = createERC20Tokens('cEUR_ADDRESS', 'Celo Euro', 'cEUR', 18) export const JOE = createERC20Tokens('JOE_ADDRESS', 'JoeToken', 'JOE', 18) export const PNG = createERC20Tokens('PNG_ADDRESS', 'Pangolin', 'PNG', 18) +export const VERSA = createERC20Tokens('VERSA_ADDRESS', 'Versa Finance', 'VERSA', 18) export const VIPER = createERC20Tokens('VIPER_ADDRESS', 'Viper', 'VIPER', 18) export const OPENX = createERC20Tokens('OPENX_ADDRESS', 'OpenSwap Token', 'OpenX', 18) export const JEWEL = createERC20Tokens('JEWEL_ADDRESS', 'Jewels', 'JEWEL', 18) +export const YUMI = createERC20Tokens('YUMI_ADDRESS', 'YumiSwap Token', 'YUMI', 18) +export const xYUMI = createERC20Tokens('xYUMI_ADDRESS', 'Yumi Staking Token', 'xYUMI', 18) export const OP = createERC20Tokens('OP_ADDRESS', 'Optimism', 'OP', 18) export const WNATIVE = createERC20Tokens( @@ -86,5 +89,6 @@ export const WNATIVE_ONLY: ERC20AgainstToken = { [ChainId.Aurora_Testnet]: [WNATIVE[ChainId.Aurora_Testnet]], [ChainId.Optimism]: [WNATIVE[ChainId.Optimism]], [ChainId.Optimism_Goerli]: [WNATIVE[ChainId.Optimism_Goerli]], + [ChainId.Astar]: [WNATIVE[ChainId.Astar]], [ChainId.Harmony]: [WNATIVE[ChainId.Harmony]], } diff --git a/packages/web3-shared/evm/types/index.ts b/packages/web3-shared/evm/types/index.ts index 9d11bbc49c55..1171592909e5 100644 --- a/packages/web3-shared/evm/types/index.ts +++ b/packages/web3-shared/evm/types/index.ts @@ -71,6 +71,9 @@ export enum ChainId { // Conflux Conflux = 1030, + + // Astar + Astar = 592, } /** @@ -261,6 +264,7 @@ export enum NetworkType { Optimism = 'Optimism', Harmony = 'Harmony', Conflux = 'Conflux', + Astar = 'Astar', } export enum ProviderType {