From 82c7003a50447a2e293d33bca35aabd7b5e74180 Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Thu, 4 Aug 2022 19:17:56 +1000 Subject: [PATCH] test arbitrum nitro --- assets/styles/components/_icon.scss | 4 +++ networkConfig.js | 47 +++++++++++++++++++++++++++++ plugins/idb.js | 2 +- services/graph.js | 1 + services/schema/index.js | 1 + store/application.js | 2 +- store/metamask.js | 11 +++++++ 7 files changed, 66 insertions(+), 2 deletions(-) diff --git a/assets/styles/components/_icon.scss b/assets/styles/components/_icon.scss index df7a92f..fc7382e 100644 --- a/assets/styles/components/_icon.scss +++ b/assets/styles/components/_icon.scss @@ -321,6 +321,10 @@ mask-image: url('../img/icons/arbitrum.svg'); } + &-arbitrum-rinkeby { + mask-image: url('../img/icons/arbitrum.svg'); + } + &-binance-smart-chain { mask-image: url('../img/icons/binance.svg'); } diff --git a/networkConfig.js b/networkConfig.js index cbc67f6..2bb935c 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -338,6 +338,53 @@ export default { }, 'tornado-proxy-light.contract.tornadocash.eth': '0x0D5550d52428E7e3175bfc9550207e4ad3859b17' }, + netId421611: { + rpcCallRetryAttempt: 15, + gasPrices: { + instant: 4, + fast: 3, + standard: 2.52, + low: 2.29 + }, + nativeCurrency: 'eth', + currencyName: 'ETH', + explorerUrl: { + tx: 'https://testnet.arbiscan.io/tx/', + address: 'https://testnet.arbiscan.io/address/', + block: 'https://testnet.arbiscan.io/block/' + }, + merkleTreeHeight: 20, + emptyElement: '21663839004416932945382355908790599225266501822907911457504978515578255421292', + networkName: 'Arbitrum Rinkeby', + deployedBlock: 13970750, + multicall: '0x7eCfBaa8742fDf5756DAC92fbc8b90a19b8815bF', + echoContractAccount: '0xC1B35A64b179D3EdeF31a17C715daD187C26f310', + rpcUrls: { + Arbitrum: { + name: 'Arbitrum Public RPC', + url: 'https://rinkeby.arbitrum.io/rpc' + } + }, + tokens: { + eth: { + instanceAddress: { + '0.1': '0x183CA333114587070d3FAF57038DC43Ec1d81376', + '1': '', + '10': '', + '100': '' + }, + symbol: 'ETH', + decimals: 18 + } + }, + ensSubdomainKey: 'arbitrum-rinkeby-tornado', + pollInterval: 15, + constants: { + NOTE_ACCOUNT_BLOCK: 13970750, + ENCRYPTED_NOTES_BLOCK: 13970750 + }, + 'tornado-proxy-light.contract.tornadocash.eth': '0xFfa8E36aB90180Df7d63767066e443e1f8d1A828' + }, netId100: { rpcCallRetryAttempt: 15, gasPrices: { diff --git a/plugins/idb.js b/plugins/idb.js index 15a857f..0b70bc5 100644 --- a/plugins/idb.js +++ b/plugins/idb.js @@ -39,7 +39,7 @@ class IndexedDB { return } - this.db = await openDB(this.dbName, 34, this.options) // version (optional): Schema version, or undefined to open the current version. + this.db = await openDB(this.dbName, 35, this.options) // version (optional): Schema version, or undefined to open the current version. this.onEventHandler() this.dbExists = true diff --git a/services/graph.js b/services/graph.js index fb306df..9fd90a8 100644 --- a/services/graph.js +++ b/services/graph.js @@ -27,6 +27,7 @@ const CHAIN_GRAPH_URLS = { 100: 'https://api.thegraph.com/subgraphs/name/tornadocash/xdai-tornado-subgraph', 137: 'https://api.thegraph.com/subgraphs/name/tornadocash/matic-tornado-subgraph', 42161: 'https://api.thegraph.com/subgraphs/name/tornadocash/arbitrum-tornado-subgraph', + 421611: 'https://api.thegraph.com/subgraphs/name/dan1kov/arbitrum-r-tornado-subgraph', 43114: 'https://api.thegraph.com/subgraphs/name/tornadocash/avalanche-tornado-subgraph' } diff --git a/services/schema/index.js b/services/schema/index.js index af2019f..fbbec75 100644 --- a/services/schema/index.js +++ b/services/schema/index.js @@ -30,6 +30,7 @@ function getRelayerValidateFunction(netId) { case 10: case 42161: + case 421611: return ajv.getSchema('l2Relayer') default: diff --git a/store/application.js b/store/application.js index 7415345..4cdaead 100644 --- a/store/application.js +++ b/store/application.js @@ -251,7 +251,7 @@ const getters = { }, isArbitrumConnected: (state, getters, rootState, rootGetters) => { const netId = rootGetters['metamask/netId'] - return Number(netId) === 42161 + return [42161, 421611].includes(Number(netId)) } } diff --git a/store/metamask.js b/store/metamask.js index 8b4909e..a9525bf 100644 --- a/store/metamask.js +++ b/store/metamask.js @@ -580,6 +580,17 @@ const actions = { }, blockExplorerUrls: ['https://arbiscan.io'] }, + 421611: { + chainId: '0x66EEB', + chainName: 'Arbitrum Rinkeby', + rpcUrls: ['https://rinkeby.arbitrum.io/rpc'], + nativeCurrency: { + name: 'Arbitrum Rinkeby Ether', + symbol: 'ARETH', + decimals: 18 + }, + blockExplorerUrls: ['https://testnet.arbiscan.io/'] + }, 43114: { chainId: '0xA86A', chainName: 'Avalanche C-Chain',