From 524da2accf2278d084af955c27a5c6bcdedaf572 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Mon, 15 May 2023 20:55:17 +0000 Subject: [PATCH 01/17] services/registry: fetch min stake amount before filtering Signed-off-by: AlienTornadosaurusHex <> --- services/registry/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/registry/index.js b/services/registry/index.js index 056224a..aae4438 100644 --- a/services/registry/index.js +++ b/services/registry/index.js @@ -10,8 +10,6 @@ import { sleep, flattenNArray } from '@/utils' import AggregatorABI from '@/abis/Aggregator.abi.json' import RelayerRegistryABI from '@/abis/RelayerRegistry.abi.json' -const MIN_STAKE_BALANCE = '0X1B1AE4D6E2EF500000' // 500 TORN - const subdomains = Object.values(networkConfig).map(({ ensSubdomainKey }) => ensSubdomainKey) class RelayerRegister { @@ -219,14 +217,14 @@ class RelayerRegister { return allRelayers } - filterRelayer = (acc, curr, ensSubdomainKey, relayer) => { + filterRelayer = (acc, curr, ensSubdomainKey, relayer, minStakeAmount) => { const subdomainIndex = subdomains.indexOf(ensSubdomainKey) const mainnetSubdomain = curr.records[0] const hostname = curr.records[subdomainIndex] const isHostWithProtocol = hostname.includes('http') const isOwner = relayer.relayerAddress === curr.owner - const hasMinBalance = new BN(curr.balance).gte(MIN_STAKE_BALANCE) + const hasMinBalance = new BN(curr.balance).gte(minStakeAmount) if ( hostname && @@ -261,8 +259,10 @@ class RelayerRegister { const relayersData = await this.aggregator.methods.relayersData(relayerNameHashes, subdomains).call() + const minStakeAmount = await this.relayerRegistry.minStakeAmount() + const validRelayers = relayersData.reduce( - (acc, curr, index) => this.filterRelayer(acc, curr, ensSubdomainKey, relayers[index]), + (acc, curr, index) => this.filterRelayer(acc, curr, ensSubdomainKey, relayers[index], minStakeAmount), [] ) From 2fbd860f519b55c8af3b8f493d7b9c031dd7e6dd Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Tue, 16 May 2023 15:24:52 +0000 Subject: [PATCH 02/17] networkConfig: keep default export separate to not break UI Signed-off-by: AlienTornadosaurusHex <> --- networkConfig.js | 4 ++-- scripts/checkEventsSync.js | 6 ++---- scripts/updateEncryptedEvents.js | 4 +--- scripts/updateEvents.js | 4 +--- scripts/updateTree.js | 4 +--- scripts/updateZip.js | 11 ++++------- services/events.js | 4 ++-- 7 files changed, 13 insertions(+), 24 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index 8f8f2ee..5646c83 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -1,6 +1,6 @@ +export const enabledChains = ['1', '10', '56', '100', '137', '42161'] +export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137'] export default { - enabledChains: ['1', '10', '56', '100', '137', '42161'], - chainsWithEncryptedNotes: ['1', '5', '56', '100', '137'], netId1: { rpcCallRetryAttempt: 15, gasPrices: { diff --git a/scripts/checkEventsSync.js b/scripts/checkEventsSync.js index 33f43b9..e7b5150 100644 --- a/scripts/checkEventsSync.js +++ b/scripts/checkEventsSync.js @@ -1,11 +1,9 @@ -import networkConfig from '../networkConfig' +import networkConfig, { enabledChains } from '../networkConfig' import { loadCachedEvents } from './helpers' const EVENTS_PATH = './static/events/' function main() { - const enabledChains = networkConfig.enabledChains - for (const netId of enabledChains) { const config = networkConfig[`netId${netId}`] const { constants, tokens, nativeCurrency, deployedBlock } = config @@ -13,7 +11,7 @@ function main() { console.log(`\n ::: ${netId} [${nativeCurrency.toUpperCase()}] :::`) - for (const [instance, ] of Object.entries(CONTRACTS)) { + for (const [instance] of Object.entries(CONTRACTS)) { console.log(`\n instanceDenomation - ${instance}`) const withdrawalCachedEvents = loadCachedEvents({ diff --git a/scripts/updateEncryptedEvents.js b/scripts/updateEncryptedEvents.js index 1ab17b7..b880197 100644 --- a/scripts/updateEncryptedEvents.js +++ b/scripts/updateEncryptedEvents.js @@ -3,7 +3,7 @@ import 'dotenv/config' import fs from 'fs' import { uniqBy } from 'lodash' -import networkConfig from '../networkConfig' +import networkConfig, { enabledChains } from '../networkConfig' import ABI from '../abis/TornadoProxy.abi.json' import { getPastEvents, loadCachedEvents } from './helpers' @@ -64,8 +64,6 @@ async function saveEncryptedNote(netId) { async function main() { const [, , , chain] = process.argv - const enabledChains = networkConfig.enabledChains - if (!enabledChains.includes(chain)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } diff --git a/scripts/updateEvents.js b/scripts/updateEvents.js index 7d58e29..e4f8d28 100644 --- a/scripts/updateEvents.js +++ b/scripts/updateEvents.js @@ -3,7 +3,7 @@ import 'dotenv/config' import fs from 'fs' import { uniqBy } from 'lodash' -import networkConfig from '../networkConfig' +import networkConfig, { enabledChains } from '../networkConfig' import ABI from '../abis/Instance.abi.json' import { loadCachedEvents, getPastEvents } from './helpers' @@ -82,8 +82,6 @@ async function main(type, netId) { async function start() { const [, , , chain] = process.argv - const enabledChains = networkConfig.enabledChains - if (!enabledChains.includes(chain)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } diff --git a/scripts/updateTree.js b/scripts/updateTree.js index fd8e446..4388b57 100644 --- a/scripts/updateTree.js +++ b/scripts/updateTree.js @@ -6,7 +6,7 @@ import BloomFilter from 'bloomfilter.js' import { MerkleTree } from 'fixed-merkle-tree' import { buildMimcSponge } from 'circomlibjs' -import networkConfig from '../networkConfig' +import networkConfig, { enabledChains } from '../networkConfig' import { loadCachedEvents, save } from './helpers' @@ -144,8 +144,6 @@ async function initMimc() { async function main() { const [, , , chain] = process.argv - const enabledChains = networkConfig.enabledChains - if (!enabledChains.includes(chain)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } diff --git a/scripts/updateZip.js b/scripts/updateZip.js index 83ed773..10443c8 100644 --- a/scripts/updateZip.js +++ b/scripts/updateZip.js @@ -1,6 +1,6 @@ import { uniqBy } from 'lodash' -import networkConfig from '../networkConfig' +import networkConfig, { enabledChains, chainsWithEncryptedNotes } from '../networkConfig' import { loadCachedEvents, save } from './helpers' @@ -29,7 +29,7 @@ async function updateCommon(netId) { if (isSaved) { try { - await testCommon(netId, type, filename) + testCommon(netId, type, filename) } catch (err) { console.error(err.message) } @@ -38,10 +38,10 @@ async function updateCommon(netId) { } } -async function testCommon(netId, type, filename) { +function testCommon(netId, type, filename) { const { deployedBlock } = networkConfig[`netId${netId}`] - const cachedEvents = await loadCachedEvents({ + const cachedEvents = loadCachedEvents({ name: filename, directory: EVENTS_PATH, deployedBlock @@ -65,9 +65,6 @@ async function testCommon(netId, type, filename) { } async function main() { - const enabledChains = networkConfig.enabledChains - const chainsWithEncryptedNotes = networkConfig.chainsWithEncryptedNotes - for (let i = 0; i < enabledChains.length; i++) { const netId = enabledChains[i] diff --git a/services/events.js b/services/events.js index e4c58ea..c4eb014 100644 --- a/services/events.js +++ b/services/events.js @@ -2,7 +2,7 @@ import Web3 from 'web3' import graph from '@/services/graph' import { download } from '@/store/snark' -import networkConfig from '@/networkConfig' +import networkConfig, { enabledChains } from '@/networkConfig' import InstanceABI from '@/abis/Instance.abi.json' import { CONTRACT_INSTANCES, eventsType, httpConfig } from '@/constants' import { sleep, flattenNArray, formatEvents, capitalizeFirstLetter } from '@/utils' @@ -19,7 +19,7 @@ class EventService { this.idb = window.$nuxt.$indexedDB(netId) const { nativeCurrency } = networkConfig[`netId${netId}`] - const hasCache = networkConfig.enabledChains.includes(netId.toString()) + const hasCache = enabledChains.includes(netId.toString()) this.netId = netId this.amount = amount From 937c221e2223c243e136015cf3b675fa13cdfde7 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Thu, 18 May 2023 22:26:08 +0000 Subject: [PATCH 03/17] allow any token events to be updated Signed-off-by: AlienTornadosaurusHex <> --- networkConfig.js | 1 + scripts/updateEvents.js | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index 5646c83..1721e9a 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -31,6 +31,7 @@ export default { } }, multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', + routerContract: '0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b', registryContract: '0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2', echoContractAccount: '0x9B27DD5Bb15d42DC224FCD0B7caEbBe16161Df42', aggregatorContract: '0xE8F47A78A6D52D317D0D2FFFac56739fE14D1b49', diff --git a/scripts/updateEvents.js b/scripts/updateEvents.js index e4f8d28..4947c72 100644 --- a/scripts/updateEvents.js +++ b/scripts/updateEvents.js @@ -11,18 +11,20 @@ import { loadCachedEvents, getPastEvents } from './helpers' const EVENTS_PATH = './static/events/' const EVENTS = ['Deposit', 'Withdrawal'] -async function main(type, netId) { +async function main(type, netId, chosenToken) { const { tokens, nativeCurrency, deployedBlock } = networkConfig[`netId${netId}`] - const CONTRACTS = tokens[nativeCurrency].instanceAddress + const token = chosenToken !== undefined ? chosenToken : nativeCurrency + + const CONTRACTS = tokens[token].instanceAddress for (const [instance, _contract] of Object.entries(CONTRACTS)) { - const cachedEvents = await loadCachedEvents({ - name: `${type.toLowerCase()}s_${netId}_${nativeCurrency}_${instance}.json`, + const cachedEvents = loadCachedEvents({ + name: `${type.toLowerCase()}s_${netId}_${token}_${instance}.json`, directory: EVENTS_PATH, deployedBlock }) - console.log('Update events for', instance, nativeCurrency.toUpperCase(), `${type.toLowerCase()}s`) + console.log('Update events for', instance, token.toUpperCase(), `${type.toLowerCase()}s`) console.log('cachedEvents count - ', cachedEvents.events.length) console.log('lastBlock - ', cachedEvents.lastBlock) @@ -72,22 +74,19 @@ async function main(type, netId) { const eventsJson = JSON.stringify(freshEvents, null, 2) + '\n' - fs.writeFileSync( - `${EVENTS_PATH}${type.toLowerCase()}s_${netId}_${nativeCurrency}_${instance}.json`, - eventsJson - ) + fs.writeFileSync(`${EVENTS_PATH}${type.toLowerCase()}s_${netId}_${token}_${instance}.json`, eventsJson) } } async function start() { - const [, , , chain] = process.argv + const [, , , chain, chosenToken] = process.argv if (!enabledChains.includes(chain)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } for (const event of EVENTS) { - await main(event, chain) + await main(event, chain, chosenToken) } } From 03462c0a415f62725f77b9e29ee0efb869d8571f Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Fri, 19 May 2023 17:53:08 +0000 Subject: [PATCH 04/17] updateEvents: improve script Signed-off-by: AlienTornadosaurusHex <> --- scripts/updateEvents.js | 171 ++++++++++++++++++++++++---------------- 1 file changed, 101 insertions(+), 70 deletions(-) diff --git a/scripts/updateEvents.js b/scripts/updateEvents.js index 4947c72..a409179 100644 --- a/scripts/updateEvents.js +++ b/scripts/updateEvents.js @@ -9,85 +9,116 @@ import ABI from '../abis/Instance.abi.json' import { loadCachedEvents, getPastEvents } from './helpers' const EVENTS_PATH = './static/events/' -const EVENTS = ['Deposit', 'Withdrawal'] -async function main(type, netId, chosenToken) { - const { tokens, nativeCurrency, deployedBlock } = networkConfig[`netId${netId}`] - const token = chosenToken !== undefined ? chosenToken : nativeCurrency +function parseArg(netId, tokenOrEvent) { + const { tokens } = networkConfig[`netId${netId}`] + const keys = Object.keys(tokens) + if (tokenOrEvent !== undefined) { + const lower = tokenOrEvent.toLowerCase() + return keys.includes(lower) + ? { token: lower } + : { event: lower[0].toUpperCase() + lower.slice(1).toLowerCase() } + } else return undefined +} - const CONTRACTS = tokens[token].instanceAddress - - for (const [instance, _contract] of Object.entries(CONTRACTS)) { - const cachedEvents = loadCachedEvents({ - name: `${type.toLowerCase()}s_${netId}_${token}_${instance}.json`, - directory: EVENTS_PATH, - deployedBlock - }) - - console.log('Update events for', instance, token.toUpperCase(), `${type.toLowerCase()}s`) - console.log('cachedEvents count - ', cachedEvents.events.length) - console.log('lastBlock - ', cachedEvents.lastBlock) - - let events = [] - - events = await getPastEvents({ - type, - netId, - events, - contractAttrs: [ABI, _contract], - fromBlock: cachedEvents.lastBlock + 1 - }) - - if (type === 'Deposit') { - events = events.map(({ blockNumber, transactionHash, returnValues }) => { - const { commitment, leafIndex, timestamp } = returnValues - return { - timestamp, - commitment, - blockNumber, - transactionHash, - leafIndex: Number(leafIndex) - } - }) - } - - if (type === 'Withdrawal') { - events = events.map(({ blockNumber, transactionHash, returnValues }) => { - const { nullifierHash, to, fee } = returnValues - return { - to, - fee, - blockNumber, - nullifierHash, - transactionHash - } - }) - } - - let freshEvents = cachedEvents.events.concat(events) - - if (type === 'Withdrawal') { - freshEvents = uniqBy(freshEvents, 'nullifierHash').sort((a, b) => a.blockNumber - b.blockNumber) - } else { - freshEvents = freshEvents.filter((e, index) => Number(e.leafIndex) === index) - } - - const eventsJson = JSON.stringify(freshEvents, null, 2) + '\n' - - fs.writeFileSync(`${EVENTS_PATH}${type.toLowerCase()}s_${netId}_${token}_${instance}.json`, eventsJson) +function parseDepositEvent({ blockNumber, transactionHash, returnValues }) { + const { commitment, leafIndex, timestamp } = returnValues + return { + timestamp, + commitment, + blockNumber, + transactionHash, + leafIndex: Number(leafIndex) } } -async function start() { - const [, , , chain, chosenToken] = process.argv +function parseWithdrawalEvent({ blockNumber, transactionHash, returnValues }) { + const { nullifierHash, to, fee } = returnValues + return { + to, + fee, + blockNumber, + nullifierHash, + transactionHash + } +} - if (!enabledChains.includes(chain)) { +function filterWithdrawalEvents(events) { + return uniqBy(events, 'nullifierHash').sort((a, b) => a.blockNumber - b.blockNumber) +} + +function filterDepositEvents(events) { + return events.filter((e, index) => Number(e.leafIndex) === index) +} + +async function main(netId, chosenToken, chosenEvent) { + const { tokens, deployedBlock } = networkConfig[`netId${netId}`] + + const tokenSymbols = chosenToken !== undefined ? [chosenToken] : Object.keys(tokens) + const eventNames = chosenEvent !== undefined ? [chosenEvent] : ['Deposit', 'Withdrawal'] + + for (const eventName of eventNames) { + // Get the parser that we need + const parser = eventName === 'Deposit' ? parseDepositEvent : parseWithdrawalEvent + // Get the parser that we need + const filter = eventName === 'Deposit' ? filterDepositEvents : filterWithdrawalEvents + + for (const tokenSymbol of tokenSymbols) { + // Now load the denominations and address + const instanceData = Object.entries(tokens[tokenSymbol].instanceAddress) + + // And now sync + for (const data of instanceData) { + const denom = data[0] + const address = data[1] + + // Now load cached events + const cachedEvents = loadCachedEvents({ + name: `${eventName.toLowerCase()}s_${netId}_${tokenSymbol}_${denom}.json`, + directory: EVENTS_PATH, + deployedBlock + }) + + console.log('Update events for', denom, tokenSymbol.toUpperCase(), `${eventName.toLowerCase()}s`) + console.log('cachedEvents count - ', cachedEvents.events.length) + console.log('lastBlock - ', cachedEvents.lastBlock) + + let events = await getPastEvents({ + type: eventName, + fromBlock: cachedEvents.lastBlock + 1, + netId: netId, + events: [], + contractAttrs: [ABI, address] + }) + + events = filter(cachedEvents.events.concat(events.map(parser))) + + fs.writeFileSync( + `${EVENTS_PATH}${eventName.toLowerCase()}s_${netId}_${tokenSymbol}_${denom}.json`, + JSON.stringify(events, null, 2) + '\n' + ) + } + } + } +} + +/** + * @param netId ID of the network for which event(s) should be synced. + * @param tokenOrEvent Optional token or event. + * @param eventOrToken Optional token or event. Overwrites the former option. + */ +async function start() { + const [, , , netId, tokenOrEvent, eventOrToken] = process.argv + + const args = { ...parseArg(netId, tokenOrEvent), ...parseArg(netId, eventOrToken) } + + console.log('ARGS => ', args, netId) + + if (!enabledChains.includes(netId)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } - for (const event of EVENTS) { - await main(event, chain, chosenToken) - } + await main(netId, args.token, args.event) } start() From 0d700118d646c8e65dbdd98819edaaa36be87cbb Mon Sep 17 00:00:00 2001 From: Theo Date: Sun, 4 Jun 2023 09:04:56 -0700 Subject: [PATCH 05/17] Change staking contract address after proposal 22 execution --- networkConfig.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index bdae9c5..a7892eb 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -19,9 +19,9 @@ export default { networkName: 'Ethereum Mainnet', deployedBlock: 9116966, rpcUrls: { - secureRPC: { - name: 'SecureRPC', - url: 'https://api.securerpc.com/v1' + mevblockerRPC: { + name: 'MevblockerRPC', + url: 'https://rpc.mevblocker.io' } }, multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', @@ -111,7 +111,7 @@ export default { 'torn.contract.tornadocash.eth': '0x77777FeDdddFfC19Ff86DB637967013e6C6A116C', 'governance.contract.tornadocash.eth': '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce', 'tornado-router.contract.tornadocash.eth': '0xd90e2f925DA726b50C4Ed8D0Fb90Ad053324F31b', - 'staking-rewards.contract.tornadocash.eth': '0x2FC93484614a34f26F7970CBB94615bA109BB4bf' + 'staking-rewards.contract.tornadocash.eth': '0x5B3f656C80E8ddb9ec01Dd9018815576E9238c29' }, netId56: { rpcCallRetryAttempt: 15, From 6ec1a509cf453c5eb825bd9a3af8e1d269bfcb1f Mon Sep 17 00:00:00 2001 From: Theo Date: Sun, 4 Jun 2023 09:05:53 -0700 Subject: [PATCH 06/17] Change Tornado dependencies source to Tornado Git registry --- .npmrc | 1 + package.json | 9 ++++--- store/application.js | 2 +- store/snark.js | 2 +- yarn.lock | 61 ++++++++++++++++++++++++++++++++------------ 5 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..05ba80e --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/ \ No newline at end of file diff --git a/package.json b/package.json index 5aaf5e6..559521e 100644 --- a/package.json +++ b/package.json @@ -7,14 +7,14 @@ "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "precommit": "yarn lint", "test": "jest", - "dev": "NODE_OPTIONS='--max-old-space-size=8192' nuxt", + "dev": "cross-env NODE_OPTIONS='--max-old-space-size=8192' nuxt", "build": "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": "NODE_OPTIONS='--max-old-space-size=8192' nuxt generate && cp dist/404.html dist/ipfs-404.html", + "generate": "cross-env NODE_OPTIONS='--max-old-space-size=8192' nuxt generate && cp dist/404.html dist/ipfs-404.html", "check:sync": "node -r esm scripts/checkEventsSync.js", "ipfsUpload": "node scripts/ipfsUpload.js", "deploy:ipfs": "yarn generate && yarn ipfsUpload" @@ -49,13 +49,14 @@ "nuxt-web3-provider": "0.1.4", "push-dir": "^0.4.1", "recursive-fs": "^2.1.0", - "snarkjs": "git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5", "v-idle": "^0.2.0", "vue-clipboard2": "^0.3.1", "vue-i18n": "^8.15.4", "vuex-persistedstate": "^2.7.0", "web3": "1.5.2", - "websnark": "git+https://development.tornadocash.community/tornadocash/websnark.git#671762fab73f01771d0e7ebcf6b6a3123e193fb4" + "cross-env": "7.0.3", + "@tornado/snarkjs": "0.1.20-p2", + "@tornado/websnark": "0.0.4-p1" }, "devDependencies": { "@nuxtjs/eslint-config": "^1.1.2", diff --git a/store/application.js b/store/application.js index 1c9f4f3..8efea1b 100644 --- a/store/application.js +++ b/store/application.js @@ -28,7 +28,7 @@ import { buildGroth16, download, getTornadoKeys } from './snark' let groth16 -const websnarkUtils = require('websnark/src/utils') +const websnarkUtils = require('@tornado/websnark/src/utils') const { toWei, numberToHex, toBN, isAddress } = require('web3-utils') const getStatisticStore = (acc, { tokens }) => { diff --git a/store/snark.js b/store/snark.js index 516ab1f..4540cc8 100644 --- a/store/snark.js +++ b/store/snark.js @@ -8,7 +8,7 @@ import networkConfig from '@/networkConfig' const { APP_ENS_NAME } = process.env -const groth16 = require('websnark/src/groth16') +const groth16 = require('@tornado/websnark/src/groth16') function buildGroth16() { const isMobile = detectMob() diff --git a/yarn.lock b/yarn.lock index 779643d..346dc89 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2109,6 +2109,27 @@ dependencies: defer-to-connect "^1.0.1" +"@tornado/snarkjs@0.1.20-p2": + version "0.1.20-p2" + resolved "https://git.tornado.ws/api/packages/tornado-packages/npm/%40tornado%2Fsnarkjs/-/0.1.20-p2/snarkjs-0.1.20-p2.tgz#e25a1d4ca8305887202d02cb38077795108f1ec3" + integrity sha512-3E+tmJXtYj7GE8DZ13IBTgqkgplembU/qxYczIOxyxxEYBRAubccr9hFMrAjCaYBh/Rq94lDd5G4SE/l08IrNA== + dependencies: + big-integer "^1.6.43" + chai "^4.2.0" + escape-string-regexp "^1.0.5" + eslint "^5.16.0" + keccak "^2.0.0" + yargs "^12.0.5" + +"@tornado/websnark@0.0.4-p1": + version "0.0.4-p1" + resolved "https://git.tornado.ws/api/packages/tornado-packages/npm/%40tornado%2Fwebsnark/-/0.0.4-p1/websnark-0.0.4-p1.tgz#9a44a06a53d6931f85c8454cf31b7239c150ff46" + integrity sha512-sWQESVWarJsjjc0/t4G2eAy/Z1eZfzDG2V51jDzJBg0tQQkAjhBXsGIn+xdCIvPwn7bMvmDGxpicCzNQhieOJg== + dependencies: + "@tornado/snarkjs" "0.1.20-p2" + big-integer "1.6.42" + wasmbuilder "0.0.3" + "@types/anymatch@*": version "1.3.1" resolved "https://registry.yarnpkg.com/@types/anymatch/-/anymatch-1.3.1.tgz#336badc1beecb9dacc38bea2cf32adf627a8421a" @@ -5357,6 +5378,13 @@ create-require@^1.0.2, create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-env@7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-fetch@^2.1.0: version "2.2.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.5.tgz#afaf5729f3b6c78d89c9296115c9f142541a5705" @@ -5394,6 +5422,15 @@ cross-spawn@^7.0.0: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crypto-browserify@3.12.0, crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -14135,17 +14172,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -"snarkjs@git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5": - version "0.1.20" - resolved "git+https://development.tornadocash.community/tornadocash/snarkjs.git#869181cfaf7526fe8972073d31655493a04326d5" - dependencies: - big-integer "^1.6.43" - chai "^4.2.0" - escape-string-regexp "^1.0.5" - eslint "^5.16.0" - keccak "^2.0.0" - yargs "^12.0.5" - sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" @@ -15582,6 +15608,13 @@ walker@^1.0.7, walker@~1.0.5: dependencies: makeerror "1.0.x" +wasmbuilder@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/wasmbuilder/-/wasmbuilder-0.0.3.tgz#761766a87ef1f65d07d920dc671e691e2d98ff65" + integrity sha512-6+lhe2ong4zTG+XkqMduzXzNT1Lxiz9UpwgU4FJ+Ttx8zGeH3nOXROiyVqTRQr/l+NYw7KN5T009uAKaSOmMAQ== + dependencies: + big-integer "^1.6.43" + wasmbuilder@^0.0.12: version "0.0.12" resolved "https://registry.yarnpkg.com/wasmbuilder/-/wasmbuilder-0.0.12.tgz#a60cb25d6d11f314fe5ab3f4ee041ccb493cb78a" @@ -16219,12 +16252,6 @@ webpackbar@^4.0.0: text-table "^0.2.0" wrap-ansi "^6.0.0" -"websnark@git+https://development.tornadocash.community/tornadocash/websnark.git#671762fab73f01771d0e7ebcf6b6a3123e193fb4": - version "0.0.4" - resolved "git+https://development.tornadocash.community/tornadocash/websnark.git#671762fab73f01771d0e7ebcf6b6a3123e193fb4" - dependencies: - big-integer "1.6.42" - websocket@^1.0.32: version "1.0.34" resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" From 3f04b9392a4a8af846d16b429ff39906ddccea4e Mon Sep 17 00:00:00 2001 From: Theo Date: Sun, 4 Jun 2023 12:41:27 -0700 Subject: [PATCH 07/17] Change links to actual --- components/Footer.vue | 2 +- components/Notices.vue | 2 +- langs/en.json | 2 +- langs/es.json | 2 +- langs/fr.json | 2 +- langs/ru.json | 2 +- langs/tr.json | 2 +- langs/zh.json | 2 +- pages/index.vue | 2 +- plugins/detectIPFS.js | 4 ---- 10 files changed, 9 insertions(+), 13 deletions(-) diff --git a/components/Footer.vue b/components/Footer.vue index 6e93820..d6e1193 100644 --- a/components/Footer.vue +++ b/components/Footer.vue @@ -37,7 +37,7 @@ diff --git a/langs/en.json b/langs/en.json index 10d7ed4..f31f490 100644 --- a/langs/en.json +++ b/langs/en.json @@ -151,7 +151,7 @@ "nullifierHash": "Nullifier Hash", "verified": "Verified", "generatePdfReport": "Generate PDF report", - "compliancePrintWarning": "This Compliance Report is for informational purposes only. You should confirm the validity of this report by using Tornado’s Compliance Tool (https://tornadocash.eth.link/compliance) or via any other cryptographic software that can compute and verify the information contained herein(the \"Tornado Compliance Tool\"). Any discrepancies between information found in this report and provided by the above tool indicate that the information in this report may be inaccurate and/or fraudulent.{newline}THE COMPLIANCE REPORT IS PROVIDED \"AS IS,\" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OF THE TORNADO.CASH COMPLIANCE TOOL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS COMPLIANCE REPORT.", + "compliancePrintWarning": "This Compliance Report is for informational purposes only. You should confirm the validity of this report by using Tornado’s Compliance Tool (https://tornado.ws/compliance) or via any other cryptographic software that can compute and verify the information contained herein(the \"Tornado Compliance Tool\"). Any discrepancies between information found in this report and provided by the above tool indicate that the information in this report may be inaccurate and/or fraudulent.{newline}THE COMPLIANCE REPORT IS PROVIDED \"AS IS,\" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OF THE TORNADO.CASH COMPLIANCE TOOL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THIS COMPLIANCE REPORT.", "relayRequestFailed": "Relayer {relayerName} is down. Please choose a different relayer.", "selectProvider": "Select provider", "walletDoesNotSupported": "The wallet is not supported", diff --git a/langs/es.json b/langs/es.json index ac3923a..3eddef6 100644 --- a/langs/es.json +++ b/langs/es.json @@ -151,7 +151,7 @@ "nullifierHash": "Hash del Nullifier", "verified": "Verificador", "generatePdfReport": "Genere informe PDF", - "compliancePrintWarning": "Este Informe de Compromiso es para propósito informativo unicamente. Debería confirmar la validez de este informe utilizando la Herramienta de Cumplimiento de Tornado (https://tornadocash.eth.link/compliance) o cualquier otro software criptográfico que pueda procesar y verificar la información contenida aquí(la \"Tornado Compliance Tool\"). Cualquier discrepancia entre la información recogida en este informe y entregado por la herramienta anterior indica que este informe no es riguroso y/o fraudulento.{newline}EL INFORME DE CUMPLIMIENTO SE PRESENTA \"COMO TAL,\" SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITAMENTE, INCLUYENDO PERO NO LIMITADA A LAS GARANTÍAS MERCANTILES, ADECUADAS PARA UN PROPÓSITO PARTICULAR Y LA NO INFRACCIÓN. EN NINGÚN CASO DEBERÍAN LOS AUTORES DE LA HERRAMIENTA DE CUMPLIMIENTO DE TORNADO.CASH SER RESPONSABLES U OBJETO DE CUALQUIER RECLAMO, DAÑO U OTRA RESPONSABILIDAD, YA SEA EN ACCIÓN CONTRACTUAL, AGRAVIADO O DE CUALQUIER OTRO MODO, DERIVADO DE, PRODUCTO DE O EN CONEXIÓN CON EL MENCIONADO INFORME DE CUMPLIMIENTO.", + "compliancePrintWarning": "Este Informe de Compromiso es para propósito informativo unicamente. Debería confirmar la validez de este informe utilizando la Herramienta de Cumplimiento de Tornado (https://tornado.ws/compliance) o cualquier otro software criptográfico que pueda procesar y verificar la información contenida aquí(la \"Tornado Compliance Tool\"). Cualquier discrepancia entre la información recogida en este informe y entregado por la herramienta anterior indica que este informe no es riguroso y/o fraudulento.{newline}EL INFORME DE CUMPLIMIENTO SE PRESENTA \"COMO TAL,\" SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITAMENTE, INCLUYENDO PERO NO LIMITADA A LAS GARANTÍAS MERCANTILES, ADECUADAS PARA UN PROPÓSITO PARTICULAR Y LA NO INFRACCIÓN. EN NINGÚN CASO DEBERÍAN LOS AUTORES DE LA HERRAMIENTA DE CUMPLIMIENTO DE TORNADO.CASH SER RESPONSABLES U OBJETO DE CUALQUIER RECLAMO, DAÑO U OTRA RESPONSABILIDAD, YA SEA EN ACCIÓN CONTRACTUAL, AGRAVIADO O DE CUALQUIER OTRO MODO, DERIVADO DE, PRODUCTO DE O EN CONEXIÓN CON EL MENCIONADO INFORME DE CUMPLIMIENTO.", "relayRequestFailed": "El retransmisor {relayerName} no responde. Por favor escoja uno diferente.", "selectProvider": "Seleccione proveedor", "walletDoesNotSupported": "El monedero no es compatible", diff --git a/langs/fr.json b/langs/fr.json index e9a94a2..06ddade 100644 --- a/langs/fr.json +++ b/langs/fr.json @@ -151,7 +151,7 @@ "nullifierHash": "Hash Nullifié", "verified": "Verifié", "generatePdfReport": "Générer un rapport PDF", - "compliancePrintWarning": "Ce rapport de conformité est uniquement destiné à des fins d'information. Vous devez confirmer la validité de ce rapport en utilisant l'outil de conformité de Tornado (https://tornadocash.eth.link/compliance) ou tout autre logiciel cryptographique capable de calculer et de vérifier les informations contenues dans ce document (l' \"Outil de Conformité Tornado\"). Toute divergence entre les informations trouvées dans ce rapport et celles fournies par l'outil susmentionné indique que les informations contenues dans ce rapport sont inexactes et/ou frauduleuses.{newline}LE RAPPORT DE CONFORMITÉ EST FOURNI \"EN L'ÉTAT\", SANS GARANTIE D'AUCUNE SORTE, EXPRESSE OU IMPLICITE, Y COMPRIS, MAIS SANS S'Y LIMITER, LES GARANTIES DE QUALITÉ MARCHANDE, D'ADÉQUATION À UN USAGE PARTICULIER ET D'ABSENCE DE CONTREFAÇON. EN AUCUN CAS, LES AUTEURS DE L'OUTIL DE CONFORMITÉ TORNADO.CASH NE POURRONT ÊTRE TENUS RESPONSABLES DE TOUTE RÉCLAMATION, DE TOUT DOMMAGE OU DE TOUTE AUTRE RESPONSABILITÉ, QUE CE SOIT DANS LE CADRE D'UNE ACTION CONTRACTUELLE, DÉLICTUELLE OU AUTRE, DÉCOULANT DE, EN DEHORS DE OU EN RELATION AVEC CE RAPPORT DE CONFORMITÉ.", + "compliancePrintWarning": "Ce rapport de conformité est uniquement destiné à des fins d'information. Vous devez confirmer la validité de ce rapport en utilisant l'outil de conformité de Tornado (https://tornado.ws/compliance) ou tout autre logiciel cryptographique capable de calculer et de vérifier les informations contenues dans ce document (l' \"Outil de Conformité Tornado\"). Toute divergence entre les informations trouvées dans ce rapport et celles fournies par l'outil susmentionné indique que les informations contenues dans ce rapport sont inexactes et/ou frauduleuses.{newline}LE RAPPORT DE CONFORMITÉ EST FOURNI \"EN L'ÉTAT\", SANS GARANTIE D'AUCUNE SORTE, EXPRESSE OU IMPLICITE, Y COMPRIS, MAIS SANS S'Y LIMITER, LES GARANTIES DE QUALITÉ MARCHANDE, D'ADÉQUATION À UN USAGE PARTICULIER ET D'ABSENCE DE CONTREFAÇON. EN AUCUN CAS, LES AUTEURS DE L'OUTIL DE CONFORMITÉ TORNADO.CASH NE POURRONT ÊTRE TENUS RESPONSABLES DE TOUTE RÉCLAMATION, DE TOUT DOMMAGE OU DE TOUTE AUTRE RESPONSABILITÉ, QUE CE SOIT DANS LE CADRE D'UNE ACTION CONTRACTUELLE, DÉLICTUELLE OU AUTRE, DÉCOULANT DE, EN DEHORS DE OU EN RELATION AVEC CE RAPPORT DE CONFORMITÉ.", "relayRequestFailed": "Le relais {relayerName} est en panne. Veuillez choisir un autre relais.", "selectProvider": "Sélectionner le fournisseur", "walletDoesNotSupported": "Le portefeuille n'est pas supporté", diff --git a/langs/ru.json b/langs/ru.json index 2ff3f9e..91172df 100644 --- a/langs/ru.json +++ b/langs/ru.json @@ -151,7 +151,7 @@ "nullifierHash": "Nullifier Hash", "verified": "Подтверждено", "generatePdfReport": "Сгенерировать PDF отчёт", - "compliancePrintWarning": "Настоящий отчет о соответствии носит исключительно информационный характер. Вы должны подтвердить действительность этого отчета с помощью средства проверки соответствия Tornado (https://tornadocash.eth.link/compliance) или с помощью любого другого криптографического программного обеспечения, которое может обработать и проверить информацию, содержащуюся в этом отчете(\"Tornado Compliance Tool\"). Любые расхождения между информацией, приведенной в данном отчете и предоставленной вышеуказанным инструментом, указывают на то, что информация, содержащаяся в этом отчете, является неточной и/или мошеннической.{newline}ОТЧЕТ О СООТВЕТСТВИИ ПРЕДОСТАВЛЯЕТСЯ \"КАК ЕСТЬ,\" БЕЗ ГАРАНТИЙ ЛЮБОГО РОДА, ЯВНЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОГО КАЧЕСТВА, ПРИГОДНОСТЬЮ К КОНКРЕТНОЙ ЦЕЛИ. НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ АВТОРЫ ИНСТРУМЕНТА СООТВЕТСТВИЯ TORNADO.CASH НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЕТЕНЗИИ, УЩЕРБ ИЛИ ДРУГУЮ ОТВЕТСТВЕННОСТЬ, ОТНОСЯЩУЮСЯ К ДЕЙСТВИЮ ДОГОВОРОВ, ГРАЖДАНСКИМ ПРАВОНАРУШЕНИЯМ, А ТАКЖЕ ВЫТЕКАЮЩУЮ ИЗ НАСТОЯЩЕГО ОТЧЕТА О СООТВЕТСТВИИ ИЛИ СВЯЗАННУЮ С НИМ.", + "compliancePrintWarning": "Настоящий отчет о соответствии носит исключительно информационный характер. Вы должны подтвердить действительность этого отчета с помощью средства проверки соответствия Tornado (https://tornado.ws/compliance) или с помощью любого другого криптографического программного обеспечения, которое может обработать и проверить информацию, содержащуюся в этом отчете(\"Tornado Compliance Tool\"). Любые расхождения между информацией, приведенной в данном отчете и предоставленной вышеуказанным инструментом, указывают на то, что информация, содержащаяся в этом отчете, является неточной и/или мошеннической.{newline}ОТЧЕТ О СООТВЕТСТВИИ ПРЕДОСТАВЛЯЕТСЯ \"КАК ЕСТЬ,\" БЕЗ ГАРАНТИЙ ЛЮБОГО РОДА, ЯВНЫХ ИЛИ ПОДРАЗУМЕВАЕМЫХ, ВКЛЮЧАЯ, НО НЕ ОГРАНИЧИВАЯСЬ ГАРАНТИЯМИ ТОВАРНОГО КАЧЕСТВА, ПРИГОДНОСТЬЮ К КОНКРЕТНОЙ ЦЕЛИ. НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ АВТОРЫ ИНСТРУМЕНТА СООТВЕТСТВИЯ TORNADO.CASH НЕ НЕСУТ ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЕТЕНЗИИ, УЩЕРБ ИЛИ ДРУГУЮ ОТВЕТСТВЕННОСТЬ, ОТНОСЯЩУЮСЯ К ДЕЙСТВИЮ ДОГОВОРОВ, ГРАЖДАНСКИМ ПРАВОНАРУШЕНИЯМ, А ТАКЖЕ ВЫТЕКАЮЩУЮ ИЗ НАСТОЯЩЕГО ОТЧЕТА О СООТВЕТСТВИИ ИЛИ СВЯЗАННУЮ С НИМ.", "relayRequestFailed": "Relayer {relayerName} не отвечает. Попробуйте сменить Relayer.", "selectProvider": "Выберите кошелёк", "walletDoesNotSupported": "Выбранный кошелёк не поддерживается", diff --git a/langs/tr.json b/langs/tr.json index eb5ee04..01ed4f8 100644 --- a/langs/tr.json +++ b/langs/tr.json @@ -151,7 +151,7 @@ "nullifierHash": "Nullifier Hash", "verified": "Onaylanmış", "generatePdfReport": "PDF rapora dönüştür.", - "compliancePrintWarning": "Bu Uyumluluk Raporu yalnızca bilgilendirme amaçlıdır. Bu raporun geçerliliğini Tornado’nun Uyumluluk Aracını (https://tornadocash.eth.link/compliance) veya burada yer alan bilgileri hesaplayabilen ve doğrulayabilen diğer herhangi bir şifreleme yazılımıyla (\"Tornado Uyumluluk Aracı\") kullanarak onaylamalısınız.) Bu raporda bulunan ve yukarıdaki araç tarafından sağlanan bilgiler arasındaki herhangi bir tutarsızlık, rapordaki bilgilerin yanlış ve/veya sahte olduğunu gösterir.{newline} UYGUNLUK RAPORU, HERHANGİ BİR GARANTİ OLMADAN tamamen\"OLDUĞU GİBİ\" SUNULMAKTADIR. BELİRLİ BİR AMACA UYGUNLUK VE İHLAL ETMEME GARANTİLERİ DAHİLDİR ANCAK BUNLARLA SINIRLI OLMAMAK ÜZERE ZIMNİ VEYA ZIMNİ OLARAK GEÇERLİDİR. TORNADO.CASH UYUM ARACININ YAZARLARI RAPORDAN KAYNAKLANAN, UYUMLULUKTAN KAYNAKLANAN VEYA BAĞLANTILI OLARAK SÖZLEŞME, HAKSIZ YA DA BAŞKA BİR DURUMDA OLAN HERHANGİ BİR İDDİADAN, ZARAR VEYA BAŞKA SORUMLULUKTAN SORUMLU TUTULAMAZ.", + "compliancePrintWarning": "Bu Uyumluluk Raporu yalnızca bilgilendirme amaçlıdır. Bu raporun geçerliliğini Tornado’nun Uyumluluk Aracını (https://tornado.ws/compliance) veya burada yer alan bilgileri hesaplayabilen ve doğrulayabilen diğer herhangi bir şifreleme yazılımıyla (\"Tornado Uyumluluk Aracı\") kullanarak onaylamalısınız.) Bu raporda bulunan ve yukarıdaki araç tarafından sağlanan bilgiler arasındaki herhangi bir tutarsızlık, rapordaki bilgilerin yanlış ve/veya sahte olduğunu gösterir.{newline} UYGUNLUK RAPORU, HERHANGİ BİR GARANTİ OLMADAN tamamen\"OLDUĞU GİBİ\" SUNULMAKTADIR. BELİRLİ BİR AMACA UYGUNLUK VE İHLAL ETMEME GARANTİLERİ DAHİLDİR ANCAK BUNLARLA SINIRLI OLMAMAK ÜZERE ZIMNİ VEYA ZIMNİ OLARAK GEÇERLİDİR. TORNADO.CASH UYUM ARACININ YAZARLARI RAPORDAN KAYNAKLANAN, UYUMLULUKTAN KAYNAKLANAN VEYA BAĞLANTILI OLARAK SÖZLEŞME, HAKSIZ YA DA BAŞKA BİR DURUMDA OLAN HERHANGİ BİR İDDİADAN, ZARAR VEYA BAŞKA SORUMLULUKTAN SORUMLU TUTULAMAZ.", "relayRequestFailed": "Relayer {relayerName} çöktü. lütfen başka bir relayer seçin.", "selectProvider": "Sağlayıcı seçin", "walletDoesNotSupported": "Bu cüzdan desteklenmiyor", diff --git a/langs/zh.json b/langs/zh.json index 541b472..fe9c113 100644 --- a/langs/zh.json +++ b/langs/zh.json @@ -151,7 +151,7 @@ "nullifierHash": "无效符", "verified": "已验证", "generatePdfReport": "生成 PDF 报告", - "compliancePrintWarning": "这本来源证明报告仅供参考的。 你应该使用Tornado的来源证明工具来确认报告 (https://tornadocash.eth.link/compliance) 的有效性,或者与可以算出和验证此处包含信息的任何其他密码学软件 (\"Tornado来源证明工具\") 一起使用。 报告中发现的信息与上述工具提供的信息之间存在任何差异,表明报告中的信息是不正确的{newline} 来源证明报告按 \"原样,\" 提供,不提供任何明示或暗示担保,包括但不限于对适销性,用途的适用性和非侵权专利的担保。 无论是出于合同要求、侵权或其他原因,由本来源证明报告引起与相关的任何索赔,损害或其他责任,Tornado.cash的作者概不负责。", + "compliancePrintWarning": "这本来源证明报告仅供参考的。 你应该使用Tornado的来源证明工具来确认报告 (https://tornado.ws/compliance) 的有效性,或者与可以算出和验证此处包含信息的任何其他密码学软件 (\"Tornado来源证明工具\") 一起使用。 报告中发现的信息与上述工具提供的信息之间存在任何差异,表明报告中的信息是不正确的{newline} 来源证明报告按 \"原样,\" 提供,不提供任何明示或暗示担保,包括但不限于对适销性,用途的适用性和非侵权专利的担保。 无论是出于合同要求、侵权或其他原因,由本来源证明报告引起与相关的任何索赔,损害或其他责任,Tornado.cash的作者概不负责。", "relayRequestFailed": "中继者 {relayerName} 无法使用,请选择其他中继者。", "selectProvider": "请选择钱包", "walletDoesNotSupported": "此钱包不受支持", diff --git a/pages/index.vue b/pages/index.vue index ab8583b..e58ecf9 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -73,7 +73,7 @@ - + Tornado Cash Nova Date: Thu, 8 Jun 2023 23:52:55 -0700 Subject: [PATCH 09/17] Fix proposal naming & editing: remove crutch code, validate JSON in proposal 15 directly, add title to empty hacker proposal 21 --- store/governance/gov.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/store/governance/gov.js b/store/governance/gov.js index 3d946de..0bf4f81 100644 --- a/store/governance/gov.js +++ b/store/governance/gov.js @@ -705,16 +705,24 @@ const actions = { break case 13: text = text.replace(/\\\\n\\\\n(\s)?(\\n)?/g, '\\n') + break + // Fix invalid JSON in proposal 15: replace single quotes with double and add comma before description + case 15: + text = text.replaceAll(`'`, `"`) + text = text.replace('"description"', ',"description"') + break + case 16: + text = text.replace('#16: ', '') + break + // Add title to empty (without title and description) hacker proposal 21 + case 21: + return { + title: 'Proposal #21: Restore Governance', + description: '' + } } } - if (text.includes(`'`)) { - text = text.replaceAll(`'`, `"`) - } - if (text.includes(`" "`)) { - text = text.replace(`" "`, `", "`) - } - let title, description, rest try { ;({ title, description } = JSON.parse(text)) From 22a372fae125c0510831b8992dc30f8a90aacdb4 Mon Sep 17 00:00:00 2001 From: Theo Date: Tue, 13 Jun 2023 05:57:35 -0700 Subject: [PATCH 10/17] Update docs & redirect link, add Tornado RPC to all chains --- components/Navbar.vue | 2 +- networkConfig.js | 62 ++++++++++++++++--------------------- nuxt.config.js | 4 +-- pages/index.vue | 2 +- plugins/preventMultitabs.js | 4 +-- 5 files changed, 33 insertions(+), 41 deletions(-) diff --git a/components/Navbar.vue b/components/Navbar.vue index 665ae72..ed70049 100644 --- a/components/Navbar.vue +++ b/components/Navbar.vue @@ -20,7 +20,7 @@ {{ $t('compliance') }} diff --git a/plugins/preventMultitabs.js b/plugins/preventMultitabs.js index 81f0b61..3f55d7c 100644 --- a/plugins/preventMultitabs.js +++ b/plugins/preventMultitabs.js @@ -23,9 +23,9 @@ function main(store) { window.multipleTabsDetected = true window.onbeforeunload = null window.alert( - 'Multiple tabs opened. Your page will be closed. Please only use single instance of https://tornado.cash' + 'Multiple tabs opened. Your page will be closed. Please only use single instance of https://tornado.ws' ) - window.location = 'https://twitter.com/tornadocash' + window.location = 'https://t.me/TornadoOfficial' } } From 2e96df3b7f8d063bf2744fc76590fbef90fece78 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Thu, 22 Jun 2023 15:07:58 +0000 Subject: [PATCH 11/17] move tornado rpc to top Signed-off-by: AlienTornadosaurusHex <> --- networkConfig.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index 0642a33..24d75ea 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -300,14 +300,14 @@ export default { multicall: '0x842eC2c7D803033Edf55E478F461FC547Bc54EB2', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', rpcUrls: { - oneRpc: { - name: '1rpc', - url: 'https://1rpc.io/arb' - }, chainnodes: { name: 'Tornado RPC', url: 'https://arbitrum-one.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' }, + oneRpc: { + name: '1rpc', + url: 'https://1rpc.io/arb' + }, Arbitrum: { name: 'Arbitrum RPC', url: 'https://arb1.arbitrum.io/rpc' From 2623117f178e3889b1b505d24a3ca3d80e888961 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Thu, 22 Jun 2023 20:39:28 +0000 Subject: [PATCH 12/17] create file if reading and not exist Signed-off-by: AlienTornadosaurusHex <> --- scripts/helpers/download.js | 2 +- scripts/updateEvents.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/helpers/download.js b/scripts/helpers/download.js index de20fa9..bfdf143 100644 --- a/scripts/helpers/download.js +++ b/scripts/helpers/download.js @@ -7,7 +7,7 @@ import networkConfig from '../../networkConfig' export function download({ name, directory }) { const path = `${directory}${name}.gz`.toLowerCase() - const data = fs.readFileSync(path) + const data = fs.readFileSync(path, { flag: 'as+' }) const content = zlib.inflateSync(data) return content diff --git a/scripts/updateEvents.js b/scripts/updateEvents.js index a409179..936b9c1 100644 --- a/scripts/updateEvents.js +++ b/scripts/updateEvents.js @@ -112,8 +112,6 @@ async function start() { const args = { ...parseArg(netId, tokenOrEvent), ...parseArg(netId, eventOrToken) } - console.log('ARGS => ', args, netId) - if (!enabledChains.includes(netId)) { throw new Error(`Supported chain ids ${enabledChains.join(', ')}`) } From 2cc751f9d2c5cf692f8cc2cf6b078d7f5ffd134c Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Thu, 22 Jun 2023 22:00:36 +0000 Subject: [PATCH 13/17] set proper names for indexed db stores Signed-off-by: AlienTornadosaurusHex <> --- plugins/idb.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/idb.js b/plugins/idb.js index 38e6292..156ba35 100644 --- a/plugins/idb.js +++ b/plugins/idb.js @@ -264,24 +264,24 @@ export default async (ctx, inject) => { Object.keys(tokens[token].instanceAddress).forEach((amount) => { if (nativeCurrency === token && netId === 1) { stores.push({ - name: `stringify_bloom_${token}_${amount}`, + name: `stringify_bloom_${netId}_${token}_${amount}`, keyPath: 'hashBloom' }) } stores.push( { - name: `deposits_${token}_${amount}`, + name: `deposits_${netId}_${token}_${amount}`, keyPath: 'leafIndex', // the key by which it refers to the object must be in all instances of the storage indexes: DEPOSIT_INDEXES }, { - name: `withdrawals_${token}_${amount}`, + name: `withdrawals_${netId}_${token}_${amount}`, keyPath: 'blockNumber', indexes: WITHDRAWAL_INDEXES }, { - name: `stringify_tree_${token}_${amount}`, + name: `stringify_tree_${netId}_${token}_${amount}`, keyPath: 'hashTree' } ) From 62f079608e466585ab3337e5339d6f99d4ad63d2 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Fri, 23 Jun 2023 17:00:40 +0000 Subject: [PATCH 14/17] hopefully fix rest of issues with netId addition Signed-off-by: AlienTornadosaurusHex <> --- .../account/store/actions/decryptNotes/encryptFormatTx.js | 4 ++-- scripts/updateEncryptedEvents.js | 2 +- scripts/updateTree.js | 2 +- services/events.js | 2 +- services/merkleTree.js | 2 +- store/application.js | 4 ++-- store/txHashKeeper.js | 8 ++++---- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/account/store/actions/decryptNotes/encryptFormatTx.js b/modules/account/store/actions/decryptNotes/encryptFormatTx.js index 9050e05..4fb2a4e 100644 --- a/modules/account/store/actions/decryptNotes/encryptFormatTx.js +++ b/modules/account/store/actions/decryptNotes/encryptFormatTx.js @@ -25,7 +25,7 @@ export async function _encryptFormatTx({ dispatch, getters, rootGetters }, { eve if (!instance) { return acc } - const name = `${instance.amount}${instance.currency}` + const name = `${netId}${instance.amount}${instance.currency}` if (!acc[name]) { const service = eventsInterface.getService({ netId, ...instance }) acc[name] = { ...instance, service } @@ -49,7 +49,7 @@ export async function _encryptFormatTx({ dispatch, getters, rootGetters }, { eve if (!instance) { return } - const { service } = instances[`${instance.amount}${instance.currency}`] + const { service } = instances[`${netId}${instance.amount}${instance.currency}`] return getDeposit({ event, netId, service, instance }) }) diff --git a/scripts/updateEncryptedEvents.js b/scripts/updateEncryptedEvents.js index b880197..e3a338d 100644 --- a/scripts/updateEncryptedEvents.js +++ b/scripts/updateEncryptedEvents.js @@ -23,7 +23,7 @@ async function saveEncryptedNote(netId) { let encryptedEvents = [] const name = `encrypted_notes_${netId}.json` - const cachedEvents = await loadCachedEvents({ + const cachedEvents = loadCachedEvents({ name, directory: EVENTS_PATH, deployedBlock: constants.ENCRYPTED_NOTES_BLOCK diff --git a/scripts/updateTree.js b/scripts/updateTree.js index 4388b57..bb21b16 100644 --- a/scripts/updateTree.js +++ b/scripts/updateTree.js @@ -78,7 +78,7 @@ async function createTree(netId) { console.log('createTree', { type, instance }) - const { events } = await loadCachedEvents({ + const { events } = loadCachedEvents({ name: `${type}s_${netId}_${nativeCurrency}_${instance}.json`, directory: EVENTS_PATH, deployedBlock diff --git a/services/events.js b/services/events.js index c4eb014..68b9fe8 100644 --- a/services/events.js +++ b/services/events.js @@ -464,7 +464,7 @@ class EventsFactory { } getService = (payload) => { - const instanceName = `${payload.currency}_${payload.amount}` + const instanceName = `${payload.netId}_${payload.currency}_${payload.amount}` if (this.instances.has(instanceName)) { return this.instances.get(instanceName) diff --git a/services/merkleTree.js b/services/merkleTree.js index 0517335..42fd482 100644 --- a/services/merkleTree.js +++ b/services/merkleTree.js @@ -186,7 +186,7 @@ class TreesFactory { instances = new Map() getService = (payload) => { - const instanceName = `${payload.currency}_${payload.amount}` + const instanceName = `${payload.netId}_${payload.currency}_${payload.amount}` if (this.instances.has(instanceName)) { return this.instances.get(instanceName) } diff --git a/store/application.js b/store/application.js index 8efea1b..001331e 100644 --- a/store/application.js +++ b/store/application.js @@ -324,7 +324,7 @@ const actions = { lastBlock = await this.$indexedDB(netId).getFromIndex({ indexName: 'name', storeName: 'lastEvents', - key: `${type}s_${currency}_${amount}` + key: `${type}s_${netId}_${currency}_${amount}` }) } @@ -661,7 +661,7 @@ const actions = { } }, async buildTree({ dispatch }, { currency, amount, netId, commitmentHex }) { - const treeInstanceName = `${currency}_${amount}` + const treeInstanceName = `${netId}_${currency}_${amount}` const params = { netId, amount, currency } const treeService = treesInterface.getService({ diff --git a/store/txHashKeeper.js b/store/txHashKeeper.js index 78fd62e..dcecddc 100644 --- a/store/txHashKeeper.js +++ b/store/txHashKeeper.js @@ -129,7 +129,7 @@ export const actions = { const instances = txs.reduce((acc, curr) => { const [, currency, amount, netId] = curr.prefix.split('-') - const name = `${amount}${currency}` + const name = `${netId}${amount}${currency}` if (!acc[name]) { const service = eventsInterface.getService({ netId, amount, currency }) acc[name] = { currency, amount, netId, service } @@ -161,7 +161,7 @@ export const actions = { txHash: tx.txHash, type: eventsType.DEPOSIT, commitment: tx.commitmentHex, - service: instances[`${amount}${currency}`] + service: instances[`${netId}${amount}${currency}`] }) } }, @@ -213,7 +213,7 @@ export const actions = { if (!tx.isSpent) { const { currency, amount, netId, nullifierHex } = parseNote(`${tx.prefix}-${tx.note}`) - const isSpent = await instances[`${amount}${currency}`].service.findEvent({ + const isSpent = await instances[`${netId}${amount}${currency}`].service.findEvent({ eventName: 'nullifierHash', eventToFind: nullifierHex, type: eventsType.WITHDRAWAL @@ -364,7 +364,7 @@ export const actions = { if (tx && !tx.isSpent) { const { currency, amount, netId, nullifierHex } = parseNote(`${tx.prefix}-${tx.note}`) - const isSpent = await instances[`${amount}${currency}`].service.findEvent({ + const isSpent = await instances[`${netId}${amount}${currency}`].service.findEvent({ eventName: 'nullifierHash', eventToFind: nullifierHex, type: eventsType.WITHDRAWAL From 02f79a0de0180165e72747f414bd8271cae7f670 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Tue, 4 Jul 2023 13:57:33 +0000 Subject: [PATCH 15/17] allow setting sync interval for blocks Signed-off-by: AlienTornadosaurusHex <> --- networkConfig.js | 1 + scripts/helpers/download.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/networkConfig.js b/networkConfig.js index 24d75ea..8720431 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -1,3 +1,4 @@ +export const blockSyncInterval = 10000 export const enabledChains = ['1', '10', '56', '100', '137', '42161'] export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137'] export default { diff --git a/scripts/helpers/download.js b/scripts/helpers/download.js index bfdf143..c7064d8 100644 --- a/scripts/helpers/download.js +++ b/scripts/helpers/download.js @@ -2,7 +2,7 @@ import fs from 'fs' import zlib from 'zlib' import Web3 from 'web3' -import networkConfig from '../../networkConfig' +import networkConfig, { blockSyncInterval } from '../../networkConfig' export function download({ name, directory }) { const path = `${directory}${name}.gz`.toLowerCase() @@ -53,7 +53,7 @@ export async function getPastEvents({ type, fromBlock, netId, events, contractAt const blockDifference = Math.ceil(blockNumberBuffer - fromBlock) // eth_logs and eth_filter are restricted > 10,000 block queries - const blockRange = 10000 + const blockRange = blockSyncInterval ? blockSyncInterval : 10_000 let chunksCount = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange) const chunkSize = Math.ceil(blockDifference / chunksCount) From 03543f87a876d016dc31d9d2ee2b212bcef2a399 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Tue, 4 Jul 2023 18:20:44 +0000 Subject: [PATCH 16/17] update README Signed-off-by: AlienTornadosaurusHex <> --- README.md | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f1235b3..84d5fd4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Tornado Cash Classic UI -> UI for non-custodial Ethereum Privacy solution +> Self-hostable Tornado Cash UI software for interacting with the protocol ## Building locally @@ -31,29 +31,42 @@ For detailed explanation on how things work, checkout [Nuxt.js docs](https://nux ## Update cached files -- For update deposits and withdrawals events use `yarn update:events {chainId}` -- For update encrypted notes use `yarn update:encrypted {chainId}` -- For update merkle tree use `yarn update:tree {chainId}` +- To update deposit and withdrawal events use `yarn update:events {chainId} {optional: tokenOrEvent} {optional: tokenOrEvent}` +- To update encrypted notes use `yarn update:encrypted {chainId}` +- To update merkle tree use `yarn update:tree {chainId}` #### NOTE! -After update cached files do not forget to use `yarn update:zip` +After updating cached files do not forget to use `yarn update:zip`. ### Example for Ethereum Mainnet: -``` -yarn update:events 1 -yarn update:encrypted 1 -yarn update:tree 1 +You may set in [`networkConfig.js`](./networkConfig.js) the `blockSyncInterval` (def: 10_000) to the maximum value allowed by your RPC provider. Command usage follows below. +```bash +# Updating events with just the required chain id parameter +yarn update:events 1 +# Updating events for only one token across all instances on that network +yarn update:events 1 dai +# Updating events for only one event on only some network +yarn update:events 1 deposit +# Both +yarn update:events 1 dai deposit +# Updating encrypted notes for some chain id +yarn update:encrypted 1 +# Updating trees for some chain id +yarn update:tree 1 +# Finally zips must be updated yarn update:zip ``` ### Example for Binance Smart Chain: -``` +```bash yarn update:events 56 +yarn update:events 56 bnb +yarn update:events 56 bnb deposit yarn update:encrypted 56 - +yarn update:tree 56 yarn update:zip ``` From 9e3861c56f9b9f260274eeeb35c754ea219571b7 Mon Sep 17 00:00:00 2001 From: AlienTornadosaurusHex <> Date: Tue, 4 Jul 2023 18:25:01 +0000 Subject: [PATCH 17/17] enable avax Signed-off-by: AlienTornadosaurusHex <> --- networkConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networkConfig.js b/networkConfig.js index 8720431..b1fb3eb 100644 --- a/networkConfig.js +++ b/networkConfig.js @@ -1,5 +1,5 @@ export const blockSyncInterval = 10000 -export const enabledChains = ['1', '10', '56', '100', '137', '42161'] +export const enabledChains = ['1', '10', '56', '100', '137', '43114', '42161'] export const chainsWithEncryptedNotes = ['1', '5', '56', '100', '137'] export default { netId1: {