diff --git a/cspell.json b/cspell.json index ab6b0b7bf5fa..dceb447bfe2f 100644 --- a/cspell.json +++ b/cspell.json @@ -13,6 +13,7 @@ "pnpm-lock.yaml" ], "words": [ + "jugglerred", "aave", "adai", "addrs", @@ -116,6 +117,7 @@ "jailbroken", "jsbi", "jsonml", + "jugglered", "juicebox", "kdfparams", "keccak", @@ -165,7 +167,10 @@ "nftscan", "nowallet", "nums", + "ongswap", + "oolongswap", "opensea", + "optmistic", "overridable", "overscan", "pageable", @@ -209,6 +214,8 @@ "sashimiswap", "scroller", "secp", + "senpai", + "senpaiswap", "serializers", "shink", "signup", @@ -223,6 +230,7 @@ "superrare", "sushiswap", "swappable", + "swapperchan", "swither", "tabindex", "tablist", @@ -252,6 +260,7 @@ "viet", "viewbox", "visualcompletion", + "waifu", "walletconnect", "wannaswap", "wault", diff --git a/docs/evm-integration.md b/docs/evm-integration.md index 7cfddfc9ecf8..402d662d10aa 100644 --- a/docs/evm-integration.md +++ b/docs/evm-integration.md @@ -93,10 +93,11 @@ Goto `chrome-extension://jkoeaghipilijlahjplgbfiocjhldnap/dashboard.html#/wallet ## Learn More -| Chain | Pull Request Link | -| --------- | ---------------------------------------------------- | -| CELO | | -| Fantom | | -| xDai | | -| Arbitrum | | -| Avalanche | | +| Chain | Pull Request Link | +| ------------ | ---------------------------------------------------- | +| CELO | | +| Fantom | | +| xDai | | +| Arbitrum | | +| Avalanche | | +| Boba Network | | diff --git a/packages/mask/package.json b/packages/mask/package.json index 31ea8ea9929e..ff862680790f 100644 --- a/packages/mask/package.json +++ b/packages/mask/package.json @@ -125,7 +125,8 @@ "web3-utils": "1.5.2", "webextension-polyfill": "^0.8.0", "z-schema": "^5.0.2", - "zod": "3.13.4" + "zod": "3.13.4", + "@ethereumjs/tx": "3.5.0" }, "devDependencies": { "@dimensiondev/webextension-shim": "0.0.3-20210823035705-4257e12", diff --git a/packages/mask/shared/flags.ts b/packages/mask/shared/flags.ts index 3a02f63f634e..6db9a97cb00f 100644 --- a/packages/mask/shared/flags.ts +++ b/packages/mask/shared/flags.ts @@ -52,6 +52,7 @@ export const Flags = { polygon_enabled: true, arbitrum_enabled: true, xdai_enabled: true, + boba_enabled: true, avalanche_enabled: true, fantom_enabled: true, flow_enabled: true, diff --git a/packages/mask/src/components/shared/ApplicationBoard.tsx b/packages/mask/src/components/shared/ApplicationBoard.tsx index bbb9c04f84f2..924817fb7338 100644 --- a/packages/mask/src/components/shared/ApplicationBoard.tsx +++ b/packages/mask/src/components/shared/ApplicationBoard.tsx @@ -109,6 +109,7 @@ const SUPPORTED_CHAIN_ID_LIST = [ ChainId.xDai, ChainId.Celo, ChainId.Fantom, + ChainId.Boba, ChainId.Aurora, ChainId.Avalanche, ] diff --git a/packages/mask/src/plugins/EVM/assets/boba.png b/packages/mask/src/plugins/EVM/assets/boba.png new file mode 100644 index 000000000000..70b8b55d4a74 Binary files /dev/null and b/packages/mask/src/plugins/EVM/assets/boba.png differ diff --git a/packages/mask/src/plugins/EVM/constants.ts b/packages/mask/src/plugins/EVM/constants.ts index 0bfa70cae48c..edb3cc7cee24 100644 --- a/packages/mask/src/plugins/EVM/constants.ts +++ b/packages/mask/src/plugins/EVM/constants.ts @@ -147,6 +147,16 @@ export const PLUGIN_NETWORKS: Web3Plugin.NetworkDescriptor[] = [ iconColor: 'rgb(73, 169, 166)', isMainnet: true, }, + { + ID: `${PLUGIN_ID}_boba`, + networkSupporterPluginID: PLUGIN_ID, + chainId: ChainId.Boba, + type: NetworkType.Boba, + name: 'Boba', + icon: new URL('./assets/boba.png', import.meta.url), + iconColor: 'rgb(53, 208, 127)', + isMainnet: true, + }, { ID: `${PLUGIN_ID}_avalanche`, networkSupporterPluginID: PLUGIN_ID, diff --git a/packages/mask/src/plugins/ITO/base.ts b/packages/mask/src/plugins/ITO/base.ts index eceee4b13b46..6f98a9034bb4 100644 --- a/packages/mask/src/plugins/ITO/base.ts +++ b/packages/mask/src/plugins/ITO/base.ts @@ -25,6 +25,7 @@ export const base: Plugin.Shared.Definition = { ChainId.Aurora, ChainId.Avalanche, ChainId.Fantom, + ChainId.Boba, ], }, }, diff --git a/packages/mask/src/plugins/RedPacket/base.ts b/packages/mask/src/plugins/RedPacket/base.ts index 5be12ed3fc1b..8fcc4bc067ce 100644 --- a/packages/mask/src/plugins/RedPacket/base.ts +++ b/packages/mask/src/plugins/RedPacket/base.ts @@ -23,6 +23,7 @@ export const base: Plugin.Shared.Definition = { ChainId.Matic, ChainId.Arbitrum, ChainId.xDai, + ChainId.Boba, ChainId.Fantom, ChainId.Avalanche, ChainId.Aurora, diff --git a/packages/mask/src/plugins/Trader/SNSAdaptor/trending/TraderView.tsx b/packages/mask/src/plugins/Trader/SNSAdaptor/trending/TraderView.tsx index 6b4807053deb..325ead3be08c 100644 --- a/packages/mask/src/plugins/Trader/SNSAdaptor/trending/TraderView.tsx +++ b/packages/mask/src/plugins/Trader/SNSAdaptor/trending/TraderView.tsx @@ -132,6 +132,7 @@ export function TraderView(props: TraderViewProps) { } = coinId ? trendingById : trendingByKeyword // #endregion + // #region swap const coinSymbol = (trending?.coin.symbol || '').toLowerCase() // #region swap diff --git a/packages/mask/src/plugins/Trader/apis/trader/index.ts b/packages/mask/src/plugins/Trader/apis/trader/index.ts index 8a6e6798b763..28f1c2b1f61e 100644 --- a/packages/mask/src/plugins/Trader/apis/trader/index.ts +++ b/packages/mask/src/plugins/Trader/apis/trader/index.ts @@ -50,9 +50,16 @@ export async function getAvailableTraderProviders(chainId: ChainId) { return [TradeProvider.SUSHISWAP] case NetworkType.Fantom: return [TradeProvider.SUSHISWAP] + case NetworkType.Boba: + return [ + TradeProvider.OPENOCEAN, + TradeProvider.DODO, + TradeProvider.OOLONGSWAP, + TradeProvider.SWAPPERCHAN, + TradeProvider.SENPAISWAP, + ] case NetworkType.Aurora: return [TradeProvider.DODO, TradeProvider.WANNASWAP, TradeProvider.TRISOLARIS] - case NetworkType.Boba: case NetworkType.Fuse: case NetworkType.Metis: case NetworkType.Optimistic: diff --git a/packages/mask/src/plugins/Trader/base.ts b/packages/mask/src/plugins/Trader/base.ts index 2c575a7ae707..40a91a671156 100644 --- a/packages/mask/src/plugins/Trader/base.ts +++ b/packages/mask/src/plugins/Trader/base.ts @@ -23,6 +23,7 @@ export const base: Plugin.Shared.Definition = { ChainId.Aurora, ChainId.Avalanche, ChainId.Fantom, + ChainId.Boba, ], }, }, diff --git a/packages/mask/src/plugins/Trader/constants/0x.ts b/packages/mask/src/plugins/Trader/constants/0x.ts index 06be52d5c29f..f7ecac177302 100644 --- a/packages/mask/src/plugins/Trader/constants/0x.ts +++ b/packages/mask/src/plugins/Trader/constants/0x.ts @@ -6,11 +6,11 @@ export const ZRX_BASE_URL: Record = { [NetworkType.Polygon]: 'https://polygon.api.0x.org/', [NetworkType.Arbitrum]: 'https://arbitrum.api.0x.org/', [NetworkType.xDai]: 'https://xdai.api.0x.org/', + [NetworkType.Boba]: 'https://boba.api.0x.org/', [NetworkType.Avalanche]: 'https://avalanche.api.0x.org/', [NetworkType.Celo]: 'https://celo.api.0x.org/', [NetworkType.Fantom]: 'https://fantom.api.0x.org/', [NetworkType.Aurora]: 'https://aurora.api.0x.org/', - [NetworkType.Boba]: '', [NetworkType.Fuse]: '', [NetworkType.Metis]: '', [NetworkType.Optimistic]: '', diff --git a/packages/mask/src/plugins/Trader/constants/dodo.ts b/packages/mask/src/plugins/Trader/constants/dodo.ts index 7996fe13525e..55cca22ca815 100644 --- a/packages/mask/src/plugins/Trader/constants/dodo.ts +++ b/packages/mask/src/plugins/Trader/constants/dodo.ts @@ -8,11 +8,11 @@ export const networkNames: Record = { [NetworkType.Polygon]: 'matic', [NetworkType.Arbitrum]: 'arbitrum', [NetworkType.xDai]: 'xdai', + [NetworkType.Boba]: 'boba', [NetworkType.Avalanche]: 'avalanche', [NetworkType.Celo]: 'celo', [NetworkType.Fantom]: 'fantom', [NetworkType.Aurora]: 'aurora', - [NetworkType.Boba]: '', [NetworkType.Fuse]: '', [NetworkType.Metis]: '', [NetworkType.Optimistic]: '', diff --git a/packages/mask/src/plugins/Trader/constants/index.ts b/packages/mask/src/plugins/Trader/constants/index.ts index 9f89799a8a2d..a057d3f91b14 100644 --- a/packages/mask/src/plugins/Trader/constants/index.ts +++ b/packages/mask/src/plugins/Trader/constants/index.ts @@ -9,6 +9,9 @@ export * from './quickswap' export * from './pancakeswap' export * from './dodo' export * from './bancor' +export * from './oolongswap' +export * from './swapperchan' +export * from './senpaiswap' export * from './traderjoe' export * from './pangolindex' export * from './wannaswap' diff --git a/packages/mask/src/plugins/Trader/constants/jugglerred.ts b/packages/mask/src/plugins/Trader/constants/jugglerred.ts new file mode 100644 index 000000000000..9ce8633e4f9e --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/jugglerred.ts @@ -0,0 +1,13 @@ +import { ChainId, DAI, USDC, USDT, WBTC, 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 JUGGLERRED_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const JUGGLERRED_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Optimistic]: [WNATIVE, DAI, USDC, USDT, WBTC].map((x) => x[ChainId.Optimistic]), +} diff --git a/packages/mask/src/plugins/Trader/constants/oolongswap.ts b/packages/mask/src/plugins/Trader/constants/oolongswap.ts new file mode 100644 index 000000000000..21855a0bcdc8 --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/oolongswap.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WBTC, WNATIVE, OLO, BOBA, 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 OOLONGSWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const OOLONGSWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, OLO, BOBA].map((x) => x[ChainId.Boba]), +} diff --git a/packages/mask/src/plugins/Trader/constants/openocean.ts b/packages/mask/src/plugins/Trader/constants/openocean.ts index 862e158999b1..e5e33273e605 100644 --- a/packages/mask/src/plugins/Trader/constants/openocean.ts +++ b/packages/mask/src/plugins/Trader/constants/openocean.ts @@ -10,9 +10,9 @@ export const networkNames: Record = { [NetworkType.xDai]: 'xdai', [NetworkType.Celo]: 'celo', [NetworkType.Fantom]: 'fantom', + [NetworkType.Boba]: 'boba', [NetworkType.Avalanche]: 'avalanche', [NetworkType.Aurora]: 'aurora', - [NetworkType.Boba]: '', [NetworkType.Fuse]: '', [NetworkType.Metis]: '', [NetworkType.Optimistic]: '', diff --git a/packages/mask/src/plugins/Trader/constants/senpaiswap.ts b/packages/mask/src/plugins/Trader/constants/senpaiswap.ts new file mode 100644 index 000000000000..f7fc8f70d022 --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/senpaiswap.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WBTC, WNATIVE, SENPAI, BOBA, 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 SENPAISWAP_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const SENPAISWAP_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, SENPAI, BOBA].map((x) => x[ChainId.Boba]), +} diff --git a/packages/mask/src/plugins/Trader/constants/swapperchan.ts b/packages/mask/src/plugins/Trader/constants/swapperchan.ts new file mode 100644 index 000000000000..1a909f773bda --- /dev/null +++ b/packages/mask/src/plugins/Trader/constants/swapperchan.ts @@ -0,0 +1,13 @@ +import { ChainId, USDC, USDT, WBTC, WNATIVE, WAIFU, BOBA, 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 SWAPPERCHAN_CUSTOM_BASES: ERC20TokenCustomizedBase = {} + +export const SWAPPERCHAN_BASE_AGAINST_TOKENS: ERC20AgainstToken = { + ...WNATIVE_ONLY, + [ChainId.Boba]: [WNATIVE, USDC, USDT, WBTC, WAIFU, BOBA].map((x) => x[ChainId.Boba]), +} diff --git a/packages/mask/src/plugins/Trader/pipes.ts b/packages/mask/src/plugins/Trader/pipes.ts index d04f1b973f57..90da760a7a77 100644 --- a/packages/mask/src/plugins/Trader/pipes.ts +++ b/packages/mask/src/plugins/Trader/pipes.ts @@ -35,7 +35,10 @@ export const resolveTradeProviderName = createLookupTableResolver | null, tradeProvider?: TradeProvider, @@ -122,29 +132,40 @@ export function useTradeCallback( bestCallOption = firstNoErrorCall } - return new Promise(async (resolve, reject) => { - if (!bestCallOption) { - setTradeState({ - type: TransactionStateType.FAILED, - error: new Error('Bad call options.'), - }) - return - } + // check if optimistic network + if (SUPPORTED_OPTMISTIC_CHAIN_ID_LIST && !!TradeProvider.OPENOCEAN && !!TradeProvider.DODO) { + return new Promise(async (resolve, reject) => { + if (!bestCallOption) { + setTradeState({ + type: TransactionStateType.FAILED, + error: new Error('Bad call options.'), + }) + return + } - const { - call: { address, calldata, value }, - } = bestCallOption + const { + call: { address, calldata, value }, + } = bestCallOption - web3.eth.sendTransaction( - { + const rawTx = { from: account, to: address, data: calldata, - ...('gasEstimate' in bestCallOption ? { gas: bestCallOption.gasEstimate.toFixed() } : {}), + ...('gasEstimate' in bestCallOption + ? { + gas: bestCallOption.gasEstimate.toFixed(), + maxFeePerGas: gasConfig?.maxFeePerGas, + maxPriorityFeePerGas: gasConfig?.maxPriorityFeePerGas, + } + : {}), ...(!value || /^0x0*$/.test(value) ? {} : { value }), - ...gasConfig, - }, - async (error, hash) => { + } + + const tx = FeeMarketEIP1559Transaction.fromTxData(rawTx) + const serializedTx = tx.serialize() + const signedTransaction = await web3.eth.sign('0x' + serializedTx.toString('hex'), account) + + web3.eth.sendSignedTransaction(signedTransaction, async (error, hash) => { if (error) { if ((error as any)?.code) { const error_ = new Error( @@ -170,9 +191,61 @@ export function useTradeCallback( }) resolve(hash) } - }, - ) - }) + }) + }) + } else { + return new Promise(async (resolve, reject) => { + if (!bestCallOption) { + setTradeState({ + type: TransactionStateType.FAILED, + error: new Error('Bad call options.'), + }) + return + } + + const { + call: { address, calldata, value }, + } = bestCallOption + + web3.eth.sendTransaction( + { + from: account, + to: address, + data: calldata, + ...('gasEstimate' in bestCallOption ? { gas: bestCallOption.gasEstimate.toFixed() } : {}), + ...(!value || /^0x0*$/.test(value) ? {} : { value }), + ...gasConfig, + }, + async (error, hash) => { + if (error) { + if ((error as any)?.code) { + const error_ = new Error( + (error as any)?.message === 'Unable to add more requests.' + ? 'Unable to add more requests.' + : 'Transaction rejected.', + ) + setTradeState({ + type: TransactionStateType.FAILED, + error: error_, + }) + reject(error_) + } else { + setTradeState({ + type: TransactionStateType.FAILED, + error: new Error(`Swap failed: ${swapErrorToUserReadableMessage(error)}`), + }) + } + } else { + setTradeState({ + type: TransactionStateType.HASH, + hash: hash, + }) + resolve(hash) + } + }, + ) + }) + } }, [web3, account, tradeParameters, gasConfig]) const resetCallback = useCallback(() => { diff --git a/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts b/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts index 0479fdd0dd1e..d481298e3e23 100644 --- a/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts +++ b/packages/mask/src/plugins/Trader/trader/useAllTradeComputed.ts @@ -198,6 +198,26 @@ export function useAllTradeComputed( traderEstimateGas: wannaSwapEstimateGas, } = useUniswapV2Like(tradeProviders, TradeProvider.WANNASWAP, inputAmount_, inputToken, outputToken) + // OolongSwap + const { + trader_: oolongswap_, + trader: oolongswap, + traderEstimateGas: oolongswapEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.OOLONGSWAP, inputAmount_, inputToken, outputToken) + + // SwapperChan + const { + trader_: swapperchan_, + trader: swapperchan, + traderEstimateGas: swapperchanEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.SWAPPERCHAN, inputAmount_, inputToken, outputToken) + + // SenpaiSwap + const { + trader_: senpaiswap_, + trader: senpaiswap, + traderEstimateGas: senpaiswapEstimateGas, + } = useUniswapV2Like(tradeProviders, TradeProvider.SENPAISWAP, inputAmount_, inputToken, outputToken) // Mdex const { trader_: mdex_, @@ -221,6 +241,9 @@ export function useAllTradeComputed( { provider: TradeProvider.OPENOCEAN, ...openocean_, value: openocean, gas: openoceanSwapEstimateGas }, { provider: TradeProvider.WANNASWAP, ...wannaswap_, value: wannaswap, gas: wannaSwapEstimateGas }, { provider: TradeProvider.TRISOLARIS, ...trisolaris_, value: trisolaris, gas: trisolarisEstimateGas }, + { provider: TradeProvider.OOLONGSWAP, ...oolongswap_, value: oolongswap, gas: oolongswapEstimateGas }, + { provider: TradeProvider.SWAPPERCHAN, ...swapperchan_, value: swapperchan, gas: swapperchanEstimateGas }, + { provider: TradeProvider.SENPAISWAP, ...senpaiswap_, value: senpaiswap, gas: senpaiswapEstimateGas }, { provider: TradeProvider.MDEX, ...mdex_, value: mdex, gas: mdexEstimateGas }, ] diff --git a/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts b/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts index 122a42570f09..2fb17972a429 100644 --- a/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts +++ b/packages/mask/src/plugins/Trader/trader/useGetTradeContext.ts @@ -13,6 +13,12 @@ import { SUSHISWAP_CUSTOM_BASES, UNISWAP_BASE_AGAINST_TOKENS, UNISWAP_CUSTOM_BASES, + OOLONGSWAP_BASE_AGAINST_TOKENS, + OOLONGSWAP_CUSTOM_BASES, + SWAPPERCHAN_BASE_AGAINST_TOKENS, + SWAPPERCHAN_CUSTOM_BASES, + SENPAISWAP_BASE_AGAINST_TOKENS, + SENPAISWAP_CUSTOM_BASES, TRADERJOE_BASE_AGAINST_TOKENS, TRADERJOE_CUSTOM_BASES, PANGOLIN_BASE_AGAINST_TOKENS, @@ -104,6 +110,42 @@ export function useGetTradeContext(tradeProvider?: TradeProvider) { ADDITIONAL_TOKENS: {}, CUSTOM_TOKENS: PANCAKESWAP_CUSTOM_BASES, } + case TradeProvider.OOLONGSWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.OOLONGSWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.OOLONGSWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.OOLONGSWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.OOLONGSWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: OOLONGSWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: OOLONGSWAP_CUSTOM_BASES, + } + case TradeProvider.SWAPPERCHAN: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.SWAPPERCHAN_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.SWAPPERCHAN_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.SWAPPERCHAN_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.SWAPPERCHAN_FACTORY_ADDRESS, + AGAINST_TOKENS: SWAPPERCHAN_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: SWAPPERCHAN_CUSTOM_BASES, + } + case TradeProvider.SENPAISWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.SENPAISWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.SENPAISWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.SENPAISWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.SENPAISWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: SENPAISWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: SENPAISWAP_CUSTOM_BASES, + } case TradeProvider.TRADERJOE: return { TYPE: tradeProvider, diff --git a/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts b/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts index 1f45f7b22380..f83e1765dcbb 100644 --- a/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts +++ b/packages/mask/src/plugins/Trader/trader/useTradeCallback.ts @@ -90,6 +90,12 @@ export function useTradeCallback( return uniswapV3Like case TradeProvider.SUSHISWAP: return uniswapV2Like + case TradeProvider.OOLONGSWAP: + return uniswapV2Like + case TradeProvider.SWAPPERCHAN: + return uniswapV2Like + case TradeProvider.SENPAISWAP: + return uniswapV2Like case TradeProvider.SASHIMISWAP: return uniswapV2Like case TradeProvider.QUICKSWAP: diff --git a/packages/mask/src/plugins/Trader/trader/useTradeContext.ts b/packages/mask/src/plugins/Trader/trader/useTradeContext.ts index f7c178b17548..b117804ae99c 100644 --- a/packages/mask/src/plugins/Trader/trader/useTradeContext.ts +++ b/packages/mask/src/plugins/Trader/trader/useTradeContext.ts @@ -11,6 +11,12 @@ import { SASHIMISWAP_CUSTOM_BASES, SUSHISWAP_BASE_AGAINST_TOKENS, SUSHISWAP_CUSTOM_BASES, + OOLONGSWAP_BASE_AGAINST_TOKENS, + OOLONGSWAP_CUSTOM_BASES, + SWAPPERCHAN_BASE_AGAINST_TOKENS, + SWAPPERCHAN_CUSTOM_BASES, + SENPAISWAP_BASE_AGAINST_TOKENS, + SENPAISWAP_CUSTOM_BASES, UNISWAP_BASE_AGAINST_TOKENS, UNISWAP_CUSTOM_BASES, TRADERJOE_BASE_AGAINST_TOKENS, @@ -106,6 +112,42 @@ export function useTradeContext(tradeProvider: TradeProvider) { ADDITIONAL_TOKENS: {}, CUSTOM_TOKENS: PANCAKESWAP_CUSTOM_BASES, } + case TradeProvider.OOLONGSWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.OOLONGSWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.OOLONGSWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.OOLONGSWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.OOLONGSWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: OOLONGSWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: OOLONGSWAP_CUSTOM_BASES, + } + case TradeProvider.SWAPPERCHAN: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.SWAPPERCHAN_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.SWAPPERCHAN_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.SWAPPERCHAN_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.SWAPPERCHAN_FACTORY_ADDRESS, + AGAINST_TOKENS: SWAPPERCHAN_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: SWAPPERCHAN_CUSTOM_BASES, + } + case TradeProvider.SENPAISWAP: + return { + TYPE: tradeProvider, + IS_UNISWAP_V2_LIKE: true, + GRAPH_API: DEX_TRADE.SENPAISWAP_THEGRAPH, + INIT_CODE_HASH: DEX_TRADE.SENPAISWAP_INIT_CODE_HASH, + ROUTER_CONTRACT_ADDRESS: DEX_TRADE.SENPAISWAP_ROUTER_ADDRESS, + FACTORY_CONTRACT_ADDRESS: DEX_TRADE.SENPAISWAP_FACTORY_ADDRESS, + AGAINST_TOKENS: SENPAISWAP_BASE_AGAINST_TOKENS, + ADDITIONAL_TOKENS: {}, + CUSTOM_TOKENS: SENPAISWAP_CUSTOM_BASES, + } case TradeProvider.WANNASWAP: return { TYPE: tradeProvider, diff --git a/packages/mask/src/plugins/Trader/types/trader.ts b/packages/mask/src/plugins/Trader/types/trader.ts index 7b93d13ef58d..c9604fe040dd 100644 --- a/packages/mask/src/plugins/Trader/types/trader.ts +++ b/packages/mask/src/plugins/Trader/types/trader.ts @@ -71,6 +71,9 @@ export enum ZrxTradePool { UniswapV3 = 'Uniswap_V3', WaultSwap = 'WaultSwap', xSigma = 'xSigma', + OolongSwap = 'OolongSwap', + SwapperChan = 'SwapperChan', + SenpaiSwap = 'SenpaiSwap', TraderJoe = 'TraderJoe', PangolinDex = 'PangolinDex', Trisolaris = 'Trisolaris', diff --git a/packages/mask/src/plugins/UnlockProtocol/base.ts b/packages/mask/src/plugins/UnlockProtocol/base.ts index b6be16f2bda6..5b9070d8781e 100644 --- a/packages/mask/src/plugins/UnlockProtocol/base.ts +++ b/packages/mask/src/plugins/UnlockProtocol/base.ts @@ -14,7 +14,7 @@ export const base: Plugin.Shared.Definition = { target: 'insider', web3: { [NetworkPluginID.PLUGIN_EVM]: { - supportedChainIds: [ChainId.Mainnet, ChainId.xDai, ChainId.Matic, ChainId.Rinkeby], + supportedChainIds: [ChainId.Mainnet, ChainId.xDai, ChainId.Matic, ChainId.Rinkeby, ChainId.Boba], }, }, }, diff --git a/packages/mask/src/plugins/UnlockProtocol/constants.ts b/packages/mask/src/plugins/UnlockProtocol/constants.ts index bdeb320043f3..fb2d845d9322 100644 --- a/packages/mask/src/plugins/UnlockProtocol/constants.ts +++ b/packages/mask/src/plugins/UnlockProtocol/constants.ts @@ -12,7 +12,9 @@ export const graphEndpointKeyVal = { [ChainId.Rinkeby]: 'https://api.thegraph.com/subgraphs/name/unlock-protocol/unlock-rinkeby', [ChainId.xDai]: 'https://api.thegraph.com/subgraphs/name/unlock-protocol/xdai', [ChainId.Matic]: 'https://api.thegraph.com/subgraphs/name/unlock-protocol/polygon', + [ChainId.Boba]: 'https://api.thegraph.com/subgraphs/name/unlock-protocol/boba', [ChainId.Avalanche]: '', + [ChainId.Boba]: '', } export const keyServerEndpoint = 'https://unlock.r2d2.to/' diff --git a/packages/mask/src/plugins/Wallet/services/account.ts b/packages/mask/src/plugins/Wallet/services/account.ts index 2b3759fc6beb..fc68783987dd 100644 --- a/packages/mask/src/plugins/Wallet/services/account.ts +++ b/packages/mask/src/plugins/Wallet/services/account.ts @@ -124,6 +124,7 @@ export async function getSupportedNetworks() { Flags.polygon_enabled ? NetworkType.Polygon : undefined, Flags.arbitrum_enabled ? NetworkType.Arbitrum : undefined, Flags.xdai_enabled ? NetworkType.xDai : undefined, + Flags.boba_enabled ? NetworkType.Boba : undefined, Flags.celo_enabled ? NetworkType.Celo : undefined, Flags.fantom_enabled ? NetworkType.Fantom : undefined, Flags.avalanche_enabled ? NetworkType.Avalanche : undefined, diff --git a/packages/mask/src/plugins/Wallet/services/assets.ts b/packages/mask/src/plugins/Wallet/services/assets.ts index 8cb0df11296f..57296e8746df 100644 --- a/packages/mask/src/plugins/Wallet/services/assets.ts +++ b/packages/mask/src/plugins/Wallet/services/assets.ts @@ -107,7 +107,7 @@ export async function getAssetsList( // xdai-assets is not support const scopes = network ? [resolveZerionAssetsScopeName(network)] - : ['assets', 'bsc-assets', 'polygon-assets', 'arbitrum-assets', 'avalanche-assets'] + : ['assets', 'bsc-assets', 'polygon-assets', 'arbitrum-assets', 'avalanche-assets', 'boba-assets'] for (const scope of scopes) { const { meta, payload } = await ZerionAPI.getAssetsList(address, scope) if (meta.status !== 'ok') throw new Error('Fail to load assets.') diff --git a/packages/mask/src/resources/OolongIcon.tsx b/packages/mask/src/resources/OolongIcon.tsx new file mode 100644 index 000000000000..817619a36928 --- /dev/null +++ b/packages/mask/src/resources/OolongIcon.tsx @@ -0,0 +1,24 @@ +import { SvgIconProps, SvgIcon } from '@mui/material' + +const svg = ( + // todo add oolongswap svg logo + + + + + + + + + + + + +) + +export function OolongIcon(props: SvgIconProps) { + return {svg} +} diff --git a/packages/mask/src/resources/senpaiswap.png b/packages/mask/src/resources/senpaiswap.png new file mode 100644 index 000000000000..c6dd434eca16 Binary files /dev/null and b/packages/mask/src/resources/senpaiswap.png differ diff --git a/packages/mask/src/resources/swapperchan.png b/packages/mask/src/resources/swapperchan.png new file mode 100644 index 000000000000..03040cf6f98e Binary files /dev/null and b/packages/mask/src/resources/swapperchan.png differ diff --git a/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts new file mode 100644 index 000000000000..d748bc315055 --- /dev/null +++ b/packages/maskbook/src/plugins/Trader/trader/useTradeComputed.ts @@ -0,0 +1,164 @@ +import { useContext } from 'react' +import BigNumber from 'bignumber.js' +import { FungibleTokenDetailed } from '@masknet/web3-shared-evm' +import { rightShift } from '@masknet/web3-shared-base/utils/number' +import type { TradeStrategy } from '../types' +import { useTrade as useNativeTokenTrade } from './native/useTrade' +import { useTradeComputed as useNativeTokenTradeComputed } from './native/useTradeComputed' +import { useV2Trade as useUniswapV2Trade, useV3Trade as useUniswapV3Trade } from './uniswap/useTrade' +import { useTradeComputed as useUniswapTradeComputed } from './uniswap/useTradeComputed' +import { useTradeComputed as useZrxTradeComputed } from './0x/useTradeComputed' +import { useTradeComputed as useBalancerTradeComputed } from './balancer/useTradeComputed' +import { useTradeComputed as useDODOTradeComputed } from './dodo/useTradeComputed' +import { useTradeComputed as useBancorTradeComputed } from './bancor/useTradeComputed' +import { useTrade as useZrxTrade } from './0x/useTrade' +import { useTrade as useBalancerTrade } from './balancer/useTrade' +import { useTrade as useDODOTrade } from './dodo/useTrade' +import { useTrade as useBancorTrade } from './bancor/useTrade' + +import { unreachable } from '@dimensiondev/kit' +import { TradeProvider } from '@masknet/public-api' +import { TradeContext } from './useTradeContext' + +export function useTradeComputed( + provider: TradeProvider, + strategy: TradeStrategy, + inputAmount: BigNumber.Value = '0', + outputAmount: BigNumber.Value = '0', + inputToken?: FungibleTokenDetailed, + outputToken?: FungibleTokenDetailed, +) { + inputAmount = rightShift(inputAmount, inputToken?.decimals ?? 0) + .integerValue() + .toFixed() + outputAmount = rightShift(outputAmount, outputToken?.decimals ?? 0) + .integerValue() + .toFixed() + + // trade context + const context = useContext(TradeContext) + + // NATIVE-WNATIVE pair + const nativeToken_ = useNativeTokenTrade(inputToken, outputToken) + const nativeToken = useNativeTokenTradeComputed( + nativeToken_.value ?? false, + strategy, + inputAmount, + outputAmount, + inputToken, + outputToken, + ) + + // uniswap-v2 like providers + const uniswapV2_ = useUniswapV2Trade( + strategy, + context?.IS_UNISWAP_V2_LIKE ? inputAmount : '0', + context?.IS_UNISWAP_V2_LIKE ? outputAmount : '0', + inputToken, + outputToken, + ) + const uniswapV2 = useUniswapTradeComputed(uniswapV2_.value, inputToken, outputToken) + + // uniswap-v3 like providers + const uniswapV3_ = useUniswapV3Trade( + strategy, + context?.IS_UNISWAP_V3_LIKE ? inputAmount : '0', + context?.IS_UNISWAP_V3_LIKE ? outputAmount : '0', + inputToken, + outputToken, + ) + const uniswapV3 = useUniswapTradeComputed(uniswapV3_.value, inputToken, outputToken) + + // zrx + const zrx_ = useZrxTrade( + strategy, + provider === TradeProvider.ZRX ? inputAmount : '0', + provider === TradeProvider.ZRX ? outputAmount : '0', + inputToken, + outputToken, + ) + const zrx = useZrxTradeComputed(zrx_.value ?? null, strategy, inputToken, outputToken) + + // balancer + const balancer_ = useBalancerTrade( + strategy, + provider === TradeProvider.BALANCER ? inputAmount : '0', + provider === TradeProvider.BALANCER ? outputAmount : '0', + inputToken, + outputToken, + ) + const balancer = useBalancerTradeComputed( + balancer_.value ?? null, + strategy, + provider === TradeProvider.BALANCER ? inputAmount : '0', + provider === TradeProvider.BALANCER ? outputAmount : '0', + inputToken, + outputToken, + ) + + // dodo + const dodo_ = useDODOTrade( + strategy, + provider === TradeProvider.DODO ? inputAmount : '0', + provider === TradeProvider.DODO ? outputAmount : '0', + inputToken, + outputToken, + ) + const dodo = useDODOTradeComputed(dodo_.value ?? null, strategy, inputToken, outputToken) + + const bancor_ = useBancorTrade( + strategy, + provider === TradeProvider.BANCOR ? inputAmount : '0', + provider === TradeProvider.BANCOR ? outputAmount : '0', + inputToken, + outputToken, + ) + + const bancor = useBancorTradeComputed(bancor_.value ?? null, strategy, inputToken, outputToken) + + if (nativeToken_.value) + return { + ...nativeToken_, + value: nativeToken, + } + + switch (provider) { + case TradeProvider.UNISWAP_V2: + case TradeProvider.SUSHISWAP: + case TradeProvider.OOLONGSWAP: + case TradeProvider.SASHIMISWAP: + case TradeProvider.QUICKSWAP: + case TradeProvider.PANCAKESWAP: + return { + ...uniswapV2_, + value: uniswapV2, + } + case TradeProvider.UNISWAP_V3: + return { + ...uniswapV3_, + value: uniswapV3, + } + case TradeProvider.ZRX: + return { + ...zrx_, + value: zrx, + } + case TradeProvider.BALANCER: + return { + ...balancer_, + value: balancer, + } + case TradeProvider.DODO: + return { + ...dodo_, + value: dodo, + } + case TradeProvider.BANCOR: + return { + ...bancor_, + value: bancor, + } + default: + unreachable(provider) + } +} diff --git a/packages/maskbook/src/plugins/Wallet/apis/debank.ts b/packages/maskbook/src/plugins/Wallet/apis/debank.ts new file mode 100644 index 000000000000..58c6c8f434fd --- /dev/null +++ b/packages/maskbook/src/plugins/Wallet/apis/debank.ts @@ -0,0 +1,37 @@ +import type { BalanceListResponse, HistoryResponse, GasPriceDictResponse } from '../types' +import urlcat from 'urlcat' +import { ChainId } from '@masknet/web3-shared-evm' + +const DEBANK_API = 'https://api.debank.com' + +export async function getTransactionList(address: string, chain: string): Promise { + const response = await fetch(urlcat(DEBANK_API, '/history/list', { user_addr: address.toLowerCase(), chain })) + return response.json() +} + +export async function getAssetsList(address: string): Promise { + const response = await fetch(DEBANK_API, '/token/balance_list', { is_all: true, user_addr: address.toLowerCase() }) + return response.json() +} + +const chainIdMap: Record = { + [ChainId.Mainnet]: 'eth', + [ChainId.BSC]: 'bsc', + [ChainId.xDai]: 'xdai', + [ChainId.Matic]: 'matic', + [ChainId.Arbitrum]: 'arb', + [ChainId.Boba]: 'boba', +} + +const getDebankChain = (chainId: ChainId) => { + return chainIdMap[chainId] ?? '' +} + +export async function getGasPriceDict(chainId: ChainId) { + const chain = getDebankChain(chainId) + const response = await fetch(urlcat(DEBANK_API, '/chain/gas_price_dict_v2', { chain })) + const result: GasPriceDictResponse = await response.json() + if (result.error_code === 0) { + return result + } +} diff --git a/packages/maskbook/src/plugins/Wallet/pipes/index.ts b/packages/maskbook/src/plugins/Wallet/pipes/index.ts new file mode 100644 index 000000000000..6e9f277e9b92 --- /dev/null +++ b/packages/maskbook/src/plugins/Wallet/pipes/index.ts @@ -0,0 +1,84 @@ +import { unreachable } from '@dimensiondev/kit' +import { + ChainId, + createLookupTableResolver, + FilterTransactionType, + NetworkType, + PortfolioProvider, +} from '@masknet/web3-shared-evm' +import type { SocketRequestAssetScope } from '../types' + +export function resolvePortfolioDataProviderName(provider: PortfolioProvider) { + switch (provider) { + case PortfolioProvider.ZERION: + return 'Zerion' + case PortfolioProvider.DEBANK: + return 'Debank' + default: + unreachable(provider) + } +} + +export function resolveDebankTransactionType(category: string) { + switch (category) { + case 'send': + return FilterTransactionType.SEND + case 'receive': + return FilterTransactionType.RECEIVE + default: + return FilterTransactionType.ALL + } +} + +export const resolveDebankChainName = createLookupTableResolver( + { + [NetworkType.Ethereum]: 'eth', + [NetworkType.Binance]: 'bsc', + [NetworkType.Polygon]: 'matic', + [NetworkType.Arbitrum]: 'arbitrum', + [NetworkType.xDai]: 'xdai', + [NetworkType.Boba]: 'boba', + }, + '', +) + +export const resolveZerionAssetsScopeName = createLookupTableResolver( + { + [NetworkType.Ethereum]: 'assets', + [NetworkType.Binance]: 'bsc-assets', + [NetworkType.Polygon]: 'polygon-assets', + [NetworkType.Arbitrum]: 'arbitrum-assets', + [NetworkType.xDai]: 'xdai-assets', + [NetworkType.Boba]: 'boba-assets', + }, + '', +) + +export const resolveZerionTransactionsScopeName = createLookupTableResolver( + { + [NetworkType.Ethereum]: 'transactions', + [NetworkType.Binance]: 'bsc-transactions', + [NetworkType.Polygon]: 'polygon-transactions', + [NetworkType.Arbitrum]: 'arbitrum-transactions', + [NetworkType.xDai]: 'xdai-transactions', + [NetworkType.Boba]: 'boba-transactions', + }, + '', +) + +export const resolveChainByScope = createLookupTableResolver< + SocketRequestAssetScope, + { + chain: string + chainId?: ChainId + } +>( + { + assets: { chain: 'eth', chainId: ChainId.Mainnet }, + 'bsc-assets': { chain: 'bsc', chainId: ChainId.BSC }, + 'polygon-assets': { chain: 'matic', chainId: ChainId.Matic }, + }, + { + chain: 'unknown', + }, +) diff --git a/packages/public-api/src/web.ts b/packages/public-api/src/web.ts index 9c872e048491..2cd7ce394977 100644 --- a/packages/public-api/src/web.ts +++ b/packages/public-api/src/web.ts @@ -217,6 +217,9 @@ export enum TradeProvider { TRADERJOE = 13, PANGOLIN = 14, MDEX = 15, + OOLONGSWAP = 16, + SWAPPERCHAN = 17, + SENPAISWAP = 18, } /** Supported language settings */ export enum LanguageOptions { diff --git a/packages/web3-constants/compile-constants.ts b/packages/web3-constants/compile-constants.ts index cafdb8aa29af..f0f52bee6e08 100644 --- a/packages/web3-constants/compile-constants.ts +++ b/packages/web3-constants/compile-constants.ts @@ -53,6 +53,8 @@ compileConstants(path.join(__dirname, 'evm'), [ 'Arbitrum', 'Arbitrum_Rinkeby', 'xDai', + 'Boba', + 'Boba_Rinkeby', 'Avalanche', 'Avalanche_Fuji', 'Celo', diff --git a/packages/web3-constants/evm/airdrop.json b/packages/web3-constants/evm/airdrop.json index ab949267d4f5..cecafcf928fc 100644 --- a/packages/web3-constants/evm/airdrop.json +++ b/packages/web3-constants/evm/airdrop.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/artblocks.json b/packages/web3-constants/evm/artblocks.json index b626e1dae9f6..8e9d73912f08 100644 --- a/packages/web3-constants/evm/artblocks.json +++ b/packages/web3-constants/evm/artblocks.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/coingecko.json b/packages/web3-constants/evm/coingecko.json index 6f3add83afa9..3d297676fc59 100644 --- a/packages/web3-constants/evm/coingecko.json +++ b/packages/web3-constants/evm/coingecko.json @@ -12,6 +12,8 @@ "Arbitrum": "arbitrum-one", "Arbitrum_Rinkeby": "", "xDai": "xdai", + "Boba": "boba", + "Boba_Rinkeby": "", "Avalanche": "avalanche", "Avalanche_Fuji": "", "Celo": "celo", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "xdai", + "Boba": "ethereum", + "Boba_Rinkeby": "", "Avalanche": "avalanche-2", "Avalanche_Fuji": "", "Celo": "celo", diff --git a/packages/web3-constants/evm/coinmarketcap.json b/packages/web3-constants/evm/coinmarketcap.json index ffd32861a9a2..d4e6fffcf9bc 100644 --- a/packages/web3-constants/evm/coinmarketcap.json +++ b/packages/web3-constants/evm/coinmarketcap.json @@ -12,6 +12,8 @@ "Arbitrum": "11841", "Arbitrum_Rinkeby": "", "xDai": "5601", + "Boba": "288", + "Boba_Rinkeby": "", "Avalanche": "43114", "Avalanche_Fuji": "", "Celo": "5567", diff --git a/packages/web3-constants/evm/cryptoartai.json b/packages/web3-constants/evm/cryptoartai.json index edde7f04abdc..85141e6838f6 100644 --- a/packages/web3-constants/evm/cryptoartai.json +++ b/packages/web3-constants/evm/cryptoartai.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/debank.json b/packages/web3-constants/evm/debank.json index 070df0c683df..e12528bc21ba 100644 --- a/packages/web3-constants/evm/debank.json +++ b/packages/web3-constants/evm/debank.json @@ -12,6 +12,8 @@ "Arbitrum": "arb", "Arbitrum_Rinkeby": "", "xDai": "xdai", + "Boba": "boba", + "Boba_Rinkeby": "", "Avalanche": "avax", "Avalanche_Fuji": "", "Celo": "celo", diff --git a/packages/web3-constants/evm/dhedge.json b/packages/web3-constants/evm/dhedge.json index 870f99083e7f..207821605dd8 100644 --- a/packages/web3-constants/evm/dhedge.json +++ b/packages/web3-constants/evm/dhedge.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/ethereum.json b/packages/web3-constants/evm/ethereum.json index f4ca94106031..6b5ad12c68de 100644 --- a/packages/web3-constants/evm/ethereum.json +++ b/packages/web3-constants/evm/ethereum.json @@ -12,6 +12,8 @@ "Arbitrum": "0xAb7B1bE4233A04e5C43a810E75657ECED8E5463B", "Arbitrum_Rinkeby": "0xF98dC9391273c5ab9fa2c980A8d4F875ece802db", "xDai": "0x96c7D011cdFD467f551605f0f5Fce279F86F4186", + "Boba": "0xAe5C53294003f72B27CEF476680979453193673d", + "Boba_Rinkeby": "0x2690906609A9AF3bF08B8384CD9A0F97A88A7E9c", "Avalanche": "0xC119574D5Fb333F5AC018658D4d8b5035E16bf39", "Avalanche_Fuji": "", "Celo": "0x8e28F1d64ceD52b9A09aB1AA3071Aa3c05802d1F", @@ -32,6 +34,8 @@ "Arbitrum": "0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB", "Arbitrum_Rinkeby": "0xa501c031958F579dB7676fF1CE78AD305794d579", "xDai": "0xAb7B1bE4233A04e5C43a810E75657ECED8E5463B", + "Boba": "0x6cc1b1058F9153358278C35E0b2D382f1585854B", + "Boba_Rinkeby": "0x6cc1b1058F9153358278C35E0b2D382f1585854B", "Avalanche": "0x6cc1b1058F9153358278C35E0b2D382f1585854B", "Avalanche_Fuji": "", "Celo": "0x072453AdEC16cFC7FB6Af1517c3f25407180cccC", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -72,6 +78,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/explorer.json b/packages/web3-constants/evm/explorer.json index a3c5bf0d117e..ca409809b496 100644 --- a/packages/web3-constants/evm/explorer.json +++ b/packages/web3-constants/evm/explorer.json @@ -12,6 +12,8 @@ "Arbitrum": ["BE8VU1P9FUKRT15FBHKQMU84829VITWWF2"], "Arbitrum_Rinkeby": [], "xDai": [], + "Boba": [], + "Boba_Rinkeby": [], "Avalanche": [], "Avalanche_Fuji": [], "Celo": [], @@ -32,6 +34,8 @@ "Arbitrum": "https://api.arbiscan.io/api", "Arbitrum_Rinkeby": "", "xDai": "https://blockscout.com/xdai/mainnet/api", + "Boba": "https://blockexplorer.boba.network/api", + "Boba_Rinkeby": "", "Avalanche": "https://api.snowtrace.io/api", "Avalanche_Fuji": "https://api-testnet.snowtrace.io/api", "Celo": "https://explorer.celo.org/api", diff --git a/packages/web3-constants/evm/gitcoin.json b/packages/web3-constants/evm/gitcoin.json index 708e296ea6de..abb676bf10f2 100644 --- a/packages/web3-constants/evm/gitcoin.json +++ b/packages/web3-constants/evm/gitcoin.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -72,11 +78,13 @@ "Arbitrum": 5, "Arbitrum_Rinkeby": 5, "xDai": 5, + "Boba": 5, + "Boba_Rinkeby": 0, "Avalanche": 5, "Avalanche_Fuji": 0, - "Celo": 0, - "Fantom": 0, - "Aurora": 0, + "Celo": 5, + "Fantom": 5, + "Aurora": 5, "Aurora_Testnet": 0 } } diff --git a/packages/web3-constants/evm/good-ghosting.json b/packages/web3-constants/evm/good-ghosting.json index e54f1e6ba1bf..b8f7fdb5d8fb 100644 --- a/packages/web3-constants/evm/good-ghosting.json +++ b/packages/web3-constants/evm/good-ghosting.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/ito.json b/packages/web3-constants/evm/ito.json index f0cbea49edfb..e3124adeb9ba 100644 --- a/packages/web3-constants/evm/ito.json +++ b/packages/web3-constants/evm/ito.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "0x97369fEE7db34E0BfE47861f2ec44b4378d13eB4", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "0x71834a3FDeA3E70F14a93ED85c6be70925D0CAd9", "Arbitrum_Rinkeby": "0x9b3649eC8C9f68484acC76D437B145a4e58Bf2A2", "xDai": "0x913975af2Bb8a6Be4100D7dc5e9765B77F6A5d6c", + "Boba": "0x981be454a930479d92C91a0092D204b64845A5D6", + "Boba_Rinkeby": "", "Avalanche": "0x02Ea0720254F7fa4eca7d09A1b9C783F1020EbEF", "Avalanche_Fuji": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51", "Celo": "0xaA5bfd7355637eA7405CB194a55303e821c4c569", @@ -72,6 +78,8 @@ "Arbitrum": 102022, "Arbitrum_Rinkeby": 708696, "xDai": 17865755, + "Boba": 290600, + "Boba_Rinkeby": 83114, "Avalanche": 8289892, "Avalanche_Fuji": 4751103, "Celo": 10278776, @@ -92,6 +100,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x02Ea0720254F7fa4eca7d09A1b9C783F1020EbEF", "Avalanche_Fuji": "", "Celo": "", @@ -112,6 +122,8 @@ "Arbitrum": "0x913975af2Bb8a6Be4100D7dc5e9765B77F6A5d6c", "Arbitrum_Rinkeby": "0xEbd753E66649C824241E63894301BA8Db5DBF5Bb", "xDai": "0x71834a3FDeA3E70F14a93ED85c6be70925D0CAd9", + "Boba": "0x83D6b366f21e413f214EB077D5378478e71a5eD2", + "Boba_Rinkeby": "0xd60A384B01Ac271B68483441a06BA32b96a94ad8", "Avalanche": "0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B", "Avalanche_Fuji": "", "Celo": "0x2cB220F925E603A04BEE05F210252120deBA29d7", @@ -132,6 +144,8 @@ "Arbitrum": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-arbitrum-one", "Arbitrum_Rinkeby": "", "xDai": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-xdai", + "Boba": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-boba", + "Boba_Rinkeby": "", "Avalanche": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-avalanche", "Avalanche_Fuji": "", "Celo": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-ito-celo", diff --git a/packages/web3-constants/evm/lbp.json b/packages/web3-constants/evm/lbp.json index 051943e8a62d..c725a1702ed9 100644 --- a/packages/web3-constants/evm/lbp.json +++ b/packages/web3-constants/evm/lbp.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/mask-box.json b/packages/web3-constants/evm/mask-box.json index a391a2ea2256..079fb7f95657 100644 --- a/packages/web3-constants/evm/mask-box.json +++ b/packages/web3-constants/evm/mask-box.json @@ -12,10 +12,12 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0x5B966f3a32Db9C180843bCb40267A66b73E4f022", + "Boba_Rinkeby": "0xf44799D9F0aB280a5f26Fd3AB5557595948ff9E9", "Avalanche": "0x05ee315E407C21a594f807D61d6CC11306D1F149", "Avalanche_Fuji": "0xae5c53294003f72b27cef476680979453193673d", - "Celo": "", - "Fantom": "", + "Celo": "0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98", + "Fantom": "0x19f179D7e0D7d9F9d5386afFF64271D98A91615B", "Aurora": "0xf5056B96ab242C566002852d0b98ce0BcDf1af51", "Aurora_Testnet": "0xB4D669bc117735FdA44e90e52795132187705B21" }, @@ -32,11 +34,79 @@ "Arbitrum": 0, "Arbitrum_Rinkeby": 0, "xDai": 0, + "Boba": 290596, + "Boba_Rinkeby": 87139, "Avalanche": 8351767, "Avalanche_Fuji": 4752026, - "Celo": 0, - "Fantom": 0, + "Celo": 10431288, + "Fantom": 25214905, "Aurora": 57259004, "Aurora_Testnet": 77919118 + }, + "MASK_BOX_TEST_NFT": { + "Mainnet": "0x56136E69A5771436a9598804c5eA792230c21181", + "Ropsten": "0x4c73F4DC55Ef094259570892F52717cF19c62283", + "Rinkeby": "0x0c8FB5C985E00fb1D002b6B9700084492Fb4B9A8", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "0x49C2a3D93C4B94eAd101d9936f1ebCA634394a78", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "0x812463356F58fc8194645A1838ee6C52D8ca2D26", + "Avalanche_Fuji": "", + "Celo": "0x066804d9123bF2609Ed4A4a40b1177a9c5a9Ed51", + "Fantom": "0x05ee315E407C21a594f807D61d6CC11306D1F149", + "Aurora": "0x83D6b366f21e413f214EB077D5378478e71a5eD2", + "Aurora_Testnet": "" + }, + "WHITE_LIST_QUALIFICATION_CONTRACT_ADDRESS": { + "Mainnet": "", + "Ropsten": "0x3011dF5b0Be18A56693cC062Cb61a160dca571C3", + "Rinkeby": "0x996A9DCe6247cd8AaFA60de34cDD5332d9AdE702", + "Kovan": "", + "Gorli": "0xfE14631D3C2364171694EBcA05CAD08A54B2b07a", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "0x83D6b366f21e413f214EB077D5378478e71a5eD2", + "Aurora_Testnet": "" + }, + "SIG_VERIFY_QULIFICATION_CONTRACT_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "0x9a656528700493348132823C6A3C59CdFa48283d", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" } } diff --git a/packages/web3-constants/evm/nft-red-packet.json b/packages/web3-constants/evm/nft-red-packet.json index 14f892ec49c5..df170348d273 100644 --- a/packages/web3-constants/evm/nft-red-packet.json +++ b/packages/web3-constants/evm/nft-red-packet.json @@ -9,13 +9,15 @@ "BSCT": "", "Matic": "0xf6Dc042717EF4C097348bE00f4BaE688dcaDD4eA", "Mumbai": "", - "Arbitrum": "", + "Arbitrum": "0x561c5f3a19871ecb1273D6D8eCc276BeEDa5c8b4", "Arbitrum_Rinkeby": "", - "xDai": "", + "xDai": "0x561c5f3a19871ecb1273D6D8eCc276BeEDa5c8b4", + "Boba": "0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0", + "Boba_Rinkeby": "0xdcA6F476EebCDE8FE8b072e3fC80dBC28dC209b3", "Avalanche": "0x96c7D011cdFD467f551605f0f5Fce279F86F4186", "Avalanche_Fuji": "0x5de932BD252DD79231C9eDB5F2e30D488B785109", - "Celo": "", - "Fantom": "", + "Celo": "0x96c7D011cdFD467f551605f0f5Fce279F86F4186", + "Fantom": "0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0", "Aurora": "0x05ee315E407C21a594f807D61d6CC11306D1F149", "Aurora_Testnet": "0x97369fEE7db34E0BfE47861f2ec44b4378d13eB4" }, @@ -29,13 +31,15 @@ "BSCT": "", "Matic": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-polygon", "Mumbai": "", - "Arbitrum": "", + "Arbitrum": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-arb-mainnet", "Arbitrum_Rinkeby": "", - "xDai": "", + "xDai": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-xdai-mainnet", + "Boba": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-boba", + "Boba_Rinkeby": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-boba-rinkeby", "Avalanche": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-avalanche", "Avalanche_Fuji": "", - "Celo": "", - "Fantom": "", + "Celo": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-celo-mainnet", + "Fantom": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-fantom-mainnet", "Aurora": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-nft-red-packet-aurora", "Aurora_Testnet": "" } diff --git a/packages/web3-constants/evm/openocean.json b/packages/web3-constants/evm/openocean.json index 50fb7755a589..e064cddb2f25 100644 --- a/packages/web3-constants/evm/openocean.json +++ b/packages/web3-constants/evm/openocean.json @@ -12,6 +12,8 @@ "Arbitrum": "0x934B510D4C9103E6a87AEf13b816fb080286D649", "Arbitrum_Rinkeby": "", "xDai": "0x934B510D4C9103E6a87AEf13b816fb080286D649", + "Boba": "0x934B510D4C9103E6a87AEf13b816fb080286D649", + "Boba_Rinkeby": "", "Avalanche": "0x934B510D4C9103E6a87AEf13b816fb080286D649", "Avalanche_Fuji": "0x934B510D4C9103E6a87AEf13b816fb080286D649", "Celo": "0x934B510D4C9103E6a87AEf13b816fb080286D649", diff --git a/packages/web3-constants/evm/opensea-api.json b/packages/web3-constants/evm/opensea-api.json index 8032d46e99ce..f98fe4aed872 100644 --- a/packages/web3-constants/evm/opensea-api.json +++ b/packages/web3-constants/evm/opensea-api.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/pooltogether.json b/packages/web3-constants/evm/pooltogether.json index 529a2e16bb28..c42e7af9c3d1 100644 --- a/packages/web3-constants/evm/pooltogether.json +++ b/packages/web3-constants/evm/pooltogether.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/red-packet.json b/packages/web3-constants/evm/red-packet.json index d587717e2cd6..deaa595c6156 100644 --- a/packages/web3-constants/evm/red-packet.json +++ b/packages/web3-constants/evm/red-packet.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "0x02Ea0720254F7fa4eca7d09A1b9C783F1020EbEF", "Arbitrum_Rinkeby": "0x6B70EC653c4331bdD0D0DCC7C941eb594e69a91d", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -72,6 +78,8 @@ "Arbitrum": "0x83D6b366f21e413f214EB077D5378478e71a5eD2", "Arbitrum_Rinkeby": "0x4A77E797031257db72F7D2C3Ec08a4FAc5c8CfE9", "xDai": "0x54a0A221C25Fc0a347EC929cFC5db0be17fA2a2B", + "Boba": "0x578a7Fee5f0D8CEc7d00578Bf37374C5b95C4b98", + "Boba_Rinkeby": "0xB4D669bc117735FdA44e90e52795132187705B21", "Avalanche": "0xF9F7C1496c21bC0180f4B64daBE0754ebFc8A8c0", "Avalanche_Fuji": "0x3f64DFB6009d138DfD7b62916f3322A438d8b00D", "Celo": "0xAb7B1bE4233A04e5C43a810E75657ECED8E5463B", @@ -92,6 +100,8 @@ "Arbitrum": 909051, "Arbitrum_Rinkeby": 0, "xDai": 18101937, + "Boba": 284557, + "Boba_Rinkeby": 87121, "Avalanche": 8306507, "Avalanche_Fuji": 4751550, "Celo": 10413552, @@ -112,6 +122,8 @@ "Arbitrum": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-arbitrum-one", "Arbitrum_Rinkeby": "", "xDai": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-xdai", + "Boba": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-boba", + "Boba_Rinkeby": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-boba-rinkeby", "Avalanche": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-avalanche", "Avalanche_Fuji": "", "Celo": "https://api.thegraph.com/subgraphs/name/dimensiondev/mask-red-packet-celo", diff --git a/packages/web3-constants/evm/rpc.json b/packages/web3-constants/evm/rpc.json index 54cfb9185c13..daa6cc84d1df 100644 --- a/packages/web3-constants/evm/rpc.json +++ b/packages/web3-constants/evm/rpc.json @@ -54,6 +54,8 @@ "Arbitrum": ["https://arb1.arbitrum.io/rpc"], "Arbitrum_Rinkeby": ["https://rinkeby.arbitrum.io/rpc"], "xDai": ["https://rpc.xdaichain.com/"], + "Boba": ["https://mainnet.boba.network/"], + "Boba_Rinkeby": ["https://rinkeby.boba.network/"], "Avalanche": ["https://api.avax.network/ext/bc/C/rpc"], "Avalanche_Fuji": ["https://api.avax-test.network/ext/bc/C/rpc"], "Celo": ["https://forno.celo.org"], @@ -74,6 +76,8 @@ "Arbitrum": [0, 0, 0, 0, 0], "Arbitrum_Rinkeby": [0, 0, 0, 0, 0], "xDai": [0, 0, 0, 0, 0], + "Boba": [0, 0, 0, 0, 0], + "Boba_Rinkeby": [0, 0, 0, 0, 0], "Avalanche": [0, 0, 0, 0, 0], "Avalanche_Fuji": [0, 0, 0, 0, 0], "Celo": [0, 0, 0, 0, 0], diff --git a/packages/web3-constants/evm/savings.json b/packages/web3-constants/evm/savings.json index 0f58f923eb48..11fa1e6e66a7 100644 --- a/packages/web3-constants/evm/savings.json +++ b/packages/web3-constants/evm/savings.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/space-station-galaxy.json b/packages/web3-constants/evm/space-station-galaxy.json index 86b85572cdcd..cd8220dd1e68 100644 --- a/packages/web3-constants/evm/space-station-galaxy.json +++ b/packages/web3-constants/evm/space-station-galaxy.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/token-asset-base-url.json b/packages/web3-constants/evm/token-asset-base-url.json index 994c1a1189ae..cf81789b1caf 100644 --- a/packages/web3-constants/evm/token-asset-base-url.json +++ b/packages/web3-constants/evm/token-asset-base-url.json @@ -39,6 +39,11 @@ "Arbitrum": [], "Arbitrum_Rinkeby": [], "xDai": [], + "Boba": [ + "https://raw.githubusercontent.com/dimensiondev/assets/master/blockchains/boba", + "https://rawcdn.githack.com/dimensiondev/assets/master/blockchains/boba" + ], + "Boba_Rinkeby": [], "Avalanche": [ "https://raw.githubusercontent.com/dimensiondev/assets/master/blockchains/avalanchec", "https://rawcdn.githack.com/dimensiondev/assets/master/blockchains/avalanchec" diff --git a/packages/web3-constants/evm/token-list.json b/packages/web3-constants/evm/token-list.json index 76b7b8870aee..c3e9dbaa9146 100644 --- a/packages/web3-constants/evm/token-list.json +++ b/packages/web3-constants/evm/token-list.json @@ -5,14 +5,28 @@ "Rinkeby": ["https://tokens.r2d2.to/latest/4/tokens.json"], "Kovan": ["https://irhonin.github.io/kovan-token-list/kovan-token-list.json"], "Gorli": [], - "BSC": ["https://tokens.r2d2.to/latest/56/tokens.json"], - "BSCT": ["https://tokens.r2d2.to/latest/97/tokens.json"], - "Matic": ["https://tokens.r2d2.to/latest/137/tokens.json"], - "Mumbai": ["https://tokens.r2d2.to/latest/80001/tokens.json"], - "Arbitrum": ["https://tokens.r2d2.to/latest/42161/tokens.json"], - "Arbitrum_Rinkeby": ["https://tokens.r2d2.to/latest/421611/tokens.json"], - "xDai": ["https://tokens.r2d2.to/latest/100/tokens.json"], - "Avalanche": ["https://tokens.r2d2.to/latest/43114/tokens.json"], + "BSC": [ + "https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/56/tokens.json", + "https://api.1inch.exchange/v3.0/56/tokens" + ], + "BSCT": ["https://dimensiondev.github.io/Mask-Token-List/mask.json"], + "Matic": [ + "https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/137/tokens.json", + "https://api.1inch.exchange/v3.0/137/tokens" + ], + "Mumbai": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/80001/tokens.json"], + "Arbitrum": [ + "https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/42161/tokens.json" + ], + "Arbitrum_Rinkeby": [ + "https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/421611/tokens.json" + ], + "xDai": ["https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/100/tokens.json"], + "Boba": ["https://tokens.r2d2.to/latest/288/tokens.json"], + "Boba_Rinkeby": [], + "Avalanche": [ + "https://raw.githubusercontent.com/DimensionDev/Mask-Token-List/gh-pages/latest/43114/tokens.json" + ], "Avalanche_Fuji": [], "Celo": ["https://tokens.r2d2.to/latest/42220/tokens.json"], "Fantom": ["https://tokens.r2d2.to/latest/250/tokens.json"], diff --git a/packages/web3-constants/evm/token.json b/packages/web3-constants/evm/token.json index f6fe2360d0d4..34ffb98e0d6f 100644 --- a/packages/web3-constants/evm/token.json +++ b/packages/web3-constants/evm/token.json @@ -1,4 +1,26 @@ { + "ZERO_ADDRESS": { + "Mainnet": "0x0000000000000000000000000000000000000000", + "Ropsten": "0x0000000000000000000000000000000000000000", + "Rinkeby": "0x0000000000000000000000000000000000000000", + "Kovan": "0x0000000000000000000000000000000000000000", + "Gorli": "0x0000000000000000000000000000000000000000", + "BSC": "0x0000000000000000000000000000000000000000", + "BSCT": "0x0000000000000000000000000000000000000000", + "Matic": "0x0000000000000000000000000000000000000000", + "Mumbai": "0x0000000000000000000000000000000000000000", + "Arbitrum": "0x0000000000000000000000000000000000000000", + "Arbitrum_Rinkeby": "0x0000000000000000000000000000000000000000", + "xDai": "0x0000000000000000000000000000000000000000", + "Boba": "0x0000000000000000000000000000000000000000", + "Boba_Rinkeby": "0x0000000000000000000000000000000000000000", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "0x0000000000000000000000000000000000000000", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, "WNATIVE_ADDRESS": { "Mainnet": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", "Ropsten": "0xc778417E063141139Fce010982780140Aa0cD5Ab", @@ -12,6 +34,8 @@ "Arbitrum": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", "Arbitrum_Rinkeby": "0xB47e6A5f8b33b3F17603C83a0535A9dcD7E32681", "xDai": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", + "Boba": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", + "Boba_Rinkeby": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", "Avalanche": "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7", "Avalanche_Fuji": "", "Celo": "0x471EcE3750Da237f93B8E339c536989b8978a438", @@ -32,6 +56,8 @@ "Arbitrum": "0xe865dF68133fcEd7c2285ff3896B406CAfAa2dB8", "Arbitrum_Rinkeby": "", "xDai": "0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83", + "Boba": "0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc", + "Boba_Rinkeby": "0xB24898De59C8E259F9742bCF2C16Fd613DCeA8F7", "Avalanche": "0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664", "Avalanche_Fuji": "", "Celo": "0x2A3684e9Dc20B857375EA04235F2F7edBe818FA7", @@ -52,6 +78,8 @@ "Arbitrum": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", "Arbitrum_Rinkeby": "", "xDai": "0x4ECaBa5870353805a9F068101A40E0f32ed605C6", + "Boba": "0x5DE1677344D3Cb0D7D465c10b72A8f60699C062d", + "Boba_Rinkeby": "0x9d0364c866A73e34649869525CD7576080259A42", "Avalanche": "0xc7198437980c041c805A1EDcbA50c1Ce5db95118", "Avalanche_Fuji": "", "Celo": "0xb020d981420744f6b0fedd22bb67cd37ce18a1d5", @@ -72,6 +100,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "0x1e37E5b504F7773460d6eB0e24D2e7C223B66EC7", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -92,6 +122,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "0xdd96B45877d0E8361a4DDb732da741e97f3191Ff", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x19860ccb0a68fd4213ab9d8266f7bbf05a8dde98", "Avalanche_Fuji": "", "Celo": "", @@ -112,6 +144,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xc3048e19e76cb9a3aa9d77d8c03c29fc906e2437", "Avalanche_Fuji": "", "Celo": "", @@ -132,6 +166,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -152,6 +188,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -172,6 +210,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -192,6 +232,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -212,6 +254,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -232,6 +276,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -252,6 +298,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -272,6 +320,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -292,6 +342,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0xf74195Bb8a5cf652411867c5C2C5b8C2a402be35", + "Boba_Rinkeby": "0x0630f97C8938051a44b0A64e9D4d484295393Fe4", "Avalanche": "0xd586E7F844cEa2F87f50152665BCbc2C279D8d70", "Avalanche_Fuji": "", "Celo": "", @@ -312,6 +364,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -332,6 +386,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -352,6 +408,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0xE5Ef1407928eBCe28a6f1a0759251b7187fEa726", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -372,6 +430,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -392,6 +452,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -412,6 +474,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -432,6 +496,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -452,6 +518,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -472,6 +540,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -492,6 +562,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -512,6 +584,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -532,6 +606,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -552,6 +628,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252", + "Boba": "0xdc0486f8bf31DF57a952bcd3c1d3e166e3d9eC8b", + "Boba_Rinkeby": "0x87EB6C9E8579582D2f02AbeD2c8589616D005210", "Avalanche": "0x50b7545627a5162F82A992c33b87aDc75187B218", "Avalanche_Fuji": "", "Celo": "0xBe50a3013A1c94768A1ABb78c3cB79AB28fc1aCE", @@ -572,6 +650,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -592,6 +672,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -612,6 +694,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0x5fFccc55C0d2fd6D3AC32C26C020B3267e933F1b", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -632,6 +716,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -652,6 +738,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -672,6 +760,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -692,6 +782,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -712,6 +804,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -732,6 +826,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -752,6 +848,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -772,6 +870,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -792,6 +892,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -812,6 +914,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "0x765de816845861e75a25fca122bb6898b8b1282a", @@ -832,6 +936,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "0x765de816845861e75a25fca122bb6898b8b1282a", @@ -852,6 +958,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -859,6 +967,28 @@ "Aurora": "0x802119e4e253D5C19aA06A5d567C5a41596D6803", "Aurora_Testnet": "" }, + "OLO_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x5008F837883EA9a07271a1b5eB0658404F5a9610", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, "JOE_ADDRESS": { "Mainnet": "", "Ropsten": "", @@ -872,6 +1002,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xce347E069B68C53A9ED5e7DA5952529cAF8ACCd4", "Avalanche_Fuji": "", "Celo": "", @@ -879,6 +1011,28 @@ "Aurora": "", "Aurora_Testnet": "" }, + "BOBA_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0xa18bF3994C0Cc6E3b63ac420308E5383f53120D7", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, "PNG_ADDRESS": { "Mainnet": "", "Ropsten": "", @@ -892,6 +1046,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x60781C2586D68229fde47564546784ab3fACA982", "Avalanche_Fuji": "", "Celo": "", @@ -899,6 +1055,50 @@ "Aurora": "", "Aurora_Testnet": "" }, + "WAIFU_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0xB5cB0975716A4AA6438d3FA02364886E13fd678c", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SENPAI_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0xaC3a4aF1778203c8B651dAfA73cEd5b79c80F239", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, "ETHER_ADDRESS": { "Mainnet": "", "Ropsten": "", @@ -912,6 +1112,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0x4200000000000000000000000000000000000006", + "Boba_Rinkeby": "0x4200000000000000000000000000000000000006", "Avalanche": "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", "Avalanche_Fuji": "", "Celo": "", @@ -932,6 +1134,8 @@ "Arbitrum": "0x0000000000000000000000000000000000000000", "Arbitrum_Rinkeby": "0x0000000000000000000000000000000000000000", "xDai": "0x0000000000000000000000000000000000000000", + "Boba": "0x0000000000000000000000000000000000000000", + "Boba_Rinkeby": "0x0000000000000000000000000000000000000000", "Avalanche": "0x0000000000000000000000000000000000000000", "Avalanche_Fuji": "0x0000000000000000000000000000000000000000", "Celo": "0x471ece3750da237f93b8e339c536989b8978a438", diff --git a/packages/web3-constants/evm/trader.json b/packages/web3-constants/evm/trader.json index be8dcb28d3fb..39f9dfe513ef 100644 --- a/packages/web3-constants/evm/trader.json +++ b/packages/web3-constants/evm/trader.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "Avalanche_Fuji": "0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", "Avalanche_Fuji": "0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -72,6 +78,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", "Avalanche_Fuji": "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f", "Celo": "", @@ -92,6 +100,8 @@ "Arbitrum": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "Arbitrum_Rinkeby": "0xE592427A0AEce92De3Edee1F18E0157C05861564", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -112,6 +122,8 @@ "Arbitrum": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "Arbitrum_Rinkeby": "0x1F98431c8aD98523631AE4a59f267346ea31F984", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -132,6 +144,8 @@ "Arbitrum": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", "Arbitrum_Rinkeby": "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -152,6 +166,8 @@ "Arbitrum": "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3", "Arbitrum_Rinkeby": "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -172,6 +188,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -192,6 +210,8 @@ "Arbitrum": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", "Arbitrum_Rinkeby": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", "xDai": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", "Avalanche_Fuji": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", "Celo": "0x1421bDe4B10e8dd459b3BCb598810B1337D56842", @@ -212,6 +232,8 @@ "Arbitrum": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", "Arbitrum_Rinkeby": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", "xDai": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", "Avalanche_Fuji": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", "Celo": "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", @@ -232,6 +254,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -252,6 +276,8 @@ "Arbitrum": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "Arbitrum_Rinkeby": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "xDai": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "Avalanche_Fuji": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", "Celo": "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", @@ -272,6 +298,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -292,6 +320,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -312,6 +342,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -332,6 +364,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -352,6 +386,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -372,6 +408,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -392,6 +430,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -412,6 +452,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -432,6 +474,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -452,6 +496,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -472,6 +518,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -492,6 +540,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -512,6 +562,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -532,6 +584,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -552,6 +606,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -572,6 +628,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -592,6 +650,8 @@ "Arbitrum": "0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "0x55793C2c8A796cCE00EF2D1a86CCA2E0399BF285", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -612,6 +672,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -632,6 +694,74 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "OOLONGSWAP_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "0x5C6d452F4dF3A7b5D2A3928D8CAaE332718BbFF9", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x7DDaF116889D655D1c486bEB95017a8211265d29", + "Boba_Rinkeby": "0xab740666e226cb5b6b451eb943b0257a7cb3ce0a", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "OOLONGSWAP_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "0x6000eb83c2583AFD25D93cB0629D6b0a0B2F245c", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x17C83E2B96ACfb5190d63F5E46d93c107eC0b514", + "Boba_Rinkeby": "0x4df04E20cCd9a8B82634754fcB041e86c5FF085A", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "OOLONGSWAP_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -652,6 +782,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x60aE616a2155Ee3d9A68541Ba4544862310933d4", "Avalanche_Fuji": "0x5db0735cf88F85E78ed742215090c465979B5006", "Celo": "", @@ -672,6 +804,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x9Ad6C38BE94206cA50bb0d90783181662f0Cfa10", "Avalanche_Fuji": "0x7eeccb3028870540EEc3D88C2259506f2d34fEE0", "Celo": "", @@ -692,6 +826,206 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "OOLONGSWAP_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SWAPPERCHAN_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x3d97964506800d433fb5DbEBDd0c202EC9B62557", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SWAPPERCHAN_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x215EC743F2316A0fa4a6Af5A7C331E859f4F5E2b", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SWAPPERCHAN_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SWAPPERCHAN_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0xf38460909fc2d1bb530318c6a9b776a66b13de28b082e2c3b4dc8670da4d9b6c", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SENPAISWAP_FACTORY_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x05a7c34E97A6733dc319E0d2347816e5c1f003D0", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SENPAISWAP_ROUTER_ADDRESS": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0xC0cD4c9851B18DbfcBcF474b9e674fBF4639bD2c", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SENPAISWAP_THEGRAPH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", + "Avalanche": "", + "Avalanche_Fuji": "", + "Celo": "", + "Fantom": "", + "Aurora": "", + "Aurora_Testnet": "" + }, + "SENPAISWAP_INIT_CODE_HASH": { + "Mainnet": "", + "Ropsten": "", + "Rinkeby": "", + "Kovan": "", + "Gorli": "", + "BSC": "", + "BSCT": "", + "Matic": "", + "Mumbai": "", + "Arbitrum": "", + "Arbitrum_Rinkeby": "", + "xDai": "", + "Boba": "0x008da11fe29bf7f89dc9ce966f1bf6d309d6a57c3021a4c290391bb41cf7e85e", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -712,6 +1046,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x0bbca9af0511ad1a1da383135cf3a8d2ac620e549ef9f6ae3a4c33c2fed0af91", "Avalanche_Fuji": "0x0bbca9af0511ad1a1da383135cf3a8d2ac620e549ef9f6ae3a4c33c2fed0af91", "Celo": "", @@ -732,6 +1068,8 @@ "Arbitrum": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", "Arbitrum_Rinkeby": "", "xDai": "0x0000000000000000000000000000000000000000", + "Boba": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -752,6 +1090,8 @@ "Arbitrum": "0x6352a56caadc4f1e25cd6c75970fa768a3304e64", "Arbitrum_Rinkeby": "", "xDai": "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64", "Avalanche_Fuji": "0x6352a56caadC4F1E25CD6c75970Fa768A3304e64", "Celo": "", @@ -772,6 +1112,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106", "Avalanche_Fuji": "0xE54Ca86531e17Ef3616d22Ca28b0D458b6C89106", "Celo": "", @@ -792,6 +1134,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0xefa94DE7a4656D787667C749f7E1223D71E9FD88", "Avalanche_Fuji": "0xE4A575550C2b460d2307b82dCd7aFe84AD1484dd", "Celo": "", @@ -812,6 +1156,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "https://api.thegraph.com/subgraphs/name/dasconnor/pangolin-dex'", "Avalanche_Fuji": "", "Celo": "", @@ -832,6 +1178,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "0x40231f6b438bce0797c9ada29b718a87ea0a5cea3fe9a771abdd76bd41a3e545", "Avalanche_Fuji": "0x40231f6b438bce0797c9ada29b718a87ea0a5cea3fe9a771abdd76bd41a3e545", "Celo": "", @@ -852,6 +1200,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -872,6 +1222,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -892,6 +1244,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -912,6 +1266,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -932,6 +1288,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -952,6 +1310,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -972,6 +1332,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -992,6 +1354,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -1012,6 +1376,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -1032,6 +1398,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -1052,6 +1420,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -1072,6 +1442,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -1092,6 +1464,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/trending.json b/packages/web3-constants/evm/trending.json index a115fe46afe5..3c679ddc8d3a 100644 --- a/packages/web3-constants/evm/trending.json +++ b/packages/web3-constants/evm/trending.json @@ -12,6 +12,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -32,6 +34,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", @@ -52,6 +56,8 @@ "Arbitrum": "", "Arbitrum_Rinkeby": "", "xDai": "", + "Boba": "", + "Boba_Rinkeby": "", "Avalanche": "", "Avalanche_Fuji": "", "Celo": "", diff --git a/packages/web3-constants/evm/zerion.json b/packages/web3-constants/evm/zerion.json index e0d70150b37f..da062b84470f 100644 --- a/packages/web3-constants/evm/zerion.json +++ b/packages/web3-constants/evm/zerion.json @@ -12,6 +12,8 @@ "Arbitrum": "arbitrum-assets", "Arbitrum_Rinkeby": "", "xDai": "xdai-assets", + "Boba": "boba-assets", + "Boba_Rinkeby": "", "Avalanche": "avalanche-assets", "Avalanche_Fuji": "", "Celo": "celo-assets", @@ -32,6 +34,8 @@ "Arbitrum": "arbitrum-transactions", "Arbitrum_Rinkeby": "", "xDai": "xdai-transactions", + "Boba": "boba-transactions", + "Boba_Rinkeby": "", "Avalanche": "avalanche-transactions", "Avalanche_Fuji": "", "Celo": "celo-transactions", diff --git a/packages/web3-shared/evm/assets/chains.json b/packages/web3-shared/evm/assets/chains.json index 58add69b679c..c1ffa60be0b7 100644 --- a/packages/web3-shared/evm/assets/chains.json +++ b/packages/web3-shared/evm/assets/chains.json @@ -335,6 +335,56 @@ "chainId": 10, "networkId": 10 }, + { + "name": "Boba Network", + "chain": "Boba", + "network": "mainnet", + "rpc": ["https://mainnet.boba.network/"], + "faucets": [], + "features": [], + "nativeCurrency": { + "name": "Boba Ether", + "symbol": "ETH", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/icons/master/token/eth.jpg" + }, + "infoURL": "https://boba.network", + "shortName": "boba", + "chainId": 288, + "networkId": 288, + "explorers": [ + { + "name": "blockexplorer", + "url": "https://blockexplorer.boba.network/", + "standard": "EIP3091" + } + ] + }, + { + "name": "Boba Network Rinkeby", + "chain": "Boba", + "network": "testnet", + "rpc": ["https://rinkeby.boba.network/"], + "faucets": [], + "features": [], + "nativeCurrency": { + "name": "Boba Ether", + "symbol": "ETH", + "decimals": 18, + "logoURI": "https://raw.githubusercontent.com/sushiswap/icons/master/token/eth.jpg" + }, + "infoURL": "https://boba.network", + "shortName": "boba", + "chainId": 28, + "networkId": 28, + "explorers": [ + { + "name": "blockexplorer", + "url": "https://blockexplorer.rinkeby.boba.network/", + "standard": "EIP3091" + } + ] + }, { "name": "Metadium Mainnet", "chain": "META", diff --git a/packages/web3-shared/evm/assets/coingecko-asset-platforms.json b/packages/web3-shared/evm/assets/coingecko-asset-platforms.json new file mode 100644 index 000000000000..c1558774509a --- /dev/null +++ b/packages/web3-shared/evm/assets/coingecko-asset-platforms.json @@ -0,0 +1,80 @@ +[ + { + "id": "fantom", + "chainId": 250, + "name": "Fantom", + "shortname": "" + }, + { + "id": "boba", + "chainId": 288, + "name": "Boba", + "shortname": "" + }, + { + "id": "binance-smart-chain", + "chainId": 56, + "name": "Binance Smart Chain", + "shortname": "BSC" + }, + { + "id": "ethereum", + "chainId": 1, + "name": "Ethereum", + "shortname": "" + }, + { + "id": "xdai", + "chainId": 100, + "name": "xDAI", + "shortname": "" + }, + { + "id": "okex-chain", + "chainId": 66, + "name": "OKExChain", + "shortname": "OKEx" + }, + { + "id": "tomochain", + "chainId": 88, + "name": "TomoChain", + "shortname": "" + }, + { + "id": "avalanche", + "chainId": 43114, + "name": "Avalanche", + "shortname": "AVAX" + }, + { + "id": "polygon-pos", + "chainId": 137, + "name": "Polygon POS", + "shortname": "MATIC" + }, + { + "id": "huobi-token", + "chainId": 128, + "name": "Huobi ECO Chain Mainnet", + "shortname": "HECO" + }, + { + "id": "celo", + "chainId": 42220, + "name": "Celo", + "shortname": "celo" + }, + { + "id": "harmony-shard-0", + "chainId": 1666600000, + "name": "Harmony Shard 0", + "shortname": "Harmony Shard 0" + }, + { + "id": "kucoin-community-chain", + "chainId": 321, + "name": "Kucoin Community Chain", + "shortname": "KCC" + } +] diff --git a/packages/web3-shared/evm/assets/coingecko-coin-list.json b/packages/web3-shared/evm/assets/coingecko-coin-list.json new file mode 100644 index 000000000000..dbe91c1ea4a1 --- /dev/null +++ b/packages/web3-shared/evm/assets/coingecko-coin-list.json @@ -0,0 +1,32 @@ +[ + { + "id": "ethereum", + "symbol": "eth", + "chainId": 1, + "name": "Ethereum" + }, + { + "id": "binancecoin", + "symbol": "bnb", + "chainId": 56, + "name": "Binance Coin" + }, + { + "id": "xdai", + "symbol": "xdai", + "chainId": 100, + "name": "xDAI" + }, + { + "id": "matic-network", + "symbol": "matic", + "chainId": 137, + "name": "Polygon" + }, + { + "id": "boba-network", + "symbol": "eth", + "chainId": 288, + "name": "Boba" + } +] diff --git a/packages/web3-shared/evm/constants/tokens.ts b/packages/web3-shared/evm/constants/tokens.ts index 486f30fea1ca..528b2f5ff61e 100644 --- a/packages/web3-shared/evm/constants/tokens.ts +++ b/packages/web3-shared/evm/constants/tokens.ts @@ -50,6 +50,10 @@ 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 OLO = createERC20Tokens('OLO_ADDRESS', 'OolongSwap Token', 'OLO', 18) +export const BOBA = createERC20Tokens('BOBA_ADDRESS', 'Boba Token', 'BOBA', 18) +export const WAIFU = createERC20Tokens('WAIFU_ADDRESS', 'WaifuToken', 'WAIFU', 18) +export const SENPAI = createERC20Tokens('SENPAI_ADDRESS', 'SenpaiSwap', 'SENPAI', 18) export const WNATIVE = createERC20Tokens( 'WNATIVE_ADDRESS', diff --git a/packages/web3-shared/evm/hooks/useNativeTokenTransferCallback.ts b/packages/web3-shared/evm/hooks/useNativeTokenTransferCallback.ts index c2e6e3c6ece7..11d775e3140e 100644 --- a/packages/web3-shared/evm/hooks/useNativeTokenTransferCallback.ts +++ b/packages/web3-shared/evm/hooks/useNativeTokenTransferCallback.ts @@ -7,6 +7,7 @@ import { useTransactionState } from './useTransactionState' import { useWeb3 } from './useWeb3' import { isGreaterThan, isZero } from '@masknet/web3-shared-base' import { TransactionStateType, GasConfig } from '../types' +import { FeeMarketEIP1559Transaction } from '@ethereumjs/tx' export function useNativeTransferCallback() { const web3 = useWeb3() @@ -71,24 +72,85 @@ export function useNativeTransferCallback() { ...gasConfig, } - // send transaction and wait for hash - return new Promise((resolve, reject) => { - web3.eth.sendTransaction(config, (error, hash) => { - if (error) { + const configBoba = { + from: account, + to: recipient, + gas: await web3.eth + .estimateGas({ + from: account, + to: recipient, + value: amount, + data: memo ? toHex(memo) : undefined, + }) + .catch((error) => { setTransferState({ type: TransactionStateType.FAILED, error, }) - reject(error) - } else { + throw error + }), + value: amount, + data: memo ? toHex(memo) : undefined, + maxFeePerGas: await web3.eth + .estimateGas({ + from: account, + to: recipient, + value: amount, + data: memo ? toHex(memo) : undefined, + }) + .catch((error) => { setTransferState({ - type: TransactionStateType.HASH, - hash, + type: TransactionStateType.FAILED, + error, }) - resolve(hash) - } + throw error + }), + maxPriorityFeePerGas: '1.5', + } + + // check if boba network + if (chainId === 288) { + const tx = FeeMarketEIP1559Transaction.fromTxData(configBoba) + const serializedTx = tx.serialize() + const signedTransaction = await web3.eth.sign('0x' + serializedTx.toString('hex'), account) + // send transaction and wait for hash on boba network + return new Promise((resolve, reject) => { + web3.eth.sendSignedTransaction(signedTransaction, (error, hash) => { + if (error) { + setTransferState({ + type: TransactionStateType.FAILED, + error, + }) + reject(error) + } else { + setTransferState({ + type: TransactionStateType.HASH, + hash, + }) + resolve(hash) + } + }) }) - }) + } else { + // send transaction and wait for hash + return new Promise((resolve, reject) => { + web3.eth.sendTransaction(config, (error, hash) => { + if (error) { + setTransferState({ + type: TransactionStateType.FAILED, + error, + }) + reject(error) + } else { + setTransferState({ + type: TransactionStateType.HASH, + hash, + }) + resolve(hash) + } + }) + }) + } }, [web3, account, chainId], ) diff --git a/packages/web3-shared/evm/package.json b/packages/web3-shared/evm/package.json index 48dfd1d9dedc..ecf8614a57b3 100644 --- a/packages/web3-shared/evm/package.json +++ b/packages/web3-shared/evm/package.json @@ -25,7 +25,8 @@ "wallet.ts": "^1.0.1", "web3": "1.5.2", "web3-core-helpers": "1.5.2", - "web3-utils": "1.5.2" + "web3-utils": "1.5.2", + "@ethereumjs/tx": "3.5.0" }, "devDependencies": { "@types/use-subscription": "^1.0.0" diff --git a/packages/web3-shared/evm/pipes/index.ts b/packages/web3-shared/evm/pipes/index.ts index 818cfb540e1f..34a3a441129c 100644 --- a/packages/web3-shared/evm/pipes/index.ts +++ b/packages/web3-shared/evm/pipes/index.ts @@ -92,6 +92,7 @@ export const resolveNetworkAddressPrefix = createLookupTableResolver [NetworkType.Polygon]: 'Polygon', [NetworkType.Arbitrum]: 'Arbitrum', [NetworkType.xDai]: 'xDai', + [NetworkType.Boba]: 'Boba', [NetworkType.Avalanche]: 'Avalanche', [NetworkType.Celo]: 'Celo', [NetworkType.Fantom]: 'Fantom', @@ -139,6 +141,8 @@ export const resolveChainColor = createLookupTableResolver( [ChainId.Arbitrum]: 'rgb(36, 150, 238)', [ChainId.Arbitrum_Rinkeby]: 'rgb(36, 150, 238)', [ChainId.xDai]: 'rgb(73, 169, 166)', + [ChainId.Boba]: 'rgb(204, 255, 0)', + [ChainId.Boba_Rinkeby]: 'rgb(204, 255, 0)', [ChainId.Avalanche]: 'rgb(232, 65, 66)', [ChainId.Avalanche_Fuji]: 'rgb(232, 65, 66)', [ChainId.Celo]: 'rgb(53, 208, 127)', diff --git a/packages/web3-shared/evm/types/index.ts b/packages/web3-shared/evm/types/index.ts index 8855d3da1d73..6e037f60ecc3 100644 --- a/packages/web3-shared/evm/types/index.ts +++ b/packages/web3-shared/evm/types/index.ts @@ -72,6 +72,7 @@ export enum ChainId { // Boba Boba = 288, + Boba_Rinkeby = 28, // Metis Metis = 1088, @@ -367,6 +368,9 @@ export enum EthereumMethodType { MASK_REPLACE_TRANSACTION = 'mask_replaceTransaction', MASK_LOGIN_FORTMATIC = 'mask_loginFortmatic', MASK_LOGOUT_FORTMATIC = 'mask_logoutFortmatic', + + // only for boba, optimistic + ROLLUP_GAS_PRICES = 'rollup_gasPrices', } export enum EthereumErrorType { diff --git a/packages/web3-shared/evm/utils/chainDetailed.ts b/packages/web3-shared/evm/utils/chainDetailed.ts index 2b61165ef252..ad617e91e36e 100644 --- a/packages/web3-shared/evm/utils/chainDetailed.ts +++ b/packages/web3-shared/evm/utils/chainDetailed.ts @@ -88,6 +88,8 @@ export const getChainIdFromNetworkType = createLookupTableResolver=10.0.0'} dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.2.3 + node-gyp-build: 4.3.0 dev: false /keccak/3.0.2: @@ -19898,11 +19910,6 @@ packages: engines: {node: '>= 6.13.0'} dev: true - /node-gyp-build/4.2.3: - resolution: {integrity: sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg==} - hasBin: true - dev: false - /node-gyp-build/4.3.0: resolution: {integrity: sha512-iWjXZvmboq0ja1pUGULQBexmxq8CV4xBhX7VDOTbL7ZR4FOowwY/VOtRxBN/yKxmdGoIp4j5ysNT4u3S2pDQ3Q==} hasBin: true @@ -25268,8 +25275,8 @@ packages: resolution: {integrity: sha512-F8mtzxgEhxfLc66vPi0Gqd6mpscvvk7Ua575bsJ1p9J2X/VtuKgDgpWcU4e4LKeROQ+ouCpAG9//0j9jQuij3A==} engines: {node: '>=8.0.0'} dependencies: - '@ethereumjs/common': 2.4.0 - '@ethereumjs/tx': 3.3.0 + '@ethereumjs/common': 2.6.2 + '@ethereumjs/tx': 3.5.0 crypto-browserify: 3.12.0 eth-lib: 0.2.8 ethereumjs-util: 7.1.4