From 2cf3b33b627df2aa4d0579871be9fdc52264d082 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Sun, 5 May 2024 12:31:55 +0000 Subject: [PATCH 01/11] Use subgraph to fetch deposit events and registry events --- services/events.js | 7 ++++--- services/registry/index.js | 17 +++++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/services/events.js b/services/events.js index 73cc3fe..06feaf5 100644 --- a/services/events.js +++ b/services/events.js @@ -412,10 +412,11 @@ class EventService { async getEventsFromBlock({ fromBlock, graphMethod, type }) { try { // ToDo think about undefined - const rpcEvents = await this.getEventsFromRpc({ fromBlock, type }) - - const allEvents = [].concat(rpcEvents || []) + const graphEvents = await this.getEventsFromGraph({ fromBlock, methodName: graphMethod }) + const lastSyncBlock = fromBlock > graphEvents?.lastBlock ? fromBlock : graphEvents?.lastBlock + const rpcEvents = await this.getEventsFromRpc({ fromBlock: lastSyncBlock, type }) + const allEvents = [].concat(graphEvents?.events || [], rpcEvents || []) if (allEvents.length) { return { events: allEvents, diff --git a/services/registry/index.js b/services/registry/index.js index 056224a..99a9759 100644 --- a/services/registry/index.js +++ b/services/registry/index.js @@ -3,6 +3,7 @@ import namehash from 'eth-ens-namehash' import { BigNumber as BN } from 'bignumber.js' import { toChecksumAddress, isAddress } from 'web3-utils' +import { graph } from '@/services' import networkConfig from '@/networkConfig' import { REGISTRY_DEPLOYED_BLOCK } from '@/constants' import { sleep, flattenNArray } from '@/utils' @@ -169,9 +170,21 @@ class RelayerRegister { fetchRelayers = async () => { const blockRange = 10000 // eslint-disable-next-line prefer-const - let { blockTo, cachedEvents } = await this.getCachedData() + let { blockFrom, blockTo, cachedEvents } = await this.getCachedData() let allRelayers = cachedEvents + if (!cachedEvents || !cachedEvents.length) { + const { lastSyncBlock, events } = await graph.getAllRegisters(blockFrom) + + if (events.length) { + blockTo = lastSyncBlock + 1 + cachedEvents = events.map((el) => ({ + ensName: el.ensName, + relayerAddress: toChecksumAddress(el.address) + })) + } + } + const currentBlockNumber = await this.provider.getBlockNumber() const fromBlock = cachedEvents.length === 0 ? REGISTRY_DEPLOYED_BLOCK[1] : blockTo const blockDifference = currentBlockNumber - fromBlock @@ -181,7 +194,7 @@ class RelayerRegister { let registerRelayerEvents let lastSyncBlock = blockTo - if (cachedEvents.length > 0 || blockDifference === 0) { + if (blockDifference <= 0) { return cachedEvents } else if (blockDifference >= blockRange) { toBlock = currentBlockNumber -- 2.45.2 From 780ccdc44cce212b79273d3717f112c468275742 Mon Sep 17 00:00:00 2001 From: Theo Date: Sun, 5 May 2024 10:46:58 -0700 Subject: [PATCH 02/11] Add self-hosted RPC endpoints for some chains --- networkConfig.js | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index 2fbd980..d9162d7 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -21,8 +21,12 @@ export default { networkName: 'Ethereum Mainnet', deployedBlock: 9116966, rpcUrls: { - chainnodes: { + tornadoRPC: { name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/mainnet' + }, + chainnodes: { + name: 'Chainnodes RPC', url: 'https://mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, mevblockerRPC: { @@ -141,8 +145,12 @@ export default { multicall: '0x41263cba59eb80dc200f3e2544eda4ed6a90e76c', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', rpcUrls: { - chainnodes: { + tornadoRPC: { name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/bsc' + }, + chainnodes: { + name: 'Chainnodes RPC', url: 'https://bsc-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, oneRPC: { @@ -193,7 +201,7 @@ export default { echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', rpcUrls: { chainnodes: { - name: 'Tornado RPC', + name: 'Chainnodes RPC', url: 'https://polygon-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, oneRpc: { @@ -244,8 +252,12 @@ export default { echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', ovmGasPriceOracleContract: '0x420000000000000000000000000000000000000F', rpcUrls: { - chainnodes: { + tornadoRPC: { name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/op' + }, + chainnodes: { + name: 'Chainnodes RPC', url: 'https://optimism-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, oneRpc: { @@ -295,8 +307,12 @@ export default { multicall: '0x842eC2c7D803033Edf55E478F461FC547Bc54EB2', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', rpcUrls: { - chainnodes: { + tornadoRPC: { name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/arbitrum' + }, + chainnodes: { + name: 'Chainnodes RPC', url: 'https://arbitrum-one.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, oneRpc: { @@ -350,8 +366,12 @@ export default { multicall: '0xb5b692a88bdfc81ca69dcb1d924f59f0413a602a', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', rpcUrls: { - chainnodes: { + tornadoRPC: { name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/gnosis' + }, + chainnodes: { + name: 'Chainnodes RPC', url: 'https://gnosis-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, blockPi: { -- 2.45.2 From ca946343d25a19130028ed76a91b35e379ca5e1c Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 01:05:19 +0000 Subject: [PATCH 03/11] Fixed windows build with latest node.js lts --- package.json | 7 ++++--- scripts/copyFile.js | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 scripts/copyFile.js diff --git a/package.json b/package.json index da101c6..a4a3247 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,15 @@ "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "precommit": "yarn lint", "test": "jest", - "dev": "cross-env NODE_OPTIONS='--max-old-space-size=8192' nuxt", - "build": "nuxt build", + "dev": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt", + "build": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt build", "start": "nuxt start", "update:zip": "node -r esm scripts/updateZip.js", "update:events": "node -r esm scripts/updateEvents.js --network", "update:encrypted": "node -r esm scripts/updateEncryptedEvents.js --network", "update:tree": "node -r esm scripts/updateTree.js --network", - "generate": "cross-env NODE_OPTIONS='--max-old-space-size=8192' nuxt generate && cp dist/404.html dist/ipfs-404.html", + "update:copy": "node -r esm scripts/copyFile.js dist/404.html dist/ipfs-404.html", + "generate": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt generate && yarn update:copy", "check:sync": "node -r esm scripts/checkEventsSync.js", "ipfsUpload": "node scripts/ipfsUpload.js", "deploy:ipfs": "yarn generate && yarn ipfsUpload" diff --git a/scripts/copyFile.js b/scripts/copyFile.js new file mode 100644 index 0000000..ca38712 --- /dev/null +++ b/scripts/copyFile.js @@ -0,0 +1,15 @@ +import { argv } from 'process' +import { copyFile } from 'fs' + +function copyFiles() { + const [, , inFile, outFile] = argv + + copyFile(inFile, outFile, function(err) { + if (err) { + throw err + } + + console.log(`Copied ${inFile} to ${outFile}`) + }) +} +copyFiles() -- 2.45.2 From aaa4205145e9c0a226988b3470d89333e8fffc62 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Fri, 19 Apr 2024 06:01:15 +0000 Subject: [PATCH 04/11] Added Telegram link --- components/Footer.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/Footer.vue b/components/Footer.vue index d6e1193..3b87726 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -34,6 +34,14 @@ rel="noopener noreferrer" icon-right="stats" > + Date: Mon, 6 May 2024 01:18:20 +0000 Subject: [PATCH 05/11] Added sepolia testnet --- assets/styles/components/_icon.scss | 4 ++ components/NetworkNavbarIcon.vue | 2 + networkConfig.js | 74 ++++++++++++++++++++++++++++- 3 files changed, 79 insertions(+), 1 deletion(-) diff --git a/assets/styles/components/_icon.scss b/assets/styles/components/_icon.scss index 0b1fd29..ae85868 100644 --- a/assets/styles/components/_icon.scss +++ b/assets/styles/components/_icon.scss @@ -321,6 +321,10 @@ mask-image: url('../img/icons/goerli.svg'); } + &-ethereum-sepolia { + mask-image: url('../img/icons/ethereum.svg'); + } + &-optimism { mask-image: url('../img/icons/optimism.svg'); } diff --git a/components/NetworkNavbarIcon.vue b/components/NetworkNavbarIcon.vue index f10d5f0..a5d7f4c 100644 --- a/components/NetworkNavbarIcon.vue +++ b/components/NetworkNavbarIcon.vue @@ -27,6 +27,8 @@ export default { return 'Arbitrum' case 43114: return 'Avalanche' + case 11155111: + return 'Sepolia' default: return this.networkName } diff --git a/networkConfig.js b/networkConfig.js index d9162d7..86059e9 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -1,5 +1,5 @@ export const blockSyncInterval = 10000 -export const enabledChains = ['1', '5', '10', '56', '100', '137', '42161', '43114'] +export const enabledChains = ['1', '5', '10', '56', '100', '137', '42161', '43114', '11155111'] export default { netId1: { rpcCallRetryAttempt: 15, @@ -563,5 +563,77 @@ export default { 'torn.contract.tornadocash.eth': '0x77777FeDdddFfC19Ff86DB637967013e6C6A116C', 'governance.contract.tornadocash.eth': '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce', 'tornado-proxy.contract.tornadocash.eth': '0x454d870a72e29d5e5697f635128d18077bd04c60' + }, + netId11155111: { + rpcCallRetryAttempt: 15, + gasPrices: { + instant: 2, + fast: 2, + standard: 2, + low: 2 + }, + nativeCurrency: 'eth', + currencyName: 'ETH', + explorerUrl: { + tx: 'https://sepolia.etherscan.io/tx/', + address: 'https://sepolia.etherscan.io/address/', + block: 'https://sepolia.etherscan.io/block/' + }, + merkleTreeHeight: 20, + emptyElement: '21663839004416932945382355908790599225266501822907911457504978515578255421292', + networkName: 'Ethereum Sepolia', + deployedBlock: 5594395, + multicall: '0xcA11bde05977b3631167028862bE2a173976CA11', + echoContractAccount: '0xcDD1fc3F5ac2782D83449d3AbE80D6b7B273B0e5', + aggregatorContract: '0x4088712AC9fad39ea133cdb9130E465d235e9642', + rpcUrls: { + tornadoRPC: { + name: 'Tornado RPC', + url: 'https://tornadocash-rpc.com/sepolia' + }, + sepolia: { + name: 'Sepolia RPC', + url: 'https://rpc.sepolia.org' + }, + chainnodes: { + name: 'Chainnodes RPC', + url: 'https://sepolia.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' + } + }, + tokens: { + eth: { + instanceAddress: { + '0.1': '0x8C4A04d872a6C1BE37964A21ba3a138525dFF50b', + '1': '0x8cc930096B4Df705A007c4A039BDFA1320Ed2508', + '10': '0x8D10d506D29Fc62ABb8A290B99F66dB27Fc43585', + '100': '0x44c5C92ed73dB43888210264f0C8b36Fd68D8379' + }, + symbol: 'ETH', + decimals: 18 + }, + dai: { + instanceAddress: { + '100': '0x6921fd1a97441dd603a997ED6DDF388658daf754', + '1000': '0x50a637770F5d161999420F7d70d888DE47207145', + '10000': '0xecD649870407cD43923A816Cc6334a5bdf113621', + '100000': '0x73B4BD04bF83206B6e979BE2507098F92EDf4F90' + }, + tokenAddress: '0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357', + symbol: 'DAI', + decimals: 18, + gasLimit: '55000' + } + }, + ensSubdomainKey: 'sepolia-tornado', + pollInterval: 15, + constants: { + GOVERNANCE_BLOCK: 5594395, + NOTE_ACCOUNT_BLOCK: 5594395, + ENCRYPTED_NOTES_BLOCK: 5594395, + MINING_BLOCK_TIME: 15 + }, + 'torn.contract.tornadocash.eth': '0x3AE6667167C0f44394106E197904519D808323cA', + 'governance.contract.tornadocash.eth': '0xe5324cD7602eeb387418e594B87aCADee08aeCAD', + 'tornado-router.contract.tornadocash.eth': '0x1572AFE6949fdF51Cb3E0856216670ae9Ee160Ee' } } -- 2.45.2 From 63e770cf1255c4cc0da3fa25ca74147af9cc470d Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 01:18:33 +0000 Subject: [PATCH 06/11] Replace thegraph endpoint to ours --- services/graph.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/services/graph.js b/services/graph.js index 5366358..094d692 100644 --- a/services/graph.js +++ b/services/graph.js @@ -20,14 +20,15 @@ const link = ({ getContext }) => { } const CHAIN_GRAPH_URLS = { - 1: 'https://api.thegraph.com/subgraphs/name/tornadocash/mainnet-tornado-subgraph', + 1: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/mainnet-tornado-subgraph', 5: 'https://api.thegraph.com/subgraphs/name/tornadocash/goerli-tornado-subgraph', - 10: 'https://api.thegraph.com/subgraphs/name/tornadocash/optimism-tornado-subgraph', - 56: 'https://api.thegraph.com/subgraphs/name/tornadocash/bsc-tornado-subgraph', - 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', - 43114: 'https://api.thegraph.com/subgraphs/name/tornadocash/avalanche-tornado-subgraph' + 10: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/optimism-tornado-subgraph', + 56: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/bsc-tornado-subgraph', + 100: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/xdai-tornado-subgraph', + 137: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/matic-tornado-subgraph', + 42161: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/arbitrum-tornado-subgraph', + 43114: 'https://api.thegraph.com/subgraphs/name/tornadocash/avalanche-tornado-subgraph', + 11155111: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/sepolia-tornado-subgraph' } const defaultOptions = { @@ -45,7 +46,7 @@ const client = new ApolloClient({ }) const registryClient = new ApolloClient({ - uri: 'https://api.thegraph.com/subgraphs/name/tornadocash/tornado-relayer-registry', + uri: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/tornado-relayer-registry', cache: new InMemoryCache(), credentials: 'omit', defaultOptions -- 2.45.2 From bf3d37dad68d22644601bc7a08c30bdec627aa03 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 15:32:41 +0000 Subject: [PATCH 07/11] Move latest node.js flags to :lts command --- package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a4a3247..d9b73b0 100644 --- a/package.json +++ b/package.json @@ -7,15 +7,18 @@ "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "precommit": "yarn lint", "test": "jest", - "dev": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt", - "build": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt build", + "dev": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt", + "dev:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt", + "build": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt build", + "build:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt build", "start": "nuxt start", "update:zip": "node -r esm scripts/updateZip.js", "update:events": "node -r esm scripts/updateEvents.js --network", "update:encrypted": "node -r esm scripts/updateEncryptedEvents.js --network", "update:tree": "node -r esm scripts/updateTree.js --network", "update:copy": "node -r esm scripts/copyFile.js dist/404.html dist/ipfs-404.html", - "generate": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt generate && yarn update:copy", + "generate": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt generate && yarn update:copy", + "generate:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt generate && yarn update:copy", "check:sync": "node -r esm scripts/checkEventsSync.js", "ipfsUpload": "node scripts/ipfsUpload.js", "deploy:ipfs": "yarn generate && yarn ipfsUpload" -- 2.45.2 From 1221aad973ef9ffe38d5aa713dd7a397b21f60e0 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 15:52:06 +0000 Subject: [PATCH 08/11] Added script to patch old vuex package --- package.json | 7 ++++--- scripts/vuex.js | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 scripts/vuex.js diff --git a/package.json b/package.json index d9b73b0..7c8a693 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,11 @@ "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "precommit": "yarn lint", "test": "jest", + "fix:vuex": "node ./scripts/vuex.js", "dev": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt", - "dev:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt", + "dev:lts": "yarn fix:vuex && cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt", "build": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt build", - "build:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt build", + "build:lts": "yarn fix:vuex && cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt build", "start": "nuxt start", "update:zip": "node -r esm scripts/updateZip.js", "update:events": "node -r esm scripts/updateEvents.js --network", @@ -18,7 +19,7 @@ "update:tree": "node -r esm scripts/updateTree.js --network", "update:copy": "node -r esm scripts/copyFile.js dist/404.html dist/ipfs-404.html", "generate": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192\" nuxt generate && yarn update:copy", - "generate:lts": "cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt generate && yarn update:copy", + "generate:lts": "yarn fix:vuex && cross-env NODE_OPTIONS=\"--max_old_space_size=8192 --openssl-legacy-provider\" nuxt generate && yarn update:copy", "check:sync": "node -r esm scripts/checkEventsSync.js", "ipfsUpload": "node scripts/ipfsUpload.js", "deploy:ipfs": "yarn generate && yarn ipfsUpload" diff --git a/scripts/vuex.js b/scripts/vuex.js new file mode 100644 index 0000000..145f80c --- /dev/null +++ b/scripts/vuex.js @@ -0,0 +1,24 @@ +/** + * Manually patch vuex to support Node.js >= 18.x + * + * See issue https://github.com/vuejs/vuex/issues/2160 + * https://github.com/vuejs/vuex/commit/397e9fba45c8b4ec0c4a33d2578e34829bd348d7 + */ +const fs = require('fs') + +const pkgJson = JSON.parse(fs.readFileSync('./node_modules/vuex/package.json', { encoding: 'utf8' })) +const backupJson = JSON.stringify(pkgJson, null, 2) + +let changes = false + +if (!pkgJson.exports['./*']) { + pkgJson.exports['./*'] = './*' + + changes = true +} + + +if (changes) { + fs.writeFileSync('./node_modules/vuex/package.backup.json', backupJson + '\n') + fs.writeFileSync('./node_modules/vuex/package.json', JSON.stringify(pkgJson, null, 2) + '\n') +} -- 2.45.2 From 2fcf0cb443e1e5411025019b3a4e67bddc7bbf18 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 16:05:16 +0000 Subject: [PATCH 09/11] Remove goerli testnet and comment out frozen instances --- assets/styles/components/_icon.scss | 4 - components/Footer.vue | 2 +- components/NetworkNavbarIcon.vue | 2 - components/settings/SettingsModalBox.vue | 2 +- constants/variables.js | 3 - networkConfig.js | 116 +---------------------- services/graph.js | 1 - store/application.js | 1 - 8 files changed, 6 insertions(+), 125 deletions(-) diff --git a/assets/styles/components/_icon.scss b/assets/styles/components/_icon.scss index ae85868..52b74bf 100644 --- a/assets/styles/components/_icon.scss +++ b/assets/styles/components/_icon.scss @@ -317,10 +317,6 @@ mask-image: url('../img/icons/ethereum.svg'); } - &-ethereum-goerli { - mask-image: url('../img/icons/goerli.svg'); - } - &-ethereum-sepolia { mask-image: url('../img/icons/ethereum.svg'); } diff --git a/components/Footer.vue b/components/Footer.vue index 3b87726..3752fe7 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -109,7 +109,7 @@ export default { ...mapGetters('metamask', ['networkConfig', 'netId']), ...mapGetters('txHashKeeper', ['addressExplorerUrl']), duneLink() { - const mainnetNetworks = [1, 5] + const mainnetNetworks = [1] if (mainnetNetworks.includes(Number(this.netId))) { return 'https://dune.xyz/poma/tornado-cash_1' diff --git a/components/NetworkNavbarIcon.vue b/components/NetworkNavbarIcon.vue index a5d7f4c..0d8f391 100644 --- a/components/NetworkNavbarIcon.vue +++ b/components/NetworkNavbarIcon.vue @@ -17,8 +17,6 @@ export default { switch (this.netId) { case 1: return 'Ethereum' - case 5: - return 'Goerli' case 56: return 'BSC Mainnet' case 137: diff --git a/components/settings/SettingsModalBox.vue b/components/settings/SettingsModalBox.vue index 4925c8e..f4a17aa 100644 --- a/components/settings/SettingsModalBox.vue +++ b/components/settings/SettingsModalBox.vue @@ -52,7 +52,7 @@ export default { }), ...mapState('relayer', ['isLoadingRelayers', 'validRelayers']), isRelayersAvailable() { - return !this.isLoadingRelayers && this.validRelayers.length > 0; + return !this.isLoadingRelayers && this.validRelayers.length > 0 } }, created() { diff --git a/constants/variables.js b/constants/variables.js index 7a2d272..3a31ad6 100644 --- a/constants/variables.js +++ b/constants/variables.js @@ -52,9 +52,6 @@ export const cachedEventsLength = { mainnet: { ENCRYPTED_NOTES: 16898 }, - goerli: { - ENCRYPTED_NOTES: 1662 - }, bsc: { ENCRYPTED_NOTES: 11333 } diff --git a/networkConfig.js b/networkConfig.js index 86059e9..68070ba 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -1,5 +1,5 @@ export const blockSyncInterval = 10000 -export const enabledChains = ['1', '5', '10', '56', '100', '137', '42161', '43114', '11155111'] +export const enabledChains = ['1', '10', '56', '100', '137', '42161', '43114', '11155111'] export default { netId1: { rpcCallRetryAttempt: 15, @@ -78,6 +78,8 @@ export default { decimals: 8, gasLimit: '425000' }, + /** + * Instances frozen due to sanctions usdc: { instanceAddress: { '100': '0xd96f2B1c14Db8458374d9Aca76E26c3D18364307', @@ -98,6 +100,7 @@ export default { decimals: 6, gasLimit: '100000' }, + **/ wbtc: { instanceAddress: { '0.1': '0x178169B423a011fff22B9e3F3abeA13414dDD0F1', @@ -453,117 +456,6 @@ export default { }, 'tornado-proxy-light.contract.tornadocash.eth': '0x0D5550d52428E7e3175bfc9550207e4ad3859b17' }, - netId5: { - rpcCallRetryAttempt: 15, - gasPrices: { - instant: 80, - fast: 50, - standard: 25, - low: 8 - }, - nativeCurrency: 'eth', - currencyName: 'gETH', - explorerUrl: { - tx: 'https://goerli.etherscan.io/tx/', - address: 'https://goerli.etherscan.io/address/', - block: 'https://goerli.etherscan.io/block/' - }, - merkleTreeHeight: 20, - emptyElement: '21663839004416932945382355908790599225266501822907911457504978515578255421292', - networkName: 'Ethereum Goerli', - deployedBlock: 3781595, - multicall: '0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e', - echoContractAccount: '0x37e6859804b6499d1e4a86d70a5fdd5de6a0ac65', - aggregatorContract: '0x8cb1436F64a3c33aD17bb42F94e255c4c0E871b2', - rpcUrls: { - chainnodes: { - name: 'Tornado RPC', - url: 'https://goerli.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' - }, - gatewayRPC: { - name: 'Gateway RPC', - url: 'https://rpc.goerli.eth.gateway.fm' - } - }, - tokens: { - eth: { - instanceAddress: { - '0.1': '0x6Bf694a291DF3FeC1f7e69701E3ab6c592435Ae7', - '1': '0x3aac1cC67c2ec5Db4eA850957b967Ba153aD6279', - '10': '0x723B78e67497E85279CB204544566F4dC5d2acA0', - '100': '0x0E3A09dDA6B20aFbB34aC7cD4A6881493f3E7bf7' - }, - symbol: 'ETH', - decimals: 18 - }, - dai: { - instanceAddress: { - '100': '0x76D85B4C0Fc497EeCc38902397aC608000A06607', - '1000': '0xCC84179FFD19A1627E79F8648d09e095252Bc418', - '10000': '0xD5d6f8D9e784d0e26222ad3834500801a68D027D', - '100000': '0x407CcEeaA7c95d2FE2250Bf9F2c105aA7AAFB512' - }, - tokenAddress: '0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60', - symbol: 'DAI', - decimals: 18, - gasLimit: '55000' - }, - cdai: { - instanceAddress: { - '5000': '0x833481186f16Cece3f1Eeea1a694c42034c3a0dB', - '50000': '0xd8D7DE3349ccaA0Fde6298fe6D7b7d0d34586193', - '500000': '0x8281Aa6795aDE17C8973e1aedcA380258Bc124F9', - '5000000': '0x57b2B8c82F065de8Ef5573f9730fC1449B403C9f' - }, - tokenAddress: '0x822397d9a55d0fefd20F5c4bCaB33C5F65bd28Eb', - symbol: 'cDAI', - decimals: 8, - gasLimit: '425000' - }, - usdc: { - instanceAddress: { - '100': '0x05E0b5B40B7b66098C2161A5EE11C5740A3A7C45', - '1000': '0x23173fE8b96A4Ad8d2E17fB83EA5dcccdCa1Ae52' - }, - tokenAddress: '0xD87Ba7A50B2E7E660f678A895E4B72E7CB4CCd9C', - symbol: 'USDC', - decimals: 6, - gasLimit: '80000' - }, - usdt: { - instanceAddress: { - '100': '0x538Ab61E8A9fc1b2f93b3dd9011d662d89bE6FE6', - '1000': '0x94Be88213a387E992Dd87DE56950a9aef34b9448' - }, - tokenAddress: '0xb7FC2023D96AEa94Ba0254AA5Aeb93141e4aad66', - symbol: 'USDT', - decimals: 6, - gasLimit: '100000' - }, - wbtc: { - instanceAddress: { - '0.1': '0x242654336ca2205714071898f67E254EB49ACdCe', - '1': '0x776198CCF446DFa168347089d7338879273172cF', - '10': '0xeDC5d01286f99A066559F60a585406f3878a033e' - }, - tokenAddress: '0xC04B0d3107736C32e19F1c62b2aF67BE61d63a05', - symbol: 'WBTC', - decimals: 8, - gasLimit: '85000' - } - }, - ensSubdomainKey: 'goerli-tornado', - pollInterval: 15, - constants: { - GOVERNANCE_BLOCK: 3945171, - NOTE_ACCOUNT_BLOCK: 4131375, - ENCRYPTED_NOTES_BLOCK: 4131375, - MINING_BLOCK_TIME: 15 - }, - 'torn.contract.tornadocash.eth': '0x77777FeDdddFfC19Ff86DB637967013e6C6A116C', - 'governance.contract.tornadocash.eth': '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce', - 'tornado-proxy.contract.tornadocash.eth': '0x454d870a72e29d5e5697f635128d18077bd04c60' - }, netId11155111: { rpcCallRetryAttempt: 15, gasPrices: { diff --git a/services/graph.js b/services/graph.js index 094d692..4531039 100644 --- a/services/graph.js +++ b/services/graph.js @@ -21,7 +21,6 @@ const link = ({ getContext }) => { const CHAIN_GRAPH_URLS = { 1: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/mainnet-tornado-subgraph', - 5: 'https://api.thegraph.com/subgraphs/name/tornadocash/goerli-tornado-subgraph', 10: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/optimism-tornado-subgraph', 56: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/bsc-tornado-subgraph', 100: 'https://tornadocash-rpc.com/subgraphs/name/tornadocash/xdai-tornado-subgraph', diff --git a/store/application.js b/store/application.js index 363abcb..a4afa98 100644 --- a/store/application.js +++ b/store/application.js @@ -410,7 +410,6 @@ const actions = { const networksWithCache = { 1: cachedEventsLength.mainnet.ENCRYPTED_NOTES, - 5: cachedEventsLength.goerli.ENCRYPTED_NOTES, 56: cachedEventsLength.bsc.ENCRYPTED_NOTES } -- 2.45.2 From 2371ec0ebb2d06fad143ccc286a68e00a9235ffe Mon Sep 17 00:00:00 2001 From: nanli777torn Date: Sat, 18 Jan 2025 09:09:59 +0800 Subject: [PATCH 10/11] test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21c3f8a..c8d6b55 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Tornado Cash Classic UI +# Tornado Cash Classic UI test > Self-hostable Tornado Cash UI software for interacting with the protocol -- 2.45.2 From 8791b5aff8b08a7d53c9335be132cf5889f4f32e Mon Sep 17 00:00:00 2001 From: nanli777torn Date: Sat, 18 Jan 2025 09:22:39 +0800 Subject: [PATCH 11/11] update graph to thegraph,add graphApiKey --- README.md | 2 +- components/Settings.vue | 24 +++++++++++++++++++++++- constants/variables.js | 2 ++ langs/en.json | 1 + langs/es.json | 1 + langs/fr.json | 1 + langs/ru.json | 1 + langs/tr.json | 1 + langs/uk.json | 1 + langs/zh.json | 1 + services/graph.js | 39 ++++++++++++++++++++++++++++++++------- 11 files changed, 65 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c8d6b55..21c3f8a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Tornado Cash Classic UI test +# Tornado Cash Classic UI > Self-hostable Tornado Cash UI software for interacting with the protocol diff --git a/components/Settings.vue b/components/Settings.vue index a4a8889..11c4344 100644 --- a/components/Settings.vue +++ b/components/Settings.vue @@ -46,6 +46,22 @@

{{ hasErrorRpc.msg }}

+ +
+ + Graph ApiKey + +
+
+
+ +