From ca946343d25a19130028ed76a91b35e379ca5e1c Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Mon, 6 May 2024 01:05:19 +0000 Subject: [PATCH 1/4] 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 2/4] 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 3/4] 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 4/4] 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