proposal 44 #29

Merged
Theo merged 9 commits from ButterflyEffect/classic-ui:development into master 2024-01-03 01:13:17 +03:00
123 changed files with 56 additions and 52 deletions
README.md
components
networkConfig.jspackage.json
scripts
services
static
events
deposits_137_matic_100.json.gzdeposits_137_matic_1000.json.gzdeposits_137_matic_10000.json.gzdeposits_1_cdai_5000.json.gzdeposits_1_cdai_50000.json.gzdeposits_1_cdai_500000.json.gzdeposits_1_cdai_5000000.json.gzdeposits_1_dai_100.json.gzdeposits_1_dai_1000.json.gzdeposits_1_dai_10000.json.gzdeposits_1_dai_100000.json.gzdeposits_1_eth_0.1.json.gzdeposits_1_eth_1.json.gzdeposits_1_eth_10.json.gzdeposits_1_eth_100.json.gzdeposits_1_usdc_100.json.gzdeposits_1_usdc_1000.json.gzdeposits_1_usdt_100.json.gzdeposits_1_usdt_1000.json.gzdeposits_1_wbtc_0.1.json.gzdeposits_1_wbtc_1.json.gzdeposits_1_wbtc_10.json.gzdeposits_42161_eth_0.1.json.gzdeposits_42161_eth_1.json.gzdeposits_42161_eth_10.json.gzdeposits_56_bnb_0.1.json.gzdeposits_56_bnb_1.json.gzdeposits_56_bnb_10.json.gzdeposits_56_bnb_100.json.gzwithdrawals_137_matic_100.json.gzwithdrawals_137_matic_1000.json.gzwithdrawals_137_matic_10000.json.gzwithdrawals_1_cdai_5000.json.gzwithdrawals_1_cdai_50000.json.gzwithdrawals_1_cdai_500000.json.gzwithdrawals_1_cdai_5000000.json.gzwithdrawals_1_dai_100.json.gzwithdrawals_1_dai_1000.json.gzwithdrawals_1_dai_10000.json.gzwithdrawals_1_dai_100000.json.gzwithdrawals_1_eth_0.1.json.gzwithdrawals_1_eth_1.json.gzwithdrawals_1_eth_10.json.gzwithdrawals_1_eth_100.json.gzwithdrawals_1_usdc_100.json.gzwithdrawals_1_usdc_1000.json.gzwithdrawals_1_usdt_100.json.gzwithdrawals_1_usdt_1000.json.gzwithdrawals_1_wbtc_0.1.json.gzwithdrawals_1_wbtc_1.json.gzwithdrawals_1_wbtc_10.json.gzwithdrawals_42161_eth_0.1.json.gzwithdrawals_42161_eth_1.json.gzwithdrawals_42161_eth_10.json.gzwithdrawals_56_bnb_0.1.json.gzwithdrawals_56_bnb_1.json.gzwithdrawals_56_bnb_10.json.gzwithdrawals_56_bnb_100.json.gz
trees

@ -4,7 +4,7 @@
## Building locally ## Building locally
- Install [Node.js](https://nodejs.org) version 14 - Install [Node.js](https://nodejs.org) version 16
- If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you. - If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm use` will automatically choose the right node version for you.
- Install [Yarn](https://yarnpkg.com/en/docs/install) - Install [Yarn](https://yarnpkg.com/en/docs/install)
- Install dependencies: `yarn` - Install dependencies: `yarn`

@ -4,7 +4,10 @@
<div class="box-modal-title">{{ $t('withdrawalSettings') }}</div> <div class="box-modal-title">{{ $t('withdrawalSettings') }}</div>
<button type="button" class="delete" @click="$parent.cancel('escape')" /> <button type="button" class="delete" @click="$parent.cancel('escape')" />
</header> </header>
<b-tabs v-model="withdrawType" :animated="false" class="is-modal"> <b-tabs v-if="isRelayersAvailable" v-model="withdrawType" :animated="false" class="is-modal">
<RelayerTab />
</b-tabs>
<b-tabs v-else v-model="withdrawType" :animated="false" class="is-modal">
<RelayerTab /> <RelayerTab />
<WalletTab /> <WalletTab />
</b-tabs> </b-tabs>
@ -46,7 +49,11 @@ export default {
computed: { computed: {
...mapState('application', { ...mapState('application', {
defaultWithdrawType: 'withdrawType' defaultWithdrawType: 'withdrawType'
}) }),
...mapState('relayer', ['isLoadingRelayers', 'validRelayers']),
isRelayersAvailable() {
return !this.isLoadingRelayers && this.validRelayers.length > 0;
}
}, },
created() { created() {
this.withdrawType = this.defaultWithdrawType this.withdrawType = this.defaultWithdrawType

@ -200,7 +200,7 @@ export default {
return false return false
}, },
shouldSettingsShow() { shouldSettingsShow() {
return !this.hasErrorNote && !this.error.message return !this.isLoading && !this.error.type && !this.hasErrorNote
}, },
hasErrorNote() { hasErrorNote() {
const note = this.withdrawNote.split('-')[4] const note = this.withdrawNote.split('-')[4]

@ -29,9 +29,9 @@ export default {
name: 'MevblockerRPC', name: 'MevblockerRPC',
url: 'https://rpc.mevblocker.io' url: 'https://rpc.mevblocker.io'
}, },
llamaRPC: { oneRPC: {
name: 'llamarpc', name: '1RPC',
url: 'https://eth.llamarpc.com' url: 'https://1rpc.io/eth'
} }
}, },
multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',
@ -401,17 +401,17 @@ export default {
multicall: '0xe86e3989c74293Acc962156cd3F525c07b6a1B6e', multicall: '0xe86e3989c74293Acc962156cd3F525c07b6a1B6e',
echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
rpcUrls: { rpcUrls: {
publicRpc1: { publicRpc: {
name: 'Avalanche RPC', name: 'Avalanche RPC',
url: 'https://endpoints.omniatech.io/v1/avax/mainnet/public' url: 'https://api.avax.network/ext/bc/C/rpc'
}, },
meowRPC: { meowRPC: {
name: 'Meow RPC', name: 'Meow RPC',
url: 'https://avax.meowrpc.com' url: 'https://avax.meowrpc.com'
}, },
communityRPC: { oneRPC: {
name: 'Tornado RPC', name: 'OneRPC',
url: 'https://avalanche-rpc.tornado.ws/ext/bc/C/rpc' url: 'https://1rpc.io/avax/c'
} }
}, },
tokens: { tokens: {
@ -459,6 +459,10 @@ export default {
chainnodes: { chainnodes: {
name: 'Tornado RPC', name: 'Tornado RPC',
url: 'https://goerli.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607' url: 'https://goerli.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607'
},
gatewayRPC: {
name: 'Gateway RPC',
url: 'https://rpc.goerli.eth.gateway.fm'
} }
}, },
tokens: { tokens: {

@ -23,9 +23,10 @@
"@apollo/client": "^3.3.20", "@apollo/client": "^3.3.20",
"@metamask/onboarding": "^1.0.0", "@metamask/onboarding": "^1.0.0",
"@nuxtjs/moment": "^1.6.0", "@nuxtjs/moment": "^1.6.0",
"@tornado/snarkjs": "0.1.20-p2", "@tornado/fixed-merkle-tree": "0.7",
"@tornado/snarkjs": "0.1.20",
"@tornado/tornado-oracles": "^2.1.0", "@tornado/tornado-oracles": "^2.1.0",
"@tornado/websnark": "0.0.4-p1", "@tornado/websnark": "0.0.4",
"@walletconnect/web3-provider": "1.7.8", "@walletconnect/web3-provider": "1.7.8",
"ajv": "^6.10.2", "ajv": "^6.10.2",
"arraybuffer-loader": "^1.0.8", "arraybuffer-loader": "^1.0.8",
@ -39,7 +40,6 @@
"eth-ens-namehash": "^2.0.8", "eth-ens-namehash": "^2.0.8",
"eth-sig-util": "^2.5.3", "eth-sig-util": "^2.5.3",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"fixed-merkle-tree": "^0.7.3",
"form-data": "^3.0.0", "form-data": "^3.0.0",
"graphql": "^15.5.1", "graphql": "^15.5.1",
"idb": "^6.0.0", "idb": "^6.0.0",

@ -3,7 +3,7 @@ import 'dotenv/config'
import fs from 'fs' import fs from 'fs'
import BloomFilter from 'bloomfilter.js' import BloomFilter from 'bloomfilter.js'
import { MerkleTree } from 'fixed-merkle-tree' import { MerkleTree } from '@tornado/fixed-merkle-tree'
import { buildMimcSponge } from 'circomlibjs' import { buildMimcSponge } from 'circomlibjs'
import networkConfig, { enabledChains } from '../networkConfig' import networkConfig, { enabledChains } from '../networkConfig'

@ -17,21 +17,22 @@ function updateEncrypted(netId) {
async function updateCommon(netId) { async function updateCommon(netId) {
const { nativeCurrency, tokens } = networkConfig[`netId${netId}`] const { nativeCurrency, tokens } = networkConfig[`netId${netId}`]
console.log(Object.keys(tokens[nativeCurrency].instanceAddress)) for (const type of EVENTS) {
for (const [tokenName, tokenInfo] of Object.entries(tokens)) {
console.log(`${tokenInfo.symbol}: ${Object.keys(tokenInfo.instanceAddress)}`)
for (const instance of Object.keys(tokenInfo.instanceAddress)) {
console.warn('instance', instance)
for await (const type of EVENTS) { const filename = `${type.toLowerCase()}s_${netId}_${tokenName}_${instance}.json`
for await (const instance of Object.keys(tokens[nativeCurrency].instanceAddress)) {
console.warn('instance', instance)
const filename = `${type.toLowerCase()}s_${netId}_${nativeCurrency}_${instance}.json` const isSaved = save(`${EVENTS_PATH}${filename}`)
const isSaved = save(`${EVENTS_PATH}${filename}`) if (isSaved) {
try {
if (isSaved) { testCommon(netId, type, filename)
try { } catch (err) {
testCommon(netId, type, filename) console.error(err.message)
} catch (err) { }
console.error(err.message)
} }
} }
} }

@ -1,4 +1,4 @@
import { MerkleTree, PartialMerkleTree } from 'fixed-merkle-tree' import { MerkleTree, PartialMerkleTree } from '@tornado/fixed-merkle-tree'
import { trees } from '@/constants' import { trees } from '@/constants'
import { download } from '@/store/snark' import { download } from '@/store/snark'

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More