@@ -115,7 +140,8 @@ export default {
data() {
return {
activeTab: 0,
- isActive: false
+ isActive: false,
+ isEthLink: window.location.host === 'tornadocash.eth.link'
}
},
computed: {
@@ -158,19 +184,8 @@ export default {
}
}
} else {
- const userSelection = this.selectedInstance
- const stateSelection = this.selectedStatistic
-
- if (
- !stateSelection ||
- userSelection.amount !== stateSelection.amount ||
- userSelection.currency !== stateSelection.currency
- ) {
- this.$store.dispatch('application/setAndUpdateStatistic', {
- currency: userSelection.currency,
- amount: userSelection.amount
- })
- }
+ const { currency, amount } = this.selectedInstance
+ this.$store.dispatch('application/setAndUpdateStatistic', { currency, amount })
}
}
}
diff --git a/plugins/detectIPFS.js b/plugins/detectIPFS.js
index d1067cd..d8a9b0e 100644
--- a/plugins/detectIPFS.js
+++ b/plugins/detectIPFS.js
@@ -3,24 +3,13 @@ export default ({ store, isHMR, app }, inject) => {
inject('isLoadedFromIPFS', main)
}
function main() {
- const whiteListedDomains = [
- 'tornadocash.eth.link',
- 'tornadocash.eth.limo',
- 'tornadocashcommunity.eth.link',
- 'tornadocashcommunity.eth.limo'
- ]
+ const whiteListedDomains = ['localhost:3000', 'tornadocash.eth.link', 'tornadocash.eth.limo']
- const IPFS_GATEWAY_REGEXP = /.ipfs./
- const IPFS_LOCAL_REGEXP = /.ipfs.localhost:/
- const IPFS_SOP_GATEWAY_REGEXP = /\/ipfs\//
+ const NETLIFY_REGEXP = /deploy-preview-(\d+)--tornadocash\.netlify\.app/
- if (IPFS_LOCAL_REGEXP.test(window.location.host)) {
+ if (NETLIFY_REGEXP.test(window.location.host)) {
return false
- } else if (
- IPFS_GATEWAY_REGEXP.test(window.location.host) ||
- IPFS_SOP_GATEWAY_REGEXP.test(window.location.host) ||
- whiteListedDomains.includes(window.location.host)
- ) {
+ } else if (!whiteListedDomains.includes(window.location.host)) {
console.warn('The page has been loaded from ipfs.io. LocalStorage is disabled')
return true
}
diff --git a/plugins/idb.js b/plugins/idb.js
index 156ba35..38e6292 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_${netId}_${token}_${amount}`,
+ name: `stringify_bloom_${token}_${amount}`,
keyPath: 'hashBloom'
})
}
stores.push(
{
- name: `deposits_${netId}_${token}_${amount}`,
+ name: `deposits_${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_${netId}_${token}_${amount}`,
+ name: `withdrawals_${token}_${amount}`,
keyPath: 'blockNumber',
indexes: WITHDRAWAL_INDEXES
},
{
- name: `stringify_tree_${netId}_${token}_${amount}`,
+ name: `stringify_tree_${token}_${amount}`,
keyPath: 'hashTree'
}
)
diff --git a/plugins/preventMultitabs.js b/plugins/preventMultitabs.js
index 3f55d7c..81f0b61 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.ws'
+ 'Multiple tabs opened. Your page will be closed. Please only use single instance of https://tornado.cash'
)
- window.location = 'https://t.me/TornadoOfficial'
+ window.location = 'https://twitter.com/tornadocash'
}
}
diff --git a/scripts/checkEventsSync.js b/scripts/checkEventsSync.js
index e7b5150..4b7997d 100644
--- a/scripts/checkEventsSync.js
+++ b/scripts/checkEventsSync.js
@@ -1,21 +1,24 @@
-import networkConfig, { enabledChains } from '../networkConfig'
-import { loadCachedEvents } from './helpers'
+import networkConfig from '../networkConfig'
+import ABI from '../abis/Instance.abi.json'
+import { loadCachedEvents, getPastEvents } from './helpers'
const EVENTS_PATH = './static/events/'
+const enabledChains = ['1', '56', '100', '137' ]
-function main() {
- for (const netId of enabledChains) {
+async function main() {
+ for (let network in enabledChains) {
+ const netId = enabledChains[network]
const config = networkConfig[`netId${netId}`]
const { constants, tokens, nativeCurrency, deployedBlock } = config
const CONTRACTS = tokens[nativeCurrency].instanceAddress
console.log(`\n ::: ${netId} [${nativeCurrency.toUpperCase()}] :::`)
- for (const [instance] of Object.entries(CONTRACTS)) {
+ for (const [instance, _contract] of Object.entries(CONTRACTS)) {
console.log(`\n instanceDenomation - ${instance}`)
- const withdrawalCachedEvents = loadCachedEvents({
- name: `withdrawals_${netId}_${nativeCurrency}_${instance}.json`,
+ const withdrawalCachedEvents = await loadCachedEvents({
+ name: `withdrawals_${nativeCurrency}_${instance}.json`,
directory: EVENTS_PATH,
deployedBlock
})
@@ -24,8 +27,8 @@ function main() {
console.log('cachedEvents count - ', withdrawalCachedEvents.events.length)
console.log('lastBlock - ', withdrawalCachedEvents.lastBlock)
- const depositCachedEvents = loadCachedEvents({
- name: `deposits_${netId}_${nativeCurrency}_${instance}.json`,
+ const depositCachedEvents = await loadCachedEvents({
+ name: `withdrawals_${nativeCurrency}_${instance}.json`,
directory: EVENTS_PATH,
deployedBlock
})
@@ -34,7 +37,7 @@ function main() {
console.log('cachedEvents count - ', depositCachedEvents.events.length)
console.log('lastBlock - ', depositCachedEvents.lastBlock)
- const notesCachedEvents = loadCachedEvents({
+ const notesCachedEvents = await loadCachedEvents({
name: `encrypted_notes_${netId}.json`,
directory: EVENTS_PATH,
deployedBlock: constants.ENCRYPTED_NOTES_BLOCK
@@ -43,6 +46,7 @@ function main() {
console.log('- Notes')
console.log('cachedEvents count - ', notesCachedEvents.events.length)
console.log('lastBlock - ', notesCachedEvents.lastBlock)
+
}
}
}
diff --git a/scripts/helpers/download.js b/scripts/helpers/download.js
index c7064d8..9639de7 100644
--- a/scripts/helpers/download.js
+++ b/scripts/helpers/download.js
@@ -2,27 +2,27 @@ import fs from 'fs'
import zlib from 'zlib'
import Web3 from 'web3'
-import networkConfig, { blockSyncInterval } from '../../networkConfig'
+import networkConfig from '../../networkConfig'
-export function download({ name, directory }) {
+export async function download({ name, directory, contentType }) {
const path = `${directory}${name}.gz`.toLowerCase()
- const data = fs.readFileSync(path, { flag: 'as+' })
+ const data = fs.readFileSync(path)
const content = zlib.inflateSync(data)
return content
}
-export function loadCachedEvents({ name, directory, deployedBlock }) {
+export async function loadCachedEvents({ name, directory, deployedBlock }) {
try {
- const module = download({ contentType: 'string', directory, name })
+ const module = await download({ contentType: 'string', directory, name })
if (module) {
const events = JSON.parse(module)
return {
events,
- lastBlock: events[events.length - 1].blockNumber
+ lastBlock: events[events.length - 1].blockNumber
}
}
} catch (err) {
@@ -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 = blockSyncInterval ? blockSyncInterval : 10_000
+ const blockRange = 10000
let chunksCount = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
const chunkSize = Math.ceil(blockDifference / chunksCount)
@@ -67,7 +67,6 @@ export async function getPastEvents({ type, fromBlock, netId, events, contractAt
}
console.log(`Fetching ${type}, chainId - ${netId}`, `chunksCount - ${chunksCount}`)
-
for (let i = 0; i < chunksCount; i++)
try {
await new Promise((resolve) => setTimeout(resolve, 200))
diff --git a/scripts/helpers/save.js b/scripts/helpers/save.js
index f174bf9..3124a38 100644
--- a/scripts/helpers/save.js
+++ b/scripts/helpers/save.js
@@ -1,11 +1,14 @@
import fs from 'fs'
import zlib from 'zlib'
-export function save(filePath) {
+export async function save(filePath) {
+ const directories = filePath.split('/')
+ const fileName = directories[directories.length - 1]
+
try {
const data = fs.readFileSync(`${filePath}`)
- const payload = zlib.deflateSync(data, {
+ const payload = await zlib.deflateSync(data, {
level: zlib.constants.Z_BEST_COMPRESSION,
strategy: zlib.constants.Z_FILTERED
})
diff --git a/scripts/updateEncryptedEvents.js b/scripts/updateEncryptedEvents.js
index e3a338d..200badc 100644
--- a/scripts/updateEncryptedEvents.js
+++ b/scripts/updateEncryptedEvents.js
@@ -3,12 +3,12 @@ import 'dotenv/config'
import fs from 'fs'
import { uniqBy } from 'lodash'
-import networkConfig, { enabledChains } from '../networkConfig'
+import networkConfig from '../networkConfig'
import ABI from '../abis/TornadoProxy.abi.json'
-
import { getPastEvents, loadCachedEvents } from './helpers'
const EVENTS_PATH = './static/events/'
+const enabledChains = ['1', '5', '56', '100', '137']
async function saveEncryptedNote(netId) {
const {
@@ -23,7 +23,7 @@ async function saveEncryptedNote(netId) {
let encryptedEvents = []
const name = `encrypted_notes_${netId}.json`
- const cachedEvents = loadCachedEvents({
+ const cachedEvents = await loadCachedEvents({
name,
directory: EVENTS_PATH,
deployedBlock: constants.ENCRYPTED_NOTES_BLOCK
@@ -57,13 +57,11 @@ async function saveEncryptedNote(netId) {
freshEvents = uniqBy(freshEvents, 'encryptedNote').sort((a, b) => b.blockNumber - a.blockNumber)
const eventsJson = JSON.stringify(freshEvents, null, 2) + '\n'
-
fs.writeFileSync(`${EVENTS_PATH}${name}`, eventsJson)
}
async function main() {
const [, , , chain] = process.argv
-
if (!enabledChains.includes(chain)) {
throw new Error(`Supported chain ids ${enabledChains.join(', ')}`)
}
diff --git a/scripts/updateEvents.js b/scripts/updateEvents.js
index 936b9c1..9eca0cd 100644
--- a/scripts/updateEvents.js
+++ b/scripts/updateEvents.js
@@ -3,120 +3,86 @@ import 'dotenv/config'
import fs from 'fs'
import { uniqBy } from 'lodash'
-import networkConfig, { enabledChains } from '../networkConfig'
+import networkConfig from '../networkConfig'
import ABI from '../abis/Instance.abi.json'
-
import { loadCachedEvents, getPastEvents } from './helpers'
const EVENTS_PATH = './static/events/'
+const EVENTS = ['Deposit', 'Withdrawal']
+const enabledChains = ['1', '56', '5', '100', '137' ]
-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
-}
+async function main(type, netId) {
+ const { tokens, nativeCurrency, deployedBlock } = networkConfig[`netId${netId}`]
+ const CONTRACTS = tokens[nativeCurrency].instanceAddress
-function parseDepositEvent({ blockNumber, transactionHash, returnValues }) {
- const { commitment, leafIndex, timestamp } = returnValues
- return {
- timestamp,
- commitment,
- blockNumber,
- transactionHash,
- leafIndex: Number(leafIndex)
- }
-}
+ for (const [instance, _contract] of Object.entries(CONTRACTS)) {
+ const cachedEvents = await loadCachedEvents({
+ name: `${type.toLowerCase()}s_${nativeCurrency}_${instance}.json`,
+ directory: EVENTS_PATH,
+ deployedBlock
+ })
-function parseWithdrawalEvent({ blockNumber, transactionHash, returnValues }) {
- const { nullifierHash, to, fee } = returnValues
- return {
- to,
- fee,
- blockNumber,
- nullifierHash,
- transactionHash
- }
-}
+ console.log('cachedEvents count - ', cachedEvents.events.length)
+ console.log('lastBlock - ', cachedEvents.lastBlock)
-function filterWithdrawalEvents(events) {
- return uniqBy(events, 'nullifierHash').sort((a, b) => a.blockNumber - b.blockNumber)
-}
+ let events = []
-function filterDepositEvents(events) {
- return events.filter((e, index) => Number(e.leafIndex) === index)
-}
+ events = await getPastEvents({
+ type,
+ netId,
+ events,
+ contractAttrs: [ABI, _contract],
+ fromBlock: cachedEvents.lastBlock + 1
+ })
-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'
- )
- }
+ 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_${nativeCurrency}_${instance}.json`, eventsJson)
}
}
-/**
- * @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) }
-
- if (!enabledChains.includes(netId)) {
+ const [, , , chain] = process.argv
+ if (!enabledChains.includes(chain)) {
throw new Error(`Supported chain ids ${enabledChains.join(', ')}`)
}
- await main(netId, args.token, args.event)
+ for await (const event of EVENTS) {
+ await main(event, chain)
+ }
}
start()
diff --git a/scripts/updateTree.js b/scripts/updateTree.js
index bb21b16..1100422 100644
--- a/scripts/updateTree.js
+++ b/scripts/updateTree.js
@@ -1,12 +1,11 @@
import 'dotenv/config'
import fs from 'fs'
-
import BloomFilter from 'bloomfilter.js'
import { MerkleTree } from 'fixed-merkle-tree'
import { buildMimcSponge } from 'circomlibjs'
-import networkConfig, { enabledChains } from '../networkConfig'
+import networkConfig from '../networkConfig'
import { loadCachedEvents, save } from './helpers'
@@ -15,7 +14,7 @@ const TREES_PATH = './static/trees/'
const EVENTS_PATH = './static/events/'
const EVENTS = ['deposit']
-
+const enabledChains = ['1', '56', '100', '137' ]
let mimcHash
const trees = {
@@ -23,8 +22,8 @@ const trees = {
LEVELS: 20 // const from contract
}
-function getName({ path, type, netId, instance, format = '.json', currName = 'eth' }) {
- return `${path}${type.toLowerCase()}s_${netId}_${currName}_${instance}${format}`
+function getName({ path, type, instance, format = '.json', currName = 'eth' }) {
+ return `${path}${type.toLowerCase()}s_${currName}_${instance}${format}`
}
function createTreeZip(netId) {
@@ -37,7 +36,6 @@ function createTreeZip(netId) {
const baseFilename = getName({
type,
instance,
- netId,
format: '',
path: TREES_PATH,
currName: currencyName.toLowerCase()
@@ -47,7 +45,6 @@ function createTreeZip(netId) {
treesFolder.forEach((fileName) => {
fileName = `${TREES_PATH}${fileName}`
-
const isInstanceFile = !fileName.includes('.gz') && fileName.includes(baseFilename)
if (isInstanceFile) {
@@ -70,7 +67,6 @@ async function createTree(netId) {
const filePath = getName({
type,
instance,
- netId,
format: '',
path: TREES_PATH,
currName: currencyName.toLowerCase()
@@ -78,8 +74,8 @@ async function createTree(netId) {
console.log('createTree', { type, instance })
- const { events } = loadCachedEvents({
- name: `${type}s_${netId}_${nativeCurrency}_${instance}.json`,
+ const { events } = await loadCachedEvents({
+ name: `${type}s_${nativeCurrency}_${instance}.json`,
directory: EVENTS_PATH,
deployedBlock
})
@@ -122,12 +118,10 @@ async function createTree(netId) {
}, [])
const sliceJson = JSON.stringify(slice, null, 2) + '\n'
-
fs.writeFileSync(`${filePath}_slice${index + 1}.json`, sliceJson)
})
const bloomCache = bloom.serialize()
-
fs.writeFileSync(`${filePath}_bloom.json`, bloomCache)
}
}
@@ -143,16 +137,13 @@ async function initMimc() {
async function main() {
const [, , , chain] = process.argv
-
if (!enabledChains.includes(chain)) {
throw new Error(`Supported chain ids ${enabledChains.join(', ')}`)
}
-
await initMimc()
await createTree(chain)
-
- createTreeZip(chain)
+ await createTreeZip(chain)
}
main()
diff --git a/scripts/updateZip.js b/scripts/updateZip.js
index 10443c8..188357d 100644
--- a/scripts/updateZip.js
+++ b/scripts/updateZip.js
@@ -1,7 +1,6 @@
import { uniqBy } from 'lodash'
-import networkConfig, { enabledChains, chainsWithEncryptedNotes } from '../networkConfig'
-
+import networkConfig from '../networkConfig'
import { loadCachedEvents, save } from './helpers'
const EVENTS_PATH = './static/events/'
@@ -10,26 +9,22 @@ const EVENTS = ['Deposit', 'Withdrawal']
function updateEncrypted(netId) {
try {
const file = `${EVENTS_PATH}encrypted_notes_${netId}.json`
+
save(file)
} catch {}
}
-
async function updateCommon(netId) {
const { nativeCurrency, tokens } = networkConfig[`netId${netId}`]
console.log(Object.keys(tokens[nativeCurrency].instanceAddress))
-
for await (const type of EVENTS) {
for await (const instance of Object.keys(tokens[nativeCurrency].instanceAddress)) {
console.warn('instance', instance)
-
- const filename = `${type.toLowerCase()}s_${netId}_${nativeCurrency}_${instance}.json`
-
+ const filename = `${type.toLowerCase()}s_${nativeCurrency}_${instance}.json`
const isSaved = save(`${EVENTS_PATH}${filename}`)
-
if (isSaved) {
try {
- testCommon(netId, type, filename)
+ await testCommon(netId, type, filename)
} catch (err) {
console.error(err.message)
}
@@ -38,10 +33,10 @@ async function updateCommon(netId) {
}
}
-function testCommon(netId, type, filename) {
+async function testCommon(netId, type, filename) {
const { deployedBlock } = networkConfig[`netId${netId}`]
- const cachedEvents = loadCachedEvents({
+ const cachedEvents = await loadCachedEvents({
name: filename,
directory: EVENTS_PATH,
deployedBlock
@@ -50,13 +45,11 @@ function testCommon(netId, type, filename) {
console.log('cachedEvents', cachedEvents.events.length, type)
let events = cachedEvents.events
-
if (type === 'Withdrawal') {
events = uniqBy(cachedEvents.events, 'nullifierHash')
} else if (type === 'Deposit') {
events = cachedEvents.events.filter((e, index) => Number(e.leafIndex) === index)
}
-
if (events.length !== cachedEvents.events.length) {
console.error('events.length', events.length)
console.error('cachedEvents.events.length', cachedEvents.events.length)
@@ -65,11 +58,10 @@ function testCommon(netId, type, filename) {
}
async function main() {
- for (let i = 0; i < enabledChains.length; i++) {
- const netId = enabledChains[i]
-
- if (netId === chainsWithEncryptedNotes[i]) updateEncrypted(netId)
+ const NETWORKS = [1, 5, 56, 100, 137 ]
+ for await (const netId of NETWORKS) {
+ updateEncrypted(netId)
await updateCommon(netId)
}
}
diff --git a/services/events.js b/services/events.js
index 68b9fe8..3473e47 100644
--- a/services/events.js
+++ b/services/events.js
@@ -1,31 +1,35 @@
import Web3 from 'web3'
+import EWorker from '@/assets/events.worker.js'
+
import graph from '@/services/graph'
import { download } from '@/store/snark'
-import networkConfig, { enabledChains } from '@/networkConfig'
+import networkConfig from '@/networkConfig'
import InstanceABI from '@/abis/Instance.abi.json'
-import { CONTRACT_INSTANCES, eventsType, httpConfig } from '@/constants'
-import { sleep, flattenNArray, formatEvents, capitalizeFirstLetter } from '@/utils'
+import { CONTRACT_INSTANCES, eventsType } from '@/constants'
+import { sleep, formatEvents, capitalizeFirstLetter, flattenNArray } from '@/utils'
-let store
-if (process.browser) {
- window.onNuxtReady(({ $store }) => {
- store = $store
- })
-}
+const MIN_CORES = 2
+const WORKERS_ALLOC = 2
+const HARDWARE_CORES = window.navigator.hardwareConcurrency
+const AVAILABLE_CORES = HARDWARE_CORES / WORKERS_ALLOC || MIN_CORES
+const CORES = Math.max(AVAILABLE_CORES, MIN_CORES)
+
+const supportedCaches = ['1', '56', '100', '137']
class EventService {
constructor({ netId, amount, currency, factoryMethods }) {
this.idb = window.$nuxt.$indexedDB(netId)
const { nativeCurrency } = networkConfig[`netId${netId}`]
- const hasCache = enabledChains.includes(netId.toString())
+ const hasCache = supportedCaches.includes(netId.toString())
this.netId = netId
this.amount = amount
this.currency = currency
this.factoryMethods = factoryMethods
+ this.rpcUrl = this.factoryMethods.getProviderUrl()
this.contract = this.getContract({ netId, amount, currency })
this.isNative = nativeCurrency === this.currency
@@ -33,15 +37,17 @@ class EventService {
}
getInstanceName(type) {
- return `${type}s_${this.netId}_${this.currency}_${this.amount}`
+ return `${type}s_${this.currency}_${this.amount}`
}
- updateEventProgress(percentage, type) {
- if (store) {
- store.dispatch('loading/updateProgress', {
- message: `Fetching past ${type} events`,
- progress: Math.ceil(percentage * 100)
- })
+ getMessageParams(eventName, type) {
+ return {
+ type: capitalizeFirstLetter(type),
+ currency: this.currency,
+ rpcUrl: this.rpcUrl,
+ amount: this.amount,
+ netId: this.netId,
+ eventName
}
}
@@ -78,6 +84,7 @@ class EventService {
}
return a.blockNumber - b.blockNumber
})
+
const lastBlock = allEvents[allEvents.length - 1].blockNumber
this.saveEvents({ events: allEvents, lastBlock, type })
@@ -244,150 +251,107 @@ class EventService {
}
}
- getPastEvents({ fromBlock, toBlock, type }, shouldRetry = false, i = 0) {
- return new Promise((resolve, reject) => {
- this.contract
- .getPastEvents(capitalizeFirstLetter(type), {
- fromBlock,
- toBlock
- })
- .then((events) => resolve(events))
- .catch((err) => {
- i = i + 1
- // maximum 5 second buffer for rate-limiting
- if (shouldRetry) {
- const isRetry = i !== 5
-
- sleep(1000 * i).then(() =>
- this.getPastEvents({ fromBlock, toBlock, type }, isRetry, i)
- .then((events) => resolve(events))
- .catch((_) => resolve(undefined))
- )
- } else {
- reject(new Error(err))
- }
- })
- })
- }
-
- async getEventsPartFromRpc(parameters, shouldRetry = false) {
+ async getEventsPartFromRpc({ fromBlock, toBlock, type }) {
try {
- const { fromBlock, type } = parameters
const { currentBlockNumber } = await this.getBlocksDiff({ fromBlock })
- if (fromBlock < currentBlockNumber) {
- const eventsPart = await this.getPastEvents(parameters, shouldRetry)
-
- if (eventsPart) {
- if (eventsPart.length > 0) {
- return {
- events: formatEvents(eventsPart, type),
- lastBlock: eventsPart[eventsPart.length - 1].blockNumber
- }
- } else {
- return {
- events: [],
- lastBlock: fromBlock
- }
- }
- } else {
- return undefined
- }
- } else {
+ if (fromBlock > currentBlockNumber) {
return {
events: [],
lastBlock: fromBlock
}
}
- } catch (err) {
- return undefined
- }
- }
- createBatchRequest(batchArray) {
- return batchArray.map(
- (e, i) =>
- new Promise((resolve) =>
- sleep(20 * i).then(() =>
- this.getEventsPartFromRpc({ ...e }, true).then((batch) => {
- if (!batch) {
- resolve([{ isFailedBatch: true, ...e }])
- } else {
- resolve(batch.events)
- }
- })
- )
- )
- )
- }
-
- async getBatchEventsFromRpc({ fromBlock, type }) {
- try {
- const batchSize = 10
- const blockRange = 10000
-
- let [events, failed] = [[], []]
- let lastBlock = fromBlock
-
- const { blockDifference, currentBlockNumber } = await this.getBlocksDiff({ fromBlock })
- const batchDigest = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
-
- const blockDenom = Math.ceil(blockDifference / batchDigest)
- const batchCount = Math.ceil(batchDigest / batchSize)
-
- if (fromBlock < currentBlockNumber) {
- await this.updateEventProgress(0, type)
-
- for (let batchIndex = 0; batchIndex < batchCount; batchIndex++) {
- const isLastBatch = batchIndex === batchCount - 1
- const params = new Array(batchSize).fill('').map((_, i) => {
- const toBlock = (i + 1) * blockDenom + lastBlock
- const fromBlock = toBlock - blockDenom
- return { fromBlock, toBlock, type }
- })
- const batch = await Promise.all(this.createBatchRequest(params))
- const requests = flattenNArray(batch)
-
- events = events.concat(requests.filter((e) => !e.isFailedBatch))
- failed = failed.concat(requests.filter((e) => e.isFailedBatch))
- lastBlock = params[batchSize - 1].toBlock
-
- const progressIndex = batchIndex - failed.length / batchSize
-
- if (isLastBatch && failed.length !== 0) {
- const failedBatch = await Promise.all(this.createBatchRequest(failed))
- const failedReqs = flattenNArray(failedBatch)
- const failedRept = failedReqs.filter((e) => e.isFailedBatch)
-
- if (failedRept.length === 0) {
- events = events.concat(failedReqs)
- } else {
- throw new Error('Failed to batch events')
- }
- }
- await this.updateEventProgress(progressIndex / batchCount, type)
- }
+ const events = await this.contract.getPastEvents(capitalizeFirstLetter(type), {
+ fromBlock,
+ toBlock
+ })
+ if (!events?.length) {
return {
- lastBlock: events[events.length - 1].blockNumber,
- events
+ events: [],
+ lastBlock: fromBlock
}
- } else {
- return undefined
+ }
+ return {
+ events: formatEvents(events, type),
+ lastBlock: events[events.length - 1].blockNumber
}
} catch (err) {
return undefined
}
}
+ async getBatchEventsFromRpc({ fromBlock, type }) {
+ try {
+ const blockRange = 10000
+ const { blockDifference, currentBlockNumber } = await this.getBlocksDiff({ fromBlock })
+
+ const chunks = blockDifference === 0 ? 1 : Math.ceil(blockDifference / blockRange)
+ const chunkSize = Math.ceil(blockDifference / chunks)
+
+ if (fromBlock < currentBlockNumber) {
+ const chunk = Math.ceil(chunks / CORES)
+ const digest = new Array(chunks).fill('')
+ const workers = new Array(CORES).fill('')
+
+ const blocks = digest.map((e, i) => chunkSize * (i + 1) + fromBlock)
+
+ const workerBatches = workers.map((e, i) => {
+ const endIndex = (i + 1) * chunk
+ const startIndex = endIndex - chunk
+
+ return this.openEventThreadPool({
+ ...this.getMessageParams('batch_events', type),
+ payload: {
+ blocks: blocks.slice(startIndex, endIndex),
+ chunkSize
+ }
+ })
+ })
+
+ const results = flattenNArray(await Promise.all(workerBatches))
+ const events = results.map((e) => ({ ...e.returnValues, ...e }))
+
+ return {
+ lastBlock: events[events.length - 1].blockNumber,
+ events
+ }
+ }
+ return undefined
+ } catch (err) {
+ return undefined
+ }
+ }
+
+ openEventThreadPool(message) {
+ return new Promise((resolve, reject) => {
+ // const ipfsPathPrefix = getIPFSPrefix()
+ // const basePath = `${window.location.origin}${ipfsPathPrefix}`
+ // const worker = new Worker(basePath + '/assets/events.workers.js')
+ const worker = new EWorker()
+ const channel = new MessageChannel()
+
+ worker.postMessage(message, [channel.port2])
+
+ channel.port1.onmessage = ({ data }) => {
+ const { result, errorMessage } = data
+ channel.port1.close()
+ if (result) {
+ resolve(result)
+ } else {
+ reject(errorMessage)
+ }
+ }
+ })
+ }
+
async getEventsFromRpc({ fromBlock, type }) {
try {
const { blockDifference } = await this.getBlocksDiff({ fromBlock })
- const blockRange = 10000
-
let events
- if (blockDifference < blockRange) {
+ if (blockDifference < 10000) {
const rpcEvents = await this.getEventsPartFromRpc({ fromBlock, toBlock: 'latest', type })
events = rpcEvents?.events || []
} else {
@@ -450,9 +414,7 @@ class EventsFactory {
instances = new Map()
constructor(rpcUrl) {
- const httpProvider = new Web3.providers.HttpProvider(rpcUrl, httpConfig)
-
- this.provider = new Web3(httpProvider).eth
+ this.provider = new Web3(rpcUrl).eth
}
getBlockNumber = () => {
@@ -463,8 +425,12 @@ class EventsFactory {
return new this.provider.Contract(InstanceABI, address)
}
+ getProviderUrl = () => {
+ return this.provider.currentProvider.host
+ }
+
getService = (payload) => {
- const instanceName = `${payload.netId}_${payload.currency}_${payload.amount}`
+ const instanceName = `${payload.currency}_${payload.amount}`
if (this.instances.has(instanceName)) {
return this.instances.get(instanceName)
@@ -474,7 +440,8 @@ class EventsFactory {
...payload,
factoryMethods: {
getContract: this.getContract,
- getBlockNumber: this.getBlockNumber
+ getBlockNumber: this.getBlockNumber,
+ getProviderUrl: this.getProviderUrl
}
})
this.instances.set(instanceName, instance)
diff --git a/services/graph.js b/services/graph.js
index 5366358..fb306df 100644
--- a/services/graph.js
+++ b/services/graph.js
@@ -39,7 +39,6 @@ const defaultOptions = {
const client = new ApolloClient({
uri: link,
- credentials: 'omit',
cache: new InMemoryCache(),
defaultOptions
})
@@ -47,7 +46,6 @@ const client = new ApolloClient({
const registryClient = new ApolloClient({
uri: 'https://api.thegraph.com/subgraphs/name/tornadocash/tornado-relayer-registry',
cache: new InMemoryCache(),
- credentials: 'omit',
defaultOptions
})
diff --git a/services/merkleTree.js b/services/merkleTree.js
index 42fd482..7e1edae 100644
--- a/services/merkleTree.js
+++ b/services/merkleTree.js
@@ -5,7 +5,7 @@ import { download } from '@/store/snark'
import networkConfig from '@/networkConfig'
import { mimc, bloomService } from '@/services'
-const supportedCaches = ['1', '56', '100', '137']
+const supportedCaches = ['1', '56', '100', '137', '5']
class MerkleTreeService {
constructor({ netId, amount, currency, commitment, instanceName }) {
@@ -16,19 +16,18 @@ class MerkleTreeService {
this.instanceName = instanceName
this.idb = window.$nuxt.$indexedDB(netId)
-
this.bloomService = bloomService({
netId,
amount,
commitment,
instanceName,
fileFolder: 'trees',
- fileName: `deposits_${netId}_${currency}_${amount}_bloom.json.gz`
+ fileName: `deposits_${currency}_${amount}_bloom.json.zip`
})
}
getFileName(partNumber = trees.PARTS_COUNT) {
- return `trees/deposits_${this.netId}_${this.currency}_${this.amount}_slice${partNumber}.json.gz`
+ return `trees/deposits_${this.currency}_${this.amount}_slice${partNumber}.json.zip`
}
createTree({ events }) {
@@ -186,7 +185,7 @@ class TreesFactory {
instances = new Map()
getService = (payload) => {
- const instanceName = `${payload.netId}_${payload.currency}_${payload.amount}`
+ const instanceName = `${payload.currency}_${payload.amount}`
if (this.instances.has(instanceName)) {
return this.instances.get(instanceName)
}
diff --git a/services/registry/index.js b/services/registry/index.js
index 056224a..cacaba4 100644
--- a/services/registry/index.js
+++ b/services/registry/index.js
@@ -1,16 +1,15 @@
-import Web3 from 'web3'
import namehash from 'eth-ens-namehash'
import { BigNumber as BN } from 'bignumber.js'
-import { toChecksumAddress, isAddress } from 'web3-utils'
+import { toChecksumAddress } from 'web3-utils'
+import { graph } from '@/services'
import networkConfig from '@/networkConfig'
import { REGISTRY_DEPLOYED_BLOCK } from '@/constants'
-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 MIN_STAKE_BALANCE = '0x22B1C8C1227A00000' // 40 TORN
const subdomains = Object.values(networkConfig).map(({ ensSubdomainKey }) => ensSubdomainKey)
@@ -25,88 +24,28 @@ class RelayerRegister {
this.relayerRegistry = new this.provider.Contract(RelayerRegistryABI, registryContract)
}
- fetchEvents = ({ fromBlock, toBlock }, shouldRetry = false) => {
- return new Promise((resolve, reject) => {
- if (fromBlock <= toBlock) {
- this.relayerRegistry
- .getPastEvents('RelayerRegistered', { fromBlock, toBlock })
- .then((events) => resolve(events))
- .catch((_) => {
- if (shouldRetry) {
- sleep(500).then(() =>
- this.fetchEvents({ fromBlock, toBlock })
- .then((events) => resolve(events))
- .catch((_) => resolve(undefined))
- )
- } else {
- resolve(undefined)
- }
- })
- } else {
- resolve(undefined)
- }
- })
- }
-
- batchFetchEvents = async ({ fromBlock, toBlock }) => {
- const batchSize = 10
- const blockRange = 10000
- const blockDifference = toBlock - fromBlock
- const chunkCount = Math.ceil(blockDifference / blockRange)
- const blockDenom = Math.ceil(blockDifference / chunkCount)
- const chunkSize = Math.ceil(chunkCount / batchSize)
-
- let failed = []
- let events = []
- let lastBlock = fromBlock
-
- for (let batchIndex = 0; batchIndex < chunkSize; batchIndex++) {
- const params = new Array(batchSize).fill('').map((_, i) => {
- const toBlock = (i + 1) * blockDenom + lastBlock
- const fromBlock = toBlock - blockDenom
- return { fromBlock, toBlock }
- })
- const promises = new Array(batchSize).fill('').map(
- (_, i) =>
- new Promise((resolve) =>
- sleep(i * 20).then(() => {
- this.fetchEvents(params[i], true).then((batch) => {
- if (!batch) {
- resolve([{ isFailedBatch: true, fromBlock, toBlock }])
- } else {
- resolve(batch)
- }
- })
- })
- )
- )
- const requests = flattenNArray(await Promise.all(promises))
- const failedIndexes = requests
- .filter((e) => e.isFailedBatch)
- .map((e) => {
- const reqIndex = requests.indexOf(e)
- return params[reqIndex]
+ fetchEvents = async (fromBlock, toBlock) => {
+ if (fromBlock <= toBlock) {
+ try {
+ const registeredEventsPart = await this.relayerRegistry.getPastEvents('RelayerRegistered', {
+ fromBlock,
+ toBlock
})
- failed = failed.concat(failedIndexes || [])
- events = events.concat(requests.filter((e) => !e.isFailedBatch))
- lastBlock = params[batchSize - 1].toBlock
+ return registeredEventsPart
+ } catch (error) {
+ const midBlock = (fromBlock + toBlock) >> 1
+
+ if (midBlock - fromBlock < 2) {
+ throw new Error(`error fetching events: ${error.message}`)
+ }
+
+ const arr1 = await this.fetchEvents(fromBlock, midBlock)
+ const arr2 = await this.fetchEvents(midBlock + 1, toBlock)
+ return [...arr1, ...arr2]
+ }
}
-
- if (failed.length !== 0) {
- const failedReqs = failed.map((e) => this.fetchEvents(e))
- const failedBatch = flattenNArray(await Promise.all(failedReqs))
-
- events = events.concat(failedBatch || [])
- }
-
- events = events.map((e) => ({ ...e.returnValues }))
-
- if (events.length === 0) {
- throw new Error('Failed to fetch registry events')
- }
-
- return events
+ return []
}
saveEvents = async ({ events, lastSyncBlock, storeName }) => {
@@ -157,70 +96,51 @@ class RelayerRegister {
}
}
- getENSAddress = async (ensName) => {
- const { url } = Object.values(networkConfig.netId1.rpcUrls)[0]
- const provider = new Web3(url)
-
- const ensAddress = await provider.eth.ens.getAddress(ensName)
-
- return ensAddress
- }
-
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
- const currentBlockNumber = await this.provider.getBlockNumber()
- const fromBlock = cachedEvents.length === 0 ? REGISTRY_DEPLOYED_BLOCK[1] : blockTo
- const blockDifference = currentBlockNumber - fromBlock
+ if (blockFrom !== blockTo) {
+ const registeredRelayersEvents = await graph.getAllRegisters(blockFrom)
- try {
- let toBlock
- let registerRelayerEvents
- let lastSyncBlock = blockTo
-
- if (cachedEvents.length > 0 || blockDifference === 0) {
- return cachedEvents
- } else if (blockDifference >= blockRange) {
- toBlock = currentBlockNumber
- registerRelayerEvents = await this.batchFetchEvents({ fromBlock, toBlock })
- lastSyncBlock = toBlock
- } else {
- toBlock = fromBlock + blockRange
- registerRelayerEvents = await this.fetchEvents({ fromBlock, toBlock }, true)
- lastSyncBlock = toBlock
+ let relayers = {
+ lastSyncBlock: registeredRelayersEvents.lastSyncBlock,
+ events: registeredRelayersEvents.events.map((el) => ({
+ ensName: el.ensName,
+ relayerAddress: toChecksumAddress(el.address)
+ }))
}
- const relayerEvents = cachedEvents.concat(registerRelayerEvents || [])
- const events = []
+ const isGraphLate = relayers.lastSyncBlock && blockTo > Number(relayers.lastSyncBlock)
- for (let x = 0; x < relayerEvents.length; x++) {
- const { ensName, relayerAddress } = relayerEvents[x]
- let ensAddress
+ if (isGraphLate) {
+ blockFrom = relayers.lastSyncBlock
+ }
- if (!isAddress(relayerAddress)) {
- ensAddress = await this.getENSAddress(ensName)
- ensAddress = toChecksumAddress(ensAddress)
- } else {
- ensAddress = relayerAddress
+ if (!relayers.events.length || isGraphLate) {
+ const multicallEvents = await this.fetchEvents(blockFrom, blockTo)
+ const eventsRelayers = multicallEvents.map(({ returnValues }) => ({
+ ensName: returnValues.ensName,
+ relayerAddress: returnValues.relayerAddress
+ }))
+
+ relayers = {
+ lastSyncBlock: blockTo,
+ events: relayers.events.concat(eventsRelayers)
}
-
- events.push({ ensName, relayerAddress: ensAddress })
}
- await this.saveEvents({ storeName: 'register_events', lastSyncBlock, events })
-
- allRelayers = allRelayers.concat(events)
- } catch (err) {
- console.log(err)
+ await this.saveEvents({ storeName: 'register_events', ...relayers })
+ allRelayers = allRelayers.concat(relayers.events)
}
+
return allRelayers
}
filterRelayer = (acc, curr, ensSubdomainKey, relayer) => {
const subdomainIndex = subdomains.indexOf(ensSubdomainKey)
+
const mainnetSubdomain = curr.records[0]
const hostname = curr.records[subdomainIndex]
const isHostWithProtocol = hostname.includes('http')
@@ -271,6 +191,7 @@ class RelayerRegister {
getRelayers = async (ensSubdomainKey) => {
const relayers = await this.fetchRelayers()
+
const validRelayers = await this.getValidRelayers(relayers, ensSubdomainKey)
return validRelayers
diff --git a/static/events/deposits_137_matic_100000.json.gz b/static/events/deposits_137_matic_100000.json.gz
deleted file mode 100644
index 33dc4ff..0000000
Binary files a/static/events/deposits_137_matic_100000.json.gz and /dev/null differ
diff --git a/static/events/deposits_56_bnb_0.1.json.gz b/static/events/deposits_bnb_0.1.json.gz
similarity index 99%
rename from static/events/deposits_56_bnb_0.1.json.gz
rename to static/events/deposits_bnb_0.1.json.gz
index 9db3ecc..807e588 100644
Binary files a/static/events/deposits_56_bnb_0.1.json.gz and b/static/events/deposits_bnb_0.1.json.gz differ
diff --git a/static/events/deposits_56_bnb_1.json.gz b/static/events/deposits_bnb_1.json.gz
similarity index 86%
rename from static/events/deposits_56_bnb_1.json.gz
rename to static/events/deposits_bnb_1.json.gz
index c8e2bf9..bcded6c 100644
Binary files a/static/events/deposits_56_bnb_1.json.gz and b/static/events/deposits_bnb_1.json.gz differ
diff --git a/static/events/deposits_56_bnb_10.json.gz b/static/events/deposits_bnb_10.json.gz
similarity index 98%
rename from static/events/deposits_56_bnb_10.json.gz
rename to static/events/deposits_bnb_10.json.gz
index ef7a74e..cff7d36 100644
Binary files a/static/events/deposits_56_bnb_10.json.gz and b/static/events/deposits_bnb_10.json.gz differ
diff --git a/static/events/deposits_56_bnb_100.json.gz b/static/events/deposits_bnb_100.json.gz
similarity index 77%
rename from static/events/deposits_56_bnb_100.json.gz
rename to static/events/deposits_bnb_100.json.gz
index 09ac0e0..58374be 100644
Binary files a/static/events/deposits_56_bnb_100.json.gz and b/static/events/deposits_bnb_100.json.gz differ
diff --git a/static/events/deposits_1_eth_0.1.json.gz b/static/events/deposits_eth_0.1.json.gz
similarity index 93%
rename from static/events/deposits_1_eth_0.1.json.gz
rename to static/events/deposits_eth_0.1.json.gz
index 0671b4b..35dcbc0 100644
Binary files a/static/events/deposits_1_eth_0.1.json.gz and b/static/events/deposits_eth_0.1.json.gz differ
diff --git a/static/events/deposits_1_eth_1.json.gz b/static/events/deposits_eth_1.json.gz
similarity index 95%
rename from static/events/deposits_1_eth_1.json.gz
rename to static/events/deposits_eth_1.json.gz
index 346bb66..8e0c2b8 100644
Binary files a/static/events/deposits_1_eth_1.json.gz and b/static/events/deposits_eth_1.json.gz differ
diff --git a/static/events/deposits_1_eth_10.json.gz b/static/events/deposits_eth_10.json.gz
similarity index 94%
rename from static/events/deposits_1_eth_10.json.gz
rename to static/events/deposits_eth_10.json.gz
index d3020b2..e7b6f74 100644
Binary files a/static/events/deposits_1_eth_10.json.gz and b/static/events/deposits_eth_10.json.gz differ
diff --git a/static/events/deposits_1_eth_100.json.gz b/static/events/deposits_eth_100.json.gz
similarity index 94%
rename from static/events/deposits_1_eth_100.json.gz
rename to static/events/deposits_eth_100.json.gz
index 40ca1df..7bc05d9 100644
Binary files a/static/events/deposits_1_eth_100.json.gz and b/static/events/deposits_eth_100.json.gz differ
diff --git a/static/events/deposits_137_matic_100.json.gz b/static/events/deposits_matic_100.json.gz
similarity index 96%
rename from static/events/deposits_137_matic_100.json.gz
rename to static/events/deposits_matic_100.json.gz
index 7ce6c42..e79e916 100644
Binary files a/static/events/deposits_137_matic_100.json.gz and b/static/events/deposits_matic_100.json.gz differ
diff --git a/static/events/deposits_137_matic_1000.json.gz b/static/events/deposits_matic_1000.json.gz
similarity index 96%
rename from static/events/deposits_137_matic_1000.json.gz
rename to static/events/deposits_matic_1000.json.gz
index a1fdf12..00bb189 100644
Binary files a/static/events/deposits_137_matic_1000.json.gz and b/static/events/deposits_matic_1000.json.gz differ
diff --git a/static/events/deposits_137_matic_10000.json.gz b/static/events/deposits_matic_10000.json.gz
similarity index 94%
rename from static/events/deposits_137_matic_10000.json.gz
rename to static/events/deposits_matic_10000.json.gz
index 3cbc794..d1ccf68 100644
Binary files a/static/events/deposits_137_matic_10000.json.gz and b/static/events/deposits_matic_10000.json.gz differ
diff --git a/static/events/deposits_matic_100000.json.gz b/static/events/deposits_matic_100000.json.gz
new file mode 100644
index 0000000..724853d
Binary files /dev/null and b/static/events/deposits_matic_100000.json.gz differ
diff --git a/static/events/deposits_100_xdai_100.json.gz b/static/events/deposits_xdai_100.json.gz
similarity index 100%
rename from static/events/deposits_100_xdai_100.json.gz
rename to static/events/deposits_xdai_100.json.gz
diff --git a/static/events/deposits_100_xdai_1000.json.gz b/static/events/deposits_xdai_1000.json.gz
similarity index 100%
rename from static/events/deposits_100_xdai_1000.json.gz
rename to static/events/deposits_xdai_1000.json.gz
diff --git a/static/events/deposits_100_xdai_10000.json.gz b/static/events/deposits_xdai_10000.json.gz
similarity index 100%
rename from static/events/deposits_100_xdai_10000.json.gz
rename to static/events/deposits_xdai_10000.json.gz
diff --git a/static/events/deposits_100_xdai_100000.json.gz b/static/events/deposits_xdai_100000.json.gz
similarity index 100%
rename from static/events/deposits_100_xdai_100000.json.gz
rename to static/events/deposits_xdai_100000.json.gz
diff --git a/static/events/encrypted_notes_1.json.gz b/static/events/encrypted_notes_1.json.gz
index 724c7cf..2c66562 100644
Binary files a/static/events/encrypted_notes_1.json.gz and b/static/events/encrypted_notes_1.json.gz differ
diff --git a/static/events/encrypted_notes_56.json.gz b/static/events/encrypted_notes_56.json.gz
index 5c1c183..9e6a1a1 100644
Binary files a/static/events/encrypted_notes_56.json.gz and b/static/events/encrypted_notes_56.json.gz differ
diff --git a/static/events/withdrawals_137_matic_100000.json.gz b/static/events/withdrawals_137_matic_100000.json.gz
deleted file mode 100644
index d1f9ce5..0000000
Binary files a/static/events/withdrawals_137_matic_100000.json.gz and /dev/null differ
diff --git a/static/events/withdrawals_56_bnb_0.1.json.gz b/static/events/withdrawals_bnb_0.1.json.gz
similarity index 87%
rename from static/events/withdrawals_56_bnb_0.1.json.gz
rename to static/events/withdrawals_bnb_0.1.json.gz
index 8e45b2f..bceb655 100644
Binary files a/static/events/withdrawals_56_bnb_0.1.json.gz and b/static/events/withdrawals_bnb_0.1.json.gz differ
diff --git a/static/events/withdrawals_56_bnb_1.json.gz b/static/events/withdrawals_bnb_1.json.gz
similarity index 88%
rename from static/events/withdrawals_56_bnb_1.json.gz
rename to static/events/withdrawals_bnb_1.json.gz
index a12b148..200006c 100644
Binary files a/static/events/withdrawals_56_bnb_1.json.gz and b/static/events/withdrawals_bnb_1.json.gz differ
diff --git a/static/events/withdrawals_56_bnb_10.json.gz b/static/events/withdrawals_bnb_10.json.gz
similarity index 88%
rename from static/events/withdrawals_56_bnb_10.json.gz
rename to static/events/withdrawals_bnb_10.json.gz
index 55e3d29..32b1031 100644
Binary files a/static/events/withdrawals_56_bnb_10.json.gz and b/static/events/withdrawals_bnb_10.json.gz differ
diff --git a/static/events/withdrawals_56_bnb_100.json.gz b/static/events/withdrawals_bnb_100.json.gz
similarity index 78%
rename from static/events/withdrawals_56_bnb_100.json.gz
rename to static/events/withdrawals_bnb_100.json.gz
index 6cc0e7d..9c20084 100644
Binary files a/static/events/withdrawals_56_bnb_100.json.gz and b/static/events/withdrawals_bnb_100.json.gz differ
diff --git a/static/events/withdrawals_1_eth_0.1.json.gz b/static/events/withdrawals_eth_0.1.json.gz
similarity index 92%
rename from static/events/withdrawals_1_eth_0.1.json.gz
rename to static/events/withdrawals_eth_0.1.json.gz
index ce14156..37c3c30 100644
Binary files a/static/events/withdrawals_1_eth_0.1.json.gz and b/static/events/withdrawals_eth_0.1.json.gz differ
diff --git a/static/events/withdrawals_1_eth_1.json.gz b/static/events/withdrawals_eth_1.json.gz
similarity index 94%
rename from static/events/withdrawals_1_eth_1.json.gz
rename to static/events/withdrawals_eth_1.json.gz
index 9961022..7a27315 100644
Binary files a/static/events/withdrawals_1_eth_1.json.gz and b/static/events/withdrawals_eth_1.json.gz differ
diff --git a/static/events/withdrawals_1_eth_10.json.gz b/static/events/withdrawals_eth_10.json.gz
similarity index 94%
rename from static/events/withdrawals_1_eth_10.json.gz
rename to static/events/withdrawals_eth_10.json.gz
index 1fa1534..5abe03f 100644
Binary files a/static/events/withdrawals_1_eth_10.json.gz and b/static/events/withdrawals_eth_10.json.gz differ
diff --git a/static/events/withdrawals_1_eth_100.json.gz b/static/events/withdrawals_eth_100.json.gz
similarity index 95%
rename from static/events/withdrawals_1_eth_100.json.gz
rename to static/events/withdrawals_eth_100.json.gz
index 956e2bc..77a0690 100644
Binary files a/static/events/withdrawals_1_eth_100.json.gz and b/static/events/withdrawals_eth_100.json.gz differ
diff --git a/static/events/withdrawals_137_matic_100.json.gz b/static/events/withdrawals_matic_100.json.gz
similarity index 97%
rename from static/events/withdrawals_137_matic_100.json.gz
rename to static/events/withdrawals_matic_100.json.gz
index 3bb827b..38a60cb 100644
Binary files a/static/events/withdrawals_137_matic_100.json.gz and b/static/events/withdrawals_matic_100.json.gz differ
diff --git a/static/events/withdrawals_137_matic_1000.json.gz b/static/events/withdrawals_matic_1000.json.gz
similarity index 96%
rename from static/events/withdrawals_137_matic_1000.json.gz
rename to static/events/withdrawals_matic_1000.json.gz
index 2f51942..ffef702 100644
Binary files a/static/events/withdrawals_137_matic_1000.json.gz and b/static/events/withdrawals_matic_1000.json.gz differ
diff --git a/static/events/withdrawals_137_matic_10000.json.gz b/static/events/withdrawals_matic_10000.json.gz
similarity index 95%
rename from static/events/withdrawals_137_matic_10000.json.gz
rename to static/events/withdrawals_matic_10000.json.gz
index ca1181f..167b8a1 100644
Binary files a/static/events/withdrawals_137_matic_10000.json.gz and b/static/events/withdrawals_matic_10000.json.gz differ
diff --git a/static/events/withdrawals_matic_100000.json.gz b/static/events/withdrawals_matic_100000.json.gz
new file mode 100644
index 0000000..3d2b9c8
Binary files /dev/null and b/static/events/withdrawals_matic_100000.json.gz differ
diff --git a/static/events/withdrawals_100_xdai_100.json.gz b/static/events/withdrawals_xdai_100.json.gz
similarity index 100%
rename from static/events/withdrawals_100_xdai_100.json.gz
rename to static/events/withdrawals_xdai_100.json.gz
diff --git a/static/events/withdrawals_100_xdai_1000.json.gz b/static/events/withdrawals_xdai_1000.json.gz
similarity index 100%
rename from static/events/withdrawals_100_xdai_1000.json.gz
rename to static/events/withdrawals_xdai_1000.json.gz
diff --git a/static/events/withdrawals_100_xdai_10000.json.gz b/static/events/withdrawals_xdai_10000.json.gz
similarity index 100%
rename from static/events/withdrawals_100_xdai_10000.json.gz
rename to static/events/withdrawals_xdai_10000.json.gz
diff --git a/static/events/withdrawals_100_xdai_100000.json.gz b/static/events/withdrawals_xdai_100000.json.gz
similarity index 100%
rename from static/events/withdrawals_100_xdai_100000.json.gz
rename to static/events/withdrawals_xdai_100000.json.gz
diff --git a/static/trees/deposits_137_matic_100000_bloom.json.gz b/static/trees/deposits_137_matic_100000_bloom.json.gz
deleted file mode 100644
index 032cc12..0000000
Binary files a/static/trees/deposits_137_matic_100000_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100000_slice1.json.gz b/static/trees/deposits_137_matic_100000_slice1.json.gz
deleted file mode 100644
index b6a3374..0000000
Binary files a/static/trees/deposits_137_matic_100000_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100000_slice2.json.gz b/static/trees/deposits_137_matic_100000_slice2.json.gz
deleted file mode 100644
index b9fa5c5..0000000
Binary files a/static/trees/deposits_137_matic_100000_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100000_slice3.json.gz b/static/trees/deposits_137_matic_100000_slice3.json.gz
deleted file mode 100644
index 4eca824..0000000
Binary files a/static/trees/deposits_137_matic_100000_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100000_slice4.json.gz b/static/trees/deposits_137_matic_100000_slice4.json.gz
deleted file mode 100644
index fc68835..0000000
Binary files a/static/trees/deposits_137_matic_100000_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_10000_bloom.json.gz b/static/trees/deposits_137_matic_10000_bloom.json.gz
deleted file mode 100644
index 09285ba..0000000
Binary files a/static/trees/deposits_137_matic_10000_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_10000_slice1.json.gz b/static/trees/deposits_137_matic_10000_slice1.json.gz
deleted file mode 100644
index 784f782..0000000
Binary files a/static/trees/deposits_137_matic_10000_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_10000_slice2.json.gz b/static/trees/deposits_137_matic_10000_slice2.json.gz
deleted file mode 100644
index cdc3ae6..0000000
Binary files a/static/trees/deposits_137_matic_10000_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_10000_slice3.json.gz b/static/trees/deposits_137_matic_10000_slice3.json.gz
deleted file mode 100644
index 26a1bda..0000000
Binary files a/static/trees/deposits_137_matic_10000_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_10000_slice4.json.gz b/static/trees/deposits_137_matic_10000_slice4.json.gz
deleted file mode 100644
index 3622da4..0000000
Binary files a/static/trees/deposits_137_matic_10000_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_1000_bloom.json.gz b/static/trees/deposits_137_matic_1000_bloom.json.gz
deleted file mode 100644
index 0965700..0000000
Binary files a/static/trees/deposits_137_matic_1000_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_1000_slice1.json.gz b/static/trees/deposits_137_matic_1000_slice1.json.gz
deleted file mode 100644
index a789ea1..0000000
Binary files a/static/trees/deposits_137_matic_1000_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_1000_slice2.json.gz b/static/trees/deposits_137_matic_1000_slice2.json.gz
deleted file mode 100644
index e623e5f..0000000
Binary files a/static/trees/deposits_137_matic_1000_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_1000_slice3.json.gz b/static/trees/deposits_137_matic_1000_slice3.json.gz
deleted file mode 100644
index dbebdb1..0000000
Binary files a/static/trees/deposits_137_matic_1000_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_1000_slice4.json.gz b/static/trees/deposits_137_matic_1000_slice4.json.gz
deleted file mode 100644
index 2c12505..0000000
Binary files a/static/trees/deposits_137_matic_1000_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100_bloom.json.gz b/static/trees/deposits_137_matic_100_bloom.json.gz
deleted file mode 100644
index d0d1f77..0000000
Binary files a/static/trees/deposits_137_matic_100_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100_slice1.json.gz b/static/trees/deposits_137_matic_100_slice1.json.gz
deleted file mode 100644
index 180d5b3..0000000
Binary files a/static/trees/deposits_137_matic_100_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100_slice2.json.gz b/static/trees/deposits_137_matic_100_slice2.json.gz
deleted file mode 100644
index a4d98b2..0000000
Binary files a/static/trees/deposits_137_matic_100_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100_slice3.json.gz b/static/trees/deposits_137_matic_100_slice3.json.gz
deleted file mode 100644
index 21d1b42..0000000
Binary files a/static/trees/deposits_137_matic_100_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_137_matic_100_slice4.json.gz b/static/trees/deposits_137_matic_100_slice4.json.gz
deleted file mode 100644
index d8f99ed..0000000
Binary files a/static/trees/deposits_137_matic_100_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_0.1_bloom.json.gz b/static/trees/deposits_1_eth_0.1_bloom.json.gz
deleted file mode 100644
index 29c5eb2..0000000
Binary files a/static/trees/deposits_1_eth_0.1_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_0.1_slice1.json.gz b/static/trees/deposits_1_eth_0.1_slice1.json.gz
deleted file mode 100644
index c8b1b04..0000000
Binary files a/static/trees/deposits_1_eth_0.1_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_0.1_slice2.json.gz b/static/trees/deposits_1_eth_0.1_slice2.json.gz
deleted file mode 100644
index 1c613fb..0000000
Binary files a/static/trees/deposits_1_eth_0.1_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_0.1_slice3.json.gz b/static/trees/deposits_1_eth_0.1_slice3.json.gz
deleted file mode 100644
index b59f75e..0000000
Binary files a/static/trees/deposits_1_eth_0.1_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_0.1_slice4.json.gz b/static/trees/deposits_1_eth_0.1_slice4.json.gz
deleted file mode 100644
index 7d79f9a..0000000
Binary files a/static/trees/deposits_1_eth_0.1_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_100_bloom.json.gz b/static/trees/deposits_1_eth_100_bloom.json.gz
deleted file mode 100644
index 14fc463..0000000
Binary files a/static/trees/deposits_1_eth_100_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_100_slice1.json.gz b/static/trees/deposits_1_eth_100_slice1.json.gz
deleted file mode 100644
index e442c89..0000000
Binary files a/static/trees/deposits_1_eth_100_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_100_slice2.json.gz b/static/trees/deposits_1_eth_100_slice2.json.gz
deleted file mode 100644
index 1c5d317..0000000
Binary files a/static/trees/deposits_1_eth_100_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_100_slice3.json.gz b/static/trees/deposits_1_eth_100_slice3.json.gz
deleted file mode 100644
index 31934db..0000000
Binary files a/static/trees/deposits_1_eth_100_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_100_slice4.json.gz b/static/trees/deposits_1_eth_100_slice4.json.gz
deleted file mode 100644
index ea7e8a0..0000000
Binary files a/static/trees/deposits_1_eth_100_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_10_bloom.json.gz b/static/trees/deposits_1_eth_10_bloom.json.gz
deleted file mode 100644
index cf15423..0000000
Binary files a/static/trees/deposits_1_eth_10_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_10_slice1.json.gz b/static/trees/deposits_1_eth_10_slice1.json.gz
deleted file mode 100644
index fc08be3..0000000
Binary files a/static/trees/deposits_1_eth_10_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_10_slice2.json.gz b/static/trees/deposits_1_eth_10_slice2.json.gz
deleted file mode 100644
index 3637e55..0000000
Binary files a/static/trees/deposits_1_eth_10_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_10_slice3.json.gz b/static/trees/deposits_1_eth_10_slice3.json.gz
deleted file mode 100644
index 162df27..0000000
Binary files a/static/trees/deposits_1_eth_10_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_10_slice4.json.gz b/static/trees/deposits_1_eth_10_slice4.json.gz
deleted file mode 100644
index e4d4a1a..0000000
Binary files a/static/trees/deposits_1_eth_10_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_1_bloom.json.gz b/static/trees/deposits_1_eth_1_bloom.json.gz
deleted file mode 100644
index 98f3728..0000000
Binary files a/static/trees/deposits_1_eth_1_bloom.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_1_slice1.json.gz b/static/trees/deposits_1_eth_1_slice1.json.gz
deleted file mode 100644
index 8e37ce1..0000000
Binary files a/static/trees/deposits_1_eth_1_slice1.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_1_slice2.json.gz b/static/trees/deposits_1_eth_1_slice2.json.gz
deleted file mode 100644
index 7e1c135..0000000
Binary files a/static/trees/deposits_1_eth_1_slice2.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_1_slice3.json.gz b/static/trees/deposits_1_eth_1_slice3.json.gz
deleted file mode 100644
index 54b1243..0000000
Binary files a/static/trees/deposits_1_eth_1_slice3.json.gz and /dev/null differ
diff --git a/static/trees/deposits_1_eth_1_slice4.json.gz b/static/trees/deposits_1_eth_1_slice4.json.gz
deleted file mode 100644
index 5b88636..0000000
Binary files a/static/trees/deposits_1_eth_1_slice4.json.gz and /dev/null differ
diff --git a/static/trees/deposits_56_bnb_0.1_bloom.json.gz b/static/trees/deposits_bnb_0.1_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_0.1_bloom.json.gz
rename to static/trees/deposits_bnb_0.1_bloom.json.gz
diff --git a/static/trees/deposits_56_bnb_0.1_slice1.json.gz b/static/trees/deposits_bnb_0.1_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_0.1_slice1.json.gz
rename to static/trees/deposits_bnb_0.1_slice1.json.gz
diff --git a/static/trees/deposits_56_bnb_0.1_slice2.json.gz b/static/trees/deposits_bnb_0.1_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_0.1_slice2.json.gz
rename to static/trees/deposits_bnb_0.1_slice2.json.gz
diff --git a/static/trees/deposits_56_bnb_0.1_slice3.json.gz b/static/trees/deposits_bnb_0.1_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_0.1_slice3.json.gz
rename to static/trees/deposits_bnb_0.1_slice3.json.gz
diff --git a/static/trees/deposits_56_bnb_0.1_slice4.json.gz b/static/trees/deposits_bnb_0.1_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_0.1_slice4.json.gz
rename to static/trees/deposits_bnb_0.1_slice4.json.gz
diff --git a/static/trees/deposits_56_bnb_100_bloom.json.gz b/static/trees/deposits_bnb_100_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_100_bloom.json.gz
rename to static/trees/deposits_bnb_100_bloom.json.gz
diff --git a/static/trees/deposits_56_bnb_100_slice1.json.gz b/static/trees/deposits_bnb_100_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_100_slice1.json.gz
rename to static/trees/deposits_bnb_100_slice1.json.gz
diff --git a/static/trees/deposits_56_bnb_100_slice2.json.gz b/static/trees/deposits_bnb_100_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_100_slice2.json.gz
rename to static/trees/deposits_bnb_100_slice2.json.gz
diff --git a/static/trees/deposits_56_bnb_100_slice3.json.gz b/static/trees/deposits_bnb_100_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_100_slice3.json.gz
rename to static/trees/deposits_bnb_100_slice3.json.gz
diff --git a/static/trees/deposits_56_bnb_100_slice4.json.gz b/static/trees/deposits_bnb_100_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_100_slice4.json.gz
rename to static/trees/deposits_bnb_100_slice4.json.gz
diff --git a/static/trees/deposits_56_bnb_10_bloom.json.gz b/static/trees/deposits_bnb_10_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_10_bloom.json.gz
rename to static/trees/deposits_bnb_10_bloom.json.gz
diff --git a/static/trees/deposits_56_bnb_10_slice1.json.gz b/static/trees/deposits_bnb_10_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_10_slice1.json.gz
rename to static/trees/deposits_bnb_10_slice1.json.gz
diff --git a/static/trees/deposits_56_bnb_10_slice2.json.gz b/static/trees/deposits_bnb_10_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_10_slice2.json.gz
rename to static/trees/deposits_bnb_10_slice2.json.gz
diff --git a/static/trees/deposits_56_bnb_10_slice3.json.gz b/static/trees/deposits_bnb_10_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_10_slice3.json.gz
rename to static/trees/deposits_bnb_10_slice3.json.gz
diff --git a/static/trees/deposits_56_bnb_10_slice4.json.gz b/static/trees/deposits_bnb_10_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_10_slice4.json.gz
rename to static/trees/deposits_bnb_10_slice4.json.gz
diff --git a/static/trees/deposits_56_bnb_1_bloom.json.gz b/static/trees/deposits_bnb_1_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_1_bloom.json.gz
rename to static/trees/deposits_bnb_1_bloom.json.gz
diff --git a/static/trees/deposits_56_bnb_1_slice1.json.gz b/static/trees/deposits_bnb_1_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_1_slice1.json.gz
rename to static/trees/deposits_bnb_1_slice1.json.gz
diff --git a/static/trees/deposits_56_bnb_1_slice2.json.gz b/static/trees/deposits_bnb_1_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_1_slice2.json.gz
rename to static/trees/deposits_bnb_1_slice2.json.gz
diff --git a/static/trees/deposits_56_bnb_1_slice3.json.gz b/static/trees/deposits_bnb_1_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_1_slice3.json.gz
rename to static/trees/deposits_bnb_1_slice3.json.gz
diff --git a/static/trees/deposits_56_bnb_1_slice4.json.gz b/static/trees/deposits_bnb_1_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_56_bnb_1_slice4.json.gz
rename to static/trees/deposits_bnb_1_slice4.json.gz
diff --git a/static/trees/deposits_eth_0.1_bloom.json.gz b/static/trees/deposits_eth_0.1_bloom.json.gz
new file mode 100644
index 0000000..55021f2
Binary files /dev/null and b/static/trees/deposits_eth_0.1_bloom.json.gz differ
diff --git a/static/trees/deposits_eth_0.1_slice1.json.gz b/static/trees/deposits_eth_0.1_slice1.json.gz
new file mode 100644
index 0000000..3a3d1ff
Binary files /dev/null and b/static/trees/deposits_eth_0.1_slice1.json.gz differ
diff --git a/static/trees/deposits_eth_0.1_slice2.json.gz b/static/trees/deposits_eth_0.1_slice2.json.gz
new file mode 100644
index 0000000..e1e9b82
Binary files /dev/null and b/static/trees/deposits_eth_0.1_slice2.json.gz differ
diff --git a/static/trees/deposits_eth_0.1_slice3.json.gz b/static/trees/deposits_eth_0.1_slice3.json.gz
new file mode 100644
index 0000000..5e87963
Binary files /dev/null and b/static/trees/deposits_eth_0.1_slice3.json.gz differ
diff --git a/static/trees/deposits_eth_0.1_slice4.json.gz b/static/trees/deposits_eth_0.1_slice4.json.gz
new file mode 100644
index 0000000..e8742c6
Binary files /dev/null and b/static/trees/deposits_eth_0.1_slice4.json.gz differ
diff --git a/static/trees/deposits_eth_100_bloom.json.gz b/static/trees/deposits_eth_100_bloom.json.gz
new file mode 100644
index 0000000..83f3521
Binary files /dev/null and b/static/trees/deposits_eth_100_bloom.json.gz differ
diff --git a/static/trees/deposits_eth_100_slice1.json.gz b/static/trees/deposits_eth_100_slice1.json.gz
new file mode 100644
index 0000000..3a5db5d
Binary files /dev/null and b/static/trees/deposits_eth_100_slice1.json.gz differ
diff --git a/static/trees/deposits_eth_100_slice2.json.gz b/static/trees/deposits_eth_100_slice2.json.gz
new file mode 100644
index 0000000..0cfe774
Binary files /dev/null and b/static/trees/deposits_eth_100_slice2.json.gz differ
diff --git a/static/trees/deposits_eth_100_slice3.json.gz b/static/trees/deposits_eth_100_slice3.json.gz
new file mode 100644
index 0000000..b6a3006
Binary files /dev/null and b/static/trees/deposits_eth_100_slice3.json.gz differ
diff --git a/static/trees/deposits_eth_100_slice4.json.gz b/static/trees/deposits_eth_100_slice4.json.gz
new file mode 100644
index 0000000..1ecb1d2
Binary files /dev/null and b/static/trees/deposits_eth_100_slice4.json.gz differ
diff --git a/static/trees/deposits_eth_10_bloom.json.gz b/static/trees/deposits_eth_10_bloom.json.gz
new file mode 100644
index 0000000..cf3da9f
Binary files /dev/null and b/static/trees/deposits_eth_10_bloom.json.gz differ
diff --git a/static/trees/deposits_eth_10_slice1.json.gz b/static/trees/deposits_eth_10_slice1.json.gz
new file mode 100644
index 0000000..8c063c3
Binary files /dev/null and b/static/trees/deposits_eth_10_slice1.json.gz differ
diff --git a/static/trees/deposits_eth_10_slice2.json.gz b/static/trees/deposits_eth_10_slice2.json.gz
new file mode 100644
index 0000000..fca7621
Binary files /dev/null and b/static/trees/deposits_eth_10_slice2.json.gz differ
diff --git a/static/trees/deposits_eth_10_slice3.json.gz b/static/trees/deposits_eth_10_slice3.json.gz
new file mode 100644
index 0000000..f10b50e
Binary files /dev/null and b/static/trees/deposits_eth_10_slice3.json.gz differ
diff --git a/static/trees/deposits_eth_10_slice4.json.gz b/static/trees/deposits_eth_10_slice4.json.gz
new file mode 100644
index 0000000..aaf530e
Binary files /dev/null and b/static/trees/deposits_eth_10_slice4.json.gz differ
diff --git a/static/trees/deposits_eth_1_bloom.json.gz b/static/trees/deposits_eth_1_bloom.json.gz
new file mode 100644
index 0000000..a2bb6e4
Binary files /dev/null and b/static/trees/deposits_eth_1_bloom.json.gz differ
diff --git a/static/trees/deposits_eth_1_slice1.json.gz b/static/trees/deposits_eth_1_slice1.json.gz
new file mode 100644
index 0000000..b32dc00
Binary files /dev/null and b/static/trees/deposits_eth_1_slice1.json.gz differ
diff --git a/static/trees/deposits_eth_1_slice2.json.gz b/static/trees/deposits_eth_1_slice2.json.gz
new file mode 100644
index 0000000..12e841e
Binary files /dev/null and b/static/trees/deposits_eth_1_slice2.json.gz differ
diff --git a/static/trees/deposits_eth_1_slice3.json.gz b/static/trees/deposits_eth_1_slice3.json.gz
new file mode 100644
index 0000000..97d0283
Binary files /dev/null and b/static/trees/deposits_eth_1_slice3.json.gz differ
diff --git a/static/trees/deposits_eth_1_slice4.json.gz b/static/trees/deposits_eth_1_slice4.json.gz
new file mode 100644
index 0000000..eb2732e
Binary files /dev/null and b/static/trees/deposits_eth_1_slice4.json.gz differ
diff --git a/static/trees/deposits_100_xdai_100000_bloom.json.gz b/static/trees/deposits_xdai_100000_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100000_bloom.json.gz
rename to static/trees/deposits_xdai_100000_bloom.json.gz
diff --git a/static/trees/deposits_100_xdai_100000_slice1.json.gz b/static/trees/deposits_xdai_100000_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100000_slice1.json.gz
rename to static/trees/deposits_xdai_100000_slice1.json.gz
diff --git a/static/trees/deposits_100_xdai_100000_slice2.json.gz b/static/trees/deposits_xdai_100000_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100000_slice2.json.gz
rename to static/trees/deposits_xdai_100000_slice2.json.gz
diff --git a/static/trees/deposits_100_xdai_10000_bloom.json.gz b/static/trees/deposits_xdai_10000_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_10000_bloom.json.gz
rename to static/trees/deposits_xdai_10000_bloom.json.gz
diff --git a/static/trees/deposits_100_xdai_10000_slice1.json.gz b/static/trees/deposits_xdai_10000_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_10000_slice1.json.gz
rename to static/trees/deposits_xdai_10000_slice1.json.gz
diff --git a/static/trees/deposits_100_xdai_10000_slice2.json.gz b/static/trees/deposits_xdai_10000_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_10000_slice2.json.gz
rename to static/trees/deposits_xdai_10000_slice2.json.gz
diff --git a/static/trees/deposits_100_xdai_10000_slice3.json.gz b/static/trees/deposits_xdai_10000_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_10000_slice3.json.gz
rename to static/trees/deposits_xdai_10000_slice3.json.gz
diff --git a/static/trees/deposits_100_xdai_10000_slice4.json.gz b/static/trees/deposits_xdai_10000_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_10000_slice4.json.gz
rename to static/trees/deposits_xdai_10000_slice4.json.gz
diff --git a/static/trees/deposits_100_xdai_1000_bloom.json.gz b/static/trees/deposits_xdai_1000_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_1000_bloom.json.gz
rename to static/trees/deposits_xdai_1000_bloom.json.gz
diff --git a/static/trees/deposits_100_xdai_1000_slice1.json.gz b/static/trees/deposits_xdai_1000_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_1000_slice1.json.gz
rename to static/trees/deposits_xdai_1000_slice1.json.gz
diff --git a/static/trees/deposits_100_xdai_1000_slice2.json.gz b/static/trees/deposits_xdai_1000_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_1000_slice2.json.gz
rename to static/trees/deposits_xdai_1000_slice2.json.gz
diff --git a/static/trees/deposits_100_xdai_1000_slice3.json.gz b/static/trees/deposits_xdai_1000_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_1000_slice3.json.gz
rename to static/trees/deposits_xdai_1000_slice3.json.gz
diff --git a/static/trees/deposits_100_xdai_1000_slice4.json.gz b/static/trees/deposits_xdai_1000_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_1000_slice4.json.gz
rename to static/trees/deposits_xdai_1000_slice4.json.gz
diff --git a/static/trees/deposits_100_xdai_100_bloom.json.gz b/static/trees/deposits_xdai_100_bloom.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100_bloom.json.gz
rename to static/trees/deposits_xdai_100_bloom.json.gz
diff --git a/static/trees/deposits_100_xdai_100_slice1.json.gz b/static/trees/deposits_xdai_100_slice1.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100_slice1.json.gz
rename to static/trees/deposits_xdai_100_slice1.json.gz
diff --git a/static/trees/deposits_100_xdai_100_slice2.json.gz b/static/trees/deposits_xdai_100_slice2.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100_slice2.json.gz
rename to static/trees/deposits_xdai_100_slice2.json.gz
diff --git a/static/trees/deposits_100_xdai_100_slice3.json.gz b/static/trees/deposits_xdai_100_slice3.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100_slice3.json.gz
rename to static/trees/deposits_xdai_100_slice3.json.gz
diff --git a/static/trees/deposits_100_xdai_100_slice4.json.gz b/static/trees/deposits_xdai_100_slice4.json.gz
similarity index 100%
rename from static/trees/deposits_100_xdai_100_slice4.json.gz
rename to static/trees/deposits_xdai_100_slice4.json.gz
diff --git a/store/application.js b/store/application.js
index 001331e..7415345 100644
--- a/store/application.js
+++ b/store/application.js
@@ -3,7 +3,7 @@
import Web3 from 'web3'
import networkConfig from '@/networkConfig'
-import { cachedEventsLength, eventsType, httpConfig } from '@/constants'
+import { cachedEventsLength, eventsType } from '@/constants'
import MulticallABI from '@/abis/Multicall.json'
import InstanceABI from '@/abis/Instance.abi.json'
@@ -28,7 +28,7 @@ import { buildGroth16, download, getTornadoKeys } from './snark'
let groth16
-const websnarkUtils = require('@tornado/websnark/src/utils')
+const websnarkUtils = require('websnark/src/utils')
const { toWei, numberToHex, toBN, isAddress } = require('web3-utils')
const getStatisticStore = (acc, { tokens }) => {
@@ -117,8 +117,7 @@ const getters = {
const config = networkConfig[`netId${netId}`]
const { url } = rootState.settings[`netId${netId}`].rpc
const address = config.tokens[currency].instanceAddress[amount]
- const httpProvider = new Web3.providers.HttpProvider(url, httpConfig)
- const web3 = new Web3(httpProvider)
+ const web3 = new Web3(url)
return new web3.eth.Contract(InstanceABI, address)
},
multicallContract: (state, getters, rootState) => ({ netId }) => {
@@ -259,7 +258,6 @@ const getters = {
const actions = {
setAndUpdateStatistic({ dispatch, commit }, { currency, amount }) {
commit('SET_SELECTED_STATISTIC', { currency, amount })
-
dispatch('updateSelectEvents')
},
async updateSelectEvents({ dispatch, commit, state, rootGetters, getters }) {
@@ -267,14 +265,15 @@ const actions = {
const { currency, amount } = state.selectedStatistic
const eventService = getters.eventsInterface.getService({ netId, amount, currency })
+
const graphEvents = await eventService.getEventsFromGraph({ methodName: 'getStatistic' })
let statistic = graphEvents?.events
- const latestDeposits = []
-
if (!statistic || !statistic.length) {
- statistic = []
+ const fresh = await eventService.getStatisticsRpc({ eventsCount: 10 })
+
+ statistic = fresh || []
}
const { nextDepositIndex, anonymitySet } = await dispatch('getLastDepositIndex', {
@@ -285,6 +284,8 @@ const actions = {
statistic = statistic.sort((a, b) => a.leafIndex - b.leafIndex)
+ const latestDeposits = []
+
for (const event of statistic.slice(-10)) {
latestDeposits.unshift({
index: event.leafIndex,
@@ -324,7 +325,7 @@ const actions = {
lastBlock = await this.$indexedDB(netId).getFromIndex({
indexName: 'name',
storeName: 'lastEvents',
- key: `${type}s_${netId}_${currency}_${amount}`
+ key: `${type}s_${currency}_${amount}`
})
}
@@ -357,7 +358,7 @@ const actions = {
try {
const module = await download({
contentType: 'string',
- name: `events/encrypted_notes_${netId}.json.gz`
+ name: `events/encrypted_notes_${netId}.json.zip`
})
if (module) {
@@ -661,7 +662,7 @@ const actions = {
}
},
async buildTree({ dispatch }, { currency, amount, netId, commitmentHex }) {
- const treeInstanceName = `${netId}_${currency}_${amount}`
+ const treeInstanceName = `${currency}_${amount}`
const params = { netId, amount, currency }
const treeService = treesInterface.getService({
diff --git a/store/gasPrices.js b/store/gasPrices.js
index 763cd23..49a5ba3 100644
--- a/store/gasPrices.js
+++ b/store/gasPrices.js
@@ -32,7 +32,6 @@ export const getters = {
const address = config.ovmGasPriceOracleContract
if (address) {
const web3 = new Web3(url)
-
return new web3.eth.Contract(OvmGasPriceOracleABI, address)
}
@@ -76,7 +75,7 @@ export const actions = {
} catch (e) {
console.error('fetchGasPrice', e)
} finally {
- setTimeout(() => dispatch('fetchGasPrice'), 2000 * pollInterval)
+ setTimeout(() => dispatch('fetchGasPrice'), 1000 * pollInterval)
}
},
setDefault({ commit, rootGetters }) {
diff --git a/store/governance/gov.js b/store/governance/gov.js
index 0bf4f81..5e7f69d 100644
--- a/store/governance/gov.js
+++ b/store/governance/gov.js
@@ -10,8 +10,6 @@ import networkConfig from '@/networkConfig'
import GovernanceABI from '@/abis/Governance.abi.json'
import AggregatorABI from '@/abis/Aggregator.abi.json'
-import { httpConfig } from '@/constants'
-
const { numberToHex, toWei, fromWei, toBN, hexToNumber, hexToNumberString } = require('web3-utils')
const state = () => {
@@ -49,9 +47,7 @@ const getters = {
},
getWeb3: (state, getters, rootState) => ({ netId }) => {
const { url } = rootState.settings[`netId${netId}`].rpc
- const httpProvider = new Web3.providers.HttpProvider(url, httpConfig)
-
- return new Web3(httpProvider)
+ return new Web3(url)
},
govContract: (state, getters, rootState) => ({ netId }) => {
const config = getters.getConfig({ netId })
@@ -179,35 +175,15 @@ const actions = {
) {
try {
const { ethAccount } = rootState.metamask
- const { lockedBalance, constants, delegators } = state
const netId = rootGetters['metamask/netId']
- const proposalThreshold = toBN(constants.PROPOSAL_THRESHOLD)
- const proposeIndependently = toBN(lockedBalance).gte(proposalThreshold)
-
const govInstance = getters.govContract({ netId })
const json = JSON.stringify({ title, description })
- const delegatorAddress = delegators[delegators.length - 1]
+ const data = await govInstance.methods.propose(proposalAddress, json).encodeABI()
- let data, gas
-
- if (proposeIndependently) {
- data = await govInstance.methods.propose(proposalAddress, json).encodeABI()
- gas = await govInstance.methods.propose(proposalAddress, json).estimateGas({
- from: ethAccount,
- value: 0
- })
- } else {
- data = await govInstance.methods
- .proposeByDelegate(delegatorAddress, proposalAddress, json)
- .encodeABI()
- gas = await govInstance.methods
- .proposeByDelegate(delegatorAddress, proposalAddress, json)
- .estimateGas({
- from: ethAccount,
- value: 0
- })
- }
+ const gas = await govInstance.methods
+ .propose(proposalAddress, json)
+ .estimateGas({ from: ethAccount, value: 0 })
const callParams = {
method: 'eth_sendTransaction',
@@ -705,21 +681,6 @@ 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: ''
- }
}
}
diff --git a/store/relayer.js b/store/relayer.js
index dfaaa52..0b7c725 100644
--- a/store/relayer.js
+++ b/store/relayer.js
@@ -3,7 +3,6 @@ import Web3 from 'web3'
import BN from 'bignumber.js'
import namehash from 'eth-ens-namehash'
-import { httpConfig } from '@/constants'
import { schema, relayerRegisterService } from '@/services'
import { createChainIdState, parseNote, parseSemanticVersion } from '@/utils'
@@ -86,9 +85,8 @@ export const state = () => {
export const getters = {
ethProvider: (state, getters, rootState) => {
const { url } = rootState.settings.netId1.rpc
- const httpProvider = new Web3.providers.HttpProvider(url, httpConfig)
- return new Web3(httpProvider)
+ return new Web3(url)
},
jobs: (state, getters, rootState, rootGetters) => (type) => {
const netId = rootGetters['metamask/netId']
@@ -206,13 +204,7 @@ export const actions = {
}
const url = `${window.location.protocol}//${hostname}`
- const reqConfig = {
- headers: {
- 'Content-Type': 'application/json, application/x-www-form-urlencoded'
- },
- timeout: 10000
- }
- const response = await axios.get(`${url}status`, reqConfig).catch(() => {
+ const response = await axios.get(`${url}status`, { timeout: 5000 }).catch(() => {
throw new Error(this.app.i18n.t('canNotFetchStatusFromTheRelayer'))
})
@@ -330,18 +322,8 @@ export const actions = {
})
} catch {
console.error('Method pickRandomRelayer has not picked relayer')
- dispatch(
- 'notice/addNotice',
- {
- notice: {
- untranslatedTitle: 'Failed to fetch relayers',
- type: 'warning'
- },
- interval: 1500
- },
- { root: true }
- )
}
+
commit('SET_IS_LOADING_RELAYERS', false)
},
async getKnownRelayerData({ rootGetters, getters }, { relayerAddress, name }) {
diff --git a/store/settings.js b/store/settings.js
index 4b6e7db..94ebe80 100644
--- a/store/settings.js
+++ b/store/settings.js
@@ -51,14 +51,11 @@ export const actions = {
},
async checkCurrentRpc({ dispatch, getters, rootGetters }) {
const netId = rootGetters['metamask/netId']
- if (netId !== 1) {
- await dispatch('preselectRpc', { netId: 1, isEthRpc: true })
- }
await dispatch('preselectRpc', { netId })
},
- async preselectRpc({ getters, commit, dispatch }, { netId, isEthRpc = false }) {
+ async preselectRpc({ getters, commit, dispatch }, { netId }) {
const savedRpc = getters.getRpc(netId)
- const { isValid } = await dispatch('checkRpc', { ...savedRpc, netId, isEthRpc })
+ const { isValid } = await dispatch('checkRpc', { ...savedRpc, netId })
if (isValid) {
return
@@ -67,7 +64,7 @@ export const actions = {
const { rpcUrls } = networkConfig[`netId${netId}`]
for (const [, { name, url }] of Object.entries(rpcUrls)) {
- const { isValid, error } = await dispatch('checkRpc', { url, netId, isEthRpc })
+ const { isValid, error } = await dispatch('checkRpc', { url, netId })
if (isValid) {
commit('SAVE_RPC', { netId, name, url })
return
@@ -77,13 +74,14 @@ export const actions = {
}
throw new Error(this.app.i18n.t('rpcSelectError'))
},
- async checkRpc(_, { url, netId, isEthRpc = false }) {
+ async checkRpc(_, { url, netId }) {
try {
const web3 = new Web3(url)
- const chainId = await web3.eth.getChainId()
- const isCurrent = Number(chainId) === Number(netId)
- if (isEthRpc || isCurrent) {
+ const chainId = await web3.eth.getChainId()
+
+ const isCurrent = Number(chainId) === Number(netId)
+ if (isCurrent) {
return { isValid: true }
} else {
return { isValid: false, error: this.app.i18n.t('thisRpcIsForDifferentNetwork') }
diff --git a/store/snark.js b/store/snark.js
index 4540cc8..f613929 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('@tornado/websnark/src/groth16')
+const groth16 = require('websnark/src/groth16')
function buildGroth16() {
const isMobile = detectMob()
@@ -18,7 +18,7 @@ function buildGroth16() {
function getEns() {
const { url } = Object.values(networkConfig.netId1.rpcUrls)[0]
- const provider = new Web3(url)
+ const provider = new Web3(new Web3.providers.HttpProvider(url))
return provider.eth.ens
}
diff --git a/store/txHashKeeper.js b/store/txHashKeeper.js
index dcecddc..78fd62e 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 = `${netId}${amount}${currency}`
+ const name = `${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[`${netId}${amount}${currency}`]
+ service: instances[`${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[`${netId}${amount}${currency}`].service.findEvent({
+ const isSpent = await instances[`${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[`${netId}${amount}${currency}`].service.findEvent({
+ const isSpent = await instances[`${amount}${currency}`].service.findEvent({
eventName: 'nullifierHash',
eventToFind: nullifierHex,
type: eventsType.WITHDRAWAL
diff --git a/utils/index.js b/utils/index.js
index 566b88b..dcec52a 100644
--- a/utils/index.js
+++ b/utils/index.js
@@ -8,12 +8,19 @@ export * from './stringUtils'
export * from './numberUtils'
export * from './instanceUtils'
+const PREFIX_INDEX = 1
+
export function flattenNArray(arr) {
return arr.reduce((flat, toFlatten) => {
return flat.concat(Array.isArray(toFlatten) ? flattenNArray(toFlatten) : toFlatten)
}, [])
}
+export const getIPFSPrefix = () => {
+ const ipfsPathRegExp = /^(\/(?:ipfs|ipns)\/[^/]+)/
+ return (window.location.pathname.match(ipfsPathRegExp) ?? [])[PREFIX_INDEX] || ''
+}
+
export function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms))
}
diff --git a/yarn.lock b/yarn.lock
index 346dc89..ad58012 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1184,7 +1184,23 @@
resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7"
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
-"@ethereumjs/common@^2.3.0", "@ethereumjs/common@^2.4.0", "@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.1":
+"@ethereumjs/common@2.5.0":
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.5.0.tgz#ec61551b31bef7a69d1dc634d8932468866a4268"
+ integrity sha512-DEHjW6e38o+JmB/NO3GZBpW4lpaiBpkFgXF6jLcJ6gETBYpEyaA5nTimsWBUJR3Vmtm/didUEbNjajskugZORg==
+ dependencies:
+ crc-32 "^1.2.0"
+ ethereumjs-util "^7.1.1"
+
+"@ethereumjs/common@^2.3.0", "@ethereumjs/common@^2.4.0", "@ethereumjs/common@^2.6.4":
+ version "2.6.5"
+ resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.5.tgz#0a75a22a046272579d91919cb12d84f2756e8d30"
+ integrity sha512-lRyVQOeCDaIVtgfbowla32pzeDv2Obr8oR8Put5RdUBNRGr1VGPGQNGP6elWIpgK3YdpzqTOh4GyUGOureVeeA==
+ dependencies:
+ crc-32 "^1.2.0"
+ ethereumjs-util "^7.1.5"
+
+"@ethereumjs/common@^2.5.0", "@ethereumjs/common@^2.6.1":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.2.tgz#eb006c9329c75c80f634f340dc1719a5258244df"
integrity sha512-vDwye5v0SVeuDky4MtKsu+ogkH2oFUV8pBKzH/eNBzT8oI91pKa8WyzDuYuxOQsgNgv5R34LfFDh2aaw3H4HbQ==
@@ -1192,7 +1208,23 @@
crc-32 "^1.2.0"
ethereumjs-util "^7.1.4"
-"@ethereumjs/tx@^3.2.1", "@ethereumjs/tx@^3.3.2":
+"@ethereumjs/tx@3.3.2":
+ version "3.3.2"
+ resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.2.tgz#348d4624bf248aaab6c44fec2ae67265efe3db00"
+ integrity sha512-6AaJhwg4ucmwTvw/1qLaZUX5miWrwZ4nLOUsKyb/HtzS3BMw/CasKhdi1ims9mBKeK9sOJCH4qGKOBGyJCeeog==
+ dependencies:
+ "@ethereumjs/common" "^2.5.0"
+ ethereumjs-util "^7.1.2"
+
+"@ethereumjs/tx@^3.2.1":
+ version "3.5.2"
+ resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.2.tgz#197b9b6299582ad84f9527ca961466fce2296c1c"
+ integrity sha512-gQDNJWKrSDGu2w7w0PzVXVBNMzb7wwdDOmOqczmhNjqFxFuIbhVJDwiGEnxFNC2/b8ifcZzY7MLcluizohRzNw==
+ dependencies:
+ "@ethereumjs/common" "^2.6.4"
+ ethereumjs-util "^7.1.5"
+
+"@ethereumjs/tx@^3.3.2":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.0.tgz#783b0aeb08518b9991b23f5155763bbaf930a037"
integrity sha512-/+ZNbnJhQhXC83Xuvy6I9k4jT5sXiV0tMR9C+AzSSpcCV64+NB8dTE1m3x98RYMqb8+TLYWA+HML4F5lfXTlJw==
@@ -1230,6 +1262,21 @@
"@ethersproject/properties" "^5.6.0"
"@ethersproject/strings" "^5.6.0"
+"@ethersproject/abi@^5.6.3":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.7.0.tgz#b3f3e045bbbeed1af3947335c247ad625a44e449"
+ integrity sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==
+ dependencies:
+ "@ethersproject/address" "^5.7.0"
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/constants" "^5.7.0"
+ "@ethersproject/hash" "^5.7.0"
+ "@ethersproject/keccak256" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ "@ethersproject/strings" "^5.7.0"
+
"@ethersproject/abstract-provider@5.6.0", "@ethersproject/abstract-provider@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.0.tgz#0c4ac7054650dbd9c476cf5907f588bbb6ef3061"
@@ -1243,6 +1290,19 @@
"@ethersproject/transactions" "^5.6.0"
"@ethersproject/web" "^5.6.0"
+"@ethersproject/abstract-provider@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.7.0.tgz#b0a8550f88b6bf9d51f90e4795d48294630cb9ef"
+ integrity sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==
+ dependencies:
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/networks" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ "@ethersproject/transactions" "^5.7.0"
+ "@ethersproject/web" "^5.7.0"
+
"@ethersproject/abstract-signer@5.6.0", "@ethersproject/abstract-signer@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.0.tgz#9cd7ae9211c2b123a3b29bf47aab17d4d016e3e7"
@@ -1254,6 +1314,17 @@
"@ethersproject/logger" "^5.6.0"
"@ethersproject/properties" "^5.6.0"
+"@ethersproject/abstract-signer@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.7.0.tgz#13f4f32117868452191a4649723cb086d2b596b2"
+ integrity sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==
+ dependencies:
+ "@ethersproject/abstract-provider" "^5.7.0"
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+
"@ethersproject/address@5.6.0", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.0.tgz#13c49836d73e7885fc148ad633afad729da25012"
@@ -1265,6 +1336,17 @@
"@ethersproject/logger" "^5.6.0"
"@ethersproject/rlp" "^5.6.0"
+"@ethersproject/address@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.7.0.tgz#19b56c4d74a3b0a46bfdbb6cfcc0a153fc697f37"
+ integrity sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==
+ dependencies:
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/keccak256" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/rlp" "^5.7.0"
+
"@ethersproject/base64@5.6.0", "@ethersproject/base64@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.0.tgz#a12c4da2a6fb86d88563216b0282308fc15907c9"
@@ -1272,6 +1354,13 @@
dependencies:
"@ethersproject/bytes" "^5.6.0"
+"@ethersproject/base64@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.7.0.tgz#ac4ee92aa36c1628173e221d0d01f53692059e1c"
+ integrity sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+
"@ethersproject/basex@5.6.0", "@ethersproject/basex@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.6.0.tgz#9ea7209bf0a1c3ddc2a90f180c3a7f0d7d2e8a69"
@@ -1289,6 +1378,15 @@
"@ethersproject/logger" "^5.6.0"
bn.js "^4.11.9"
+"@ethersproject/bignumber@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.7.0.tgz#e2f03837f268ba655ffba03a57853e18a18dc9c2"
+ integrity sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ bn.js "^5.2.1"
+
"@ethersproject/bytes@5.6.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.0.tgz#81652f2a0e04533575befadce555213c11d8aa20"
@@ -1296,6 +1394,13 @@
dependencies:
"@ethersproject/logger" "^5.6.0"
+"@ethersproject/bytes@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.7.0.tgz#a00f6ea8d7e7534d6d87f47188af1148d71f155d"
+ integrity sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==
+ dependencies:
+ "@ethersproject/logger" "^5.7.0"
+
"@ethersproject/constants@5.6.0", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.0.tgz#55e3eb0918584d3acc0688e9958b0cedef297088"
@@ -1303,6 +1408,13 @@
dependencies:
"@ethersproject/bignumber" "^5.6.0"
+"@ethersproject/constants@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.7.0.tgz#df80a9705a7e08984161f09014ea012d1c75295e"
+ integrity sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==
+ dependencies:
+ "@ethersproject/bignumber" "^5.7.0"
+
"@ethersproject/contracts@5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.6.0.tgz#60f2cfc7addd99a865c6c8cfbbcec76297386067"
@@ -1333,6 +1445,21 @@
"@ethersproject/properties" "^5.6.0"
"@ethersproject/strings" "^5.6.0"
+"@ethersproject/hash@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.7.0.tgz#eb7aca84a588508369562e16e514b539ba5240a7"
+ integrity sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==
+ dependencies:
+ "@ethersproject/abstract-signer" "^5.7.0"
+ "@ethersproject/address" "^5.7.0"
+ "@ethersproject/base64" "^5.7.0"
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/keccak256" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ "@ethersproject/strings" "^5.7.0"
+
"@ethersproject/hdnode@5.6.0", "@ethersproject/hdnode@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.6.0.tgz#9dcbe8d629bbbcf144f2cae476337fe92d320998"
@@ -1378,11 +1505,24 @@
"@ethersproject/bytes" "^5.6.0"
js-sha3 "0.8.0"
+"@ethersproject/keccak256@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.7.0.tgz#3186350c6e1cd6aba7940384ec7d6d9db01f335a"
+ integrity sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+ js-sha3 "0.8.0"
+
"@ethersproject/logger@5.6.0", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a"
integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==
+"@ethersproject/logger@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.7.0.tgz#6ce9ae168e74fecf287be17062b590852c311892"
+ integrity sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==
+
"@ethersproject/networks@5.6.0", "@ethersproject/networks@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.0.tgz#486d03fff29b4b6b5414d47a232ded09fe10de5e"
@@ -1390,6 +1530,13 @@
dependencies:
"@ethersproject/logger" "^5.6.0"
+"@ethersproject/networks@^5.7.0":
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.7.1.tgz#118e1a981d757d45ccea6bb58d9fd3d9db14ead6"
+ integrity sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==
+ dependencies:
+ "@ethersproject/logger" "^5.7.0"
+
"@ethersproject/pbkdf2@5.6.0", "@ethersproject/pbkdf2@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.6.0.tgz#04fcc2d7c6bff88393f5b4237d906a192426685a"
@@ -1405,6 +1552,13 @@
dependencies:
"@ethersproject/logger" "^5.6.0"
+"@ethersproject/properties@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.7.0.tgz#a6e12cb0439b878aaf470f1902a176033067ed30"
+ integrity sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==
+ dependencies:
+ "@ethersproject/logger" "^5.7.0"
+
"@ethersproject/providers@5.6.1":
version "5.6.1"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.6.1.tgz#9a05f00ecbac59565bf6907c8d2af8ac33303b48"
@@ -1446,6 +1600,14 @@
"@ethersproject/bytes" "^5.6.0"
"@ethersproject/logger" "^5.6.0"
+"@ethersproject/rlp@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.7.0.tgz#de39e4d5918b9d74d46de93af80b7685a9c21304"
+ integrity sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+
"@ethersproject/sha2@5.6.0", "@ethersproject/sha2@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.6.0.tgz#364c4c11cc753bda36f31f001628706ebadb64d9"
@@ -1467,6 +1629,18 @@
elliptic "6.5.4"
hash.js "1.1.7"
+"@ethersproject/signing-key@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.7.0.tgz#06b2df39411b00bc57c7c09b01d1e41cf1b16ab3"
+ integrity sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ bn.js "^5.2.1"
+ elliptic "6.5.4"
+ hash.js "1.1.7"
+
"@ethersproject/solidity@5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.6.0.tgz#64657362a596bf7f5630bdc921c07dd78df06dc3"
@@ -1488,6 +1662,15 @@
"@ethersproject/constants" "^5.6.0"
"@ethersproject/logger" "^5.6.0"
+"@ethersproject/strings@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.7.0.tgz#54c9d2a7c57ae8f1205c88a9d3a56471e14d5ed2"
+ integrity sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==
+ dependencies:
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/constants" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+
"@ethersproject/transactions@5.6.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.0.tgz#4b594d73a868ef6e1529a2f8f94a785e6791ae4e"
@@ -1503,6 +1686,21 @@
"@ethersproject/rlp" "^5.6.0"
"@ethersproject/signing-key" "^5.6.0"
+"@ethersproject/transactions@^5.6.2", "@ethersproject/transactions@^5.7.0":
+ version "5.7.0"
+ resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.7.0.tgz#91318fc24063e057885a6af13fdb703e1f993d3b"
+ integrity sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==
+ dependencies:
+ "@ethersproject/address" "^5.7.0"
+ "@ethersproject/bignumber" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/constants" "^5.7.0"
+ "@ethersproject/keccak256" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ "@ethersproject/rlp" "^5.7.0"
+ "@ethersproject/signing-key" "^5.7.0"
+
"@ethersproject/units@5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.6.0.tgz#e5cbb1906988f5740254a21b9ded6bd51e826d9c"
@@ -1544,6 +1742,17 @@
"@ethersproject/properties" "^5.6.0"
"@ethersproject/strings" "^5.6.0"
+"@ethersproject/web@^5.7.0":
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.7.1.tgz#de1f285b373149bee5928f4eb7bcb87ee5fbb4ae"
+ integrity sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==
+ dependencies:
+ "@ethersproject/base64" "^5.7.0"
+ "@ethersproject/bytes" "^5.7.0"
+ "@ethersproject/logger" "^5.7.0"
+ "@ethersproject/properties" "^5.7.0"
+ "@ethersproject/strings" "^5.7.0"
+
"@ethersproject/wordlists@5.6.0", "@ethersproject/wordlists@^5.6.0":
version "5.6.0"
resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.6.0.tgz#79e62c5276e091d8575f6930ba01a29218ded032"
@@ -2109,27 +2318,6 @@
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"
@@ -2825,6 +3013,11 @@ abbrev@1:
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
+abortcontroller-polyfill@^1.7.3:
+ version "1.7.5"
+ resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.5.tgz#6738495f4e901fbb57b6c0611d0c75f76c485bed"
+ integrity sha512-JMJ5soJWP18htbbxJjG7bG6yuI6pRhgJ0scHHTfkUjf6wjP912xZWvM+A4sJK3gqd9E8fcPbDnOefbA9Th/FIQ==
+
abstract-leveldown@~2.6.0:
version "2.6.3"
resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8"
@@ -4083,6 +4276,11 @@ bn.js@^5.1.2, bn.js@^5.2.0:
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002"
integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==
+bn.js@^5.2.1:
+ version "5.2.1"
+ resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70"
+ integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==
+
body-parser@1.19.0:
version "1.19.0"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
@@ -5378,13 +5576,6 @@ 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"
@@ -5393,6 +5584,13 @@ cross-fetch@^2.1.0:
node-fetch "2.6.1"
whatwg-fetch "2.0.4"
+cross-fetch@^3.1.4:
+ version "3.1.5"
+ resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
+ integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==
+ dependencies:
+ node-fetch "2.6.7"
+
cross-spawn@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -5422,15 +5620,6 @@ 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"
@@ -6309,6 +6498,11 @@ es6-iterator@^2.0.3:
es5-ext "^0.10.35"
es6-symbol "^3.1.1"
+es6-promise@^4.2.8:
+ version "4.2.8"
+ resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a"
+ integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==
+
es6-symbol@^3.1.1, es6-symbol@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18"
@@ -6981,6 +7175,17 @@ ethereumjs-util@^7.0.10, ethereumjs-util@^7.1.0, ethereumjs-util@^7.1.4:
ethereum-cryptography "^0.1.3"
rlp "^2.2.4"
+ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.2, ethereumjs-util@^7.1.5:
+ version "7.1.5"
+ resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181"
+ integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==
+ dependencies:
+ "@types/bn.js" "^5.1.0"
+ bn.js "^5.1.2"
+ create-hash "^1.1.2"
+ ethereum-cryptography "^0.1.3"
+ rlp "^2.2.4"
+
ethereumjs-vm@^2.3.4:
version "2.6.0"
resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6"
@@ -11044,6 +11249,13 @@ node-fetch@2.6.1, node-fetch@^2.6.1:
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==
+node-fetch@2.6.7:
+ version "2.6.7"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
+ integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
+ dependencies:
+ whatwg-url "^5.0.0"
+
node-fetch@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
@@ -14172,6 +14384,17 @@ 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"
@@ -15385,6 +15608,11 @@ uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866"
integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==
+uuid@^9.0.0:
+ version "9.0.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
+ integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==
+
v-idle@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/v-idle/-/v-idle-0.2.0.tgz#340e67f44f4e3d1edf7804b9e71b2e65cb88f85e"
@@ -15608,13 +15836,6 @@ 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"
@@ -15687,6 +15908,14 @@ web3-core-helpers@1.7.1:
web3-eth-iban "1.7.1"
web3-utils "1.7.1"
+web3-core-helpers@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.8.1-rc.0.tgz#374d0fa0d2070657a69bf666d8f31e0f438cfa16"
+ integrity sha512-f5Cph5YQ2EuFkNHnid4q94R5xlC/3I/W6tTy7hkmrtoR+709F8bWn87VQqjao97lGK3NZd0DlX4cxF7kO/9lsA==
+ dependencies:
+ web3-eth-iban "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-core-method@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.2.tgz#d1d602657be1000a29d11e3ca3bf7bc778dea9a5"
@@ -15710,6 +15939,17 @@ web3-core-method@1.7.1:
web3-core-subscriptions "1.7.1"
web3-utils "1.7.1"
+web3-core-method@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.8.1-rc.0.tgz#a2f8ce805f230f99de3413a56a72ee292a42a932"
+ integrity sha512-b5mA6sgsFIa1z7Gp/uKA7fX4x4ptbYGz+jE9vWQHyL7qyWc0HULSxPl1+K8RBMJ9vzpzJqptjdJCtu7DYT/ZYQ==
+ dependencies:
+ "@ethersproject/transactions" "^5.6.2"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-promievent "1.8.1-rc.0"
+ web3-core-subscriptions "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-core-promievent@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.2.tgz#2dc9fe0e5bbeb7c360fc1aac5f12b32d9949a59b"
@@ -15724,6 +15964,13 @@ web3-core-promievent@1.7.1:
dependencies:
eventemitter3 "4.0.4"
+web3-core-promievent@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.8.1-rc.0.tgz#222e33ab0b31725f5f1a35ea810b97aa7acd46cd"
+ integrity sha512-kHE1Pvl4kz86KvCOanyTW8K4CvMwxQ+PC66zPuhMigwpFM9Uwa0Kyp/DjH7TQEVN2cllpH/0l8nUNIRTzWnR4A==
+ dependencies:
+ eventemitter3 "4.0.4"
+
web3-core-requestmanager@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.2.tgz#43ccc00779394c941b28e6e07e217350fd1ded71"
@@ -15746,6 +15993,17 @@ web3-core-requestmanager@1.7.1:
web3-providers-ipc "1.7.1"
web3-providers-ws "1.7.1"
+web3-core-requestmanager@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.8.1-rc.0.tgz#37bcc754289e5b91bb5e2bb75a53b33730f50b61"
+ integrity sha512-kwnq77XyRXsRh980OxH5DPSsMT0GT3jfz9ghbY0c3aHAt34njZMHIuiHVePqxjvjjqBd1wFEwSMR08sXXlrzWQ==
+ dependencies:
+ util "^0.12.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-providers-http "1.8.1-rc.0"
+ web3-providers-ipc "1.8.1-rc.0"
+ web3-providers-ws "1.8.1-rc.0"
+
web3-core-subscriptions@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.2.tgz#8eaebde44f81fc13c45b555c4422fe79393da9cf"
@@ -15762,6 +16020,14 @@ web3-core-subscriptions@1.7.1:
eventemitter3 "4.0.4"
web3-core-helpers "1.7.1"
+web3-core-subscriptions@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.8.1-rc.0.tgz#218161818bb87a27c8903cebcd76b5ee5f098cb5"
+ integrity sha512-utOV38ZyJCQIKW5ZlR3dYqj1DnZ1+FiN1YMWKmZV9Bebu1HBcYLwqXoI7JkpV4mvvaSdxaADlhC2d8b4JzIVcw==
+ dependencies:
+ eventemitter3 "4.0.4"
+ web3-core-helpers "1.8.1-rc.0"
+
web3-core@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.2.tgz#ca2b9b1ed3cf84d48b31c9bb91f7628f97cfdcd5"
@@ -15788,6 +16054,19 @@ web3-core@1.7.1:
web3-core-requestmanager "1.7.1"
web3-utils "1.7.1"
+web3-core@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.8.1-rc.0.tgz#6982b9de026693fb378fc55276b647a2a97540ac"
+ integrity sha512-lZdqdamYsgRFlAofiV84sRjTgcmpfMz/P2yuB+cBW7nO88gUtIxgEqKEwoFhAtf85DzYUxW7CIyP2VBLqtMZmQ==
+ dependencies:
+ "@types/bn.js" "^5.1.0"
+ "@types/node" "^12.12.6"
+ bignumber.js "^9.0.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-core-requestmanager "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-abi@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.2.tgz#b627eada967f39ae4657ddd61b693cb00d55cb29"
@@ -15804,6 +16083,14 @@ web3-eth-abi@1.7.1:
"@ethersproject/abi" "5.0.7"
web3-utils "1.7.1"
+web3-eth-abi@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.8.1-rc.0.tgz#b16374e5ec71d16afa3ab08c2298f09deff3ff0c"
+ integrity sha512-QkHPtc02e9pmCmG9ZsBYZ3LYa/WJYW0u6M8k7gcpgYsChvB6Phy5zLSQGzc2+kg8FPVFNycppNIQhPv6yfmqPg==
+ dependencies:
+ "@ethersproject/abi" "^5.6.3"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-accounts@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.2.tgz#cf506c21037fa497fe42f1f055980ce4acf83731"
@@ -15838,6 +16125,23 @@ web3-eth-accounts@1.7.1:
web3-core-method "1.7.1"
web3-utils "1.7.1"
+web3-eth-accounts@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.8.1-rc.0.tgz#af4d7899b5575d09b0d7dbf3b12fef4924cf9414"
+ integrity sha512-HWVVtqgWTWFfP9oSix4LmdbBfby98oXncSmFGCHnptg3BzDSFg88tP0yurYxiVu/i2uej3gyHGoSl9ufgOy5YA==
+ dependencies:
+ "@ethereumjs/common" "2.5.0"
+ "@ethereumjs/tx" "3.3.2"
+ crypto-browserify "3.12.0"
+ eth-lib "0.2.8"
+ ethereumjs-util "^7.0.10"
+ scrypt-js "^3.0.1"
+ uuid "^9.0.0"
+ web3-core "1.8.1-rc.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-contract@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.2.tgz#ffbd799fd01e36596aaadefba323e24a98a23c2f"
@@ -15866,6 +16170,20 @@ web3-eth-contract@1.7.1:
web3-eth-abi "1.7.1"
web3-utils "1.7.1"
+web3-eth-contract@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.8.1-rc.0.tgz#7c21ea1fc5ae9d378bd22e3e68f6694603927d1d"
+ integrity sha512-HQU8C1MHozX2RTs6Q0sXrFiW9YwiT6JJxzInrqP2KygePKWsk44iPICKuDwL0AZByfJP2HdGuKix57mo5XvwMw==
+ dependencies:
+ "@types/bn.js" "^5.1.0"
+ web3-core "1.8.1-rc.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-core-promievent "1.8.1-rc.0"
+ web3-core-subscriptions "1.8.1-rc.0"
+ web3-eth-abi "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-ens@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.2.tgz#ecb3708f0e8e2e847e9d89e8428da12c30bba6a4"
@@ -15894,6 +16212,20 @@ web3-eth-ens@1.7.1:
web3-eth-contract "1.7.1"
web3-utils "1.7.1"
+web3-eth-ens@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.8.1-rc.0.tgz#2ecce5b66453eae670f25699247cb3f2aead35db"
+ integrity sha512-lQodmBPn1ANN/TuQcywXJHUwJwH0SwNP1N1eodLfYRtmGzJrR11b2OyHM3LDFfAkxX0pVJ/rdz6Hyi8SkbOvNg==
+ dependencies:
+ content-hash "^2.5.2"
+ eth-ens-namehash "2.0.8"
+ web3-core "1.8.1-rc.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-promievent "1.8.1-rc.0"
+ web3-eth-abi "1.8.1-rc.0"
+ web3-eth-contract "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-iban@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.2.tgz#f390ad244ef8a6c94de7c58736b0b80a484abc8e"
@@ -15910,6 +16242,14 @@ web3-eth-iban@1.7.1:
bn.js "^4.11.9"
web3-utils "1.7.1"
+web3-eth-iban@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.8.1-rc.0.tgz#a13da287f202171bd3fe2c6c84744d095c5e1bb5"
+ integrity sha512-YpPYiO16TR5HGvD0Yz4fRUk1L3gpnZsZS6BZJwx/veN1s29k/pO43AOZwvIQi2RcQ5ht931kVX+CmeWwWR5Z2w==
+ dependencies:
+ bn.js "^5.2.1"
+ web3-utils "1.8.1-rc.0"
+
web3-eth-personal@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.2.tgz#043335a19ab59e119ba61e3bd6c3b8cde8120490"
@@ -15934,6 +16274,18 @@ web3-eth-personal@1.7.1:
web3-net "1.7.1"
web3-utils "1.7.1"
+web3-eth-personal@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.8.1-rc.0.tgz#9d908217754f721b4a099f98bfc07a5d6fa7832e"
+ integrity sha512-oxZaFVStDNZa7oRW3bMWD/5fFSGkT4KkTdPFycbw/P+/oQFAUhdFhLAQVIglwzN8vw4xIGAW9cHMQvsz0luwPA==
+ dependencies:
+ "@types/node" "^12.12.6"
+ web3-core "1.8.1-rc.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-net "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-eth@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.2.tgz#0f6470df60a2a7d04df4423ca7721db8ed5ad72b"
@@ -15970,6 +16322,24 @@ web3-eth@1.7.1:
web3-net "1.7.1"
web3-utils "1.7.1"
+web3-eth@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.8.1-rc.0.tgz#4af5b66f0c2f4e528711e7334c54f6d477c3e867"
+ integrity sha512-XMv89hFws1ySPdNfLj2I4X/zD4k7J9BnoxYXGutwbxWf5eJeBfnvvVYtN71/v+i7QPCtvmRd4ds7WEhyeMM+mg==
+ dependencies:
+ web3-core "1.8.1-rc.0"
+ web3-core-helpers "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-core-subscriptions "1.8.1-rc.0"
+ web3-eth-abi "1.8.1-rc.0"
+ web3-eth-accounts "1.8.1-rc.0"
+ web3-eth-contract "1.8.1-rc.0"
+ web3-eth-ens "1.8.1-rc.0"
+ web3-eth-iban "1.8.1-rc.0"
+ web3-eth-personal "1.8.1-rc.0"
+ web3-net "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-net@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.2.tgz#58915d7e2dad025d2a08f02c865f3abe61c48eff"
@@ -15988,6 +16358,15 @@ web3-net@1.7.1:
web3-core-method "1.7.1"
web3-utils "1.7.1"
+web3-net@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.8.1-rc.0.tgz#f280fcfb25de35a18539eef2338cb1eeeda1239d"
+ integrity sha512-7P2pvsLf5jXq8y20caTXhknN4452758aD5ZoNvtnsVledigvXzYQFaLklDsjT6kWwceCxWj3An5I9eK0Y7NdbA==
+ dependencies:
+ web3-core "1.8.1-rc.0"
+ web3-core-method "1.8.1-rc.0"
+ web3-utils "1.8.1-rc.0"
+
web3-provider-engine@16.0.1:
version "16.0.1"
resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-16.0.1.tgz#2600a39ede364cdc0a1fc773bf40a94f2177e605"
@@ -16032,6 +16411,16 @@ web3-providers-http@1.7.1:
web3-core-helpers "1.7.1"
xhr2-cookies "1.1.0"
+web3-providers-http@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.8.1-rc.0.tgz#d0d9cffeeebe5e0392d83e3c4bec9c5c94a6df97"
+ integrity sha512-0HB3gokbazwX66OOyQAdfVRhRfY9wc7it7+zM8o4V5yPx59D1hrWftv7/NGDU55r6f/8EMz/zAUWse0S42ek6A==
+ dependencies:
+ abortcontroller-polyfill "^1.7.3"
+ cross-fetch "^3.1.4"
+ es6-promise "^4.2.8"
+ web3-core-helpers "1.8.1-rc.0"
+
web3-providers-ipc@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.2.tgz#68a516883c998eeddf60df4cead77baca4fb4aaa"
@@ -16048,6 +16437,14 @@ web3-providers-ipc@1.7.1:
oboe "2.1.5"
web3-core-helpers "1.7.1"
+web3-providers-ipc@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.8.1-rc.0.tgz#6169cbcb200b2ca6425460ab46b123336bbb2f09"
+ integrity sha512-FO4eqYbB/5WTFxi+jk4YdR2DkQYBcOgBmc7MQHgZrkt/xg3yvyY84RA315U6XO3qJNnKhC4KXdPA4awPqV7bXA==
+ dependencies:
+ oboe "2.1.5"
+ web3-core-helpers "1.8.1-rc.0"
+
web3-providers-ws@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.2.tgz#d336a93ed608b40cdcadfadd1f1bc8d32ea046e0"
@@ -16066,6 +16463,15 @@ web3-providers-ws@1.7.1:
web3-core-helpers "1.7.1"
websocket "^1.0.32"
+web3-providers-ws@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.8.1-rc.0.tgz#9c6b7faf3d8245c8a2b8e7993d72f1ba331c3a33"
+ integrity sha512-runzmGqfYf6INulmmXncIjYSqS+8t6z8Bibt1hNXNN6BNGo8ipUxHo/HLHxmwH+sNS5gJtN0QahI+ZDOjc9MRA==
+ dependencies:
+ eventemitter3 "4.0.4"
+ web3-core-helpers "1.8.1-rc.0"
+ websocket "^1.0.32"
+
web3-shh@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.2.tgz#a72a3d903c0708a004db94a72d934a302d880aea"
@@ -16112,6 +16518,19 @@ web3-utils@1.7.1, web3-utils@^1.3.0:
randombytes "^2.1.0"
utf8 "3.0.0"
+web3-utils@1.8.1-rc.0:
+ version "1.8.1-rc.0"
+ resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.1-rc.0.tgz#5d741154a4d7499b98b1319a7ed944268ea7a0be"
+ integrity sha512-Mp4tHaJfflQc00N925W2Q+JP975zQmCj82n2ylQHdDP5Kcg1RyySLZ9ugeVefB049frPtrGJ2h9i6uuKLkhzzQ==
+ dependencies:
+ bn.js "^5.2.1"
+ ethereum-bloom-filters "^1.0.6"
+ ethereumjs-util "^7.1.0"
+ ethjs-unit "0.1.6"
+ number-to-bn "1.7.0"
+ randombytes "^2.1.0"
+ utf8 "3.0.0"
+
web3@1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.2.tgz#736ca2f39048c63964203dd811f519400973e78d"
@@ -16252,6 +16671,12 @@ 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"
@@ -16289,6 +16714,14 @@ whatwg-url@^2.0.1:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"
+whatwg-url@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
+ integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
+ dependencies:
+ tr46 "~0.0.3"
+ webidl-conversions "^3.0.0"
+
whatwg-url@^6.4.1:
version "6.5.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8"
@@ -16387,6 +16820,14 @@ worker-farm@^1.7.0:
dependencies:
errno "~0.1.7"
+worker-loader@^3.0.8:
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/worker-loader/-/worker-loader-3.0.8.tgz#5fc5cda4a3d3163d9c274a4e3a811ce8b60dbb37"
+ integrity sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g==
+ dependencies:
+ loader-utils "^2.0.0"
+ schema-utils "^3.0.0"
+
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"