Compare commits

..

4 Commits

Author SHA1 Message Date
e724211f91 Add gitignore 2023-06-01 07:27:03 -07:00
f5486ba842 Change workers: Now they are automatically rebuilt each time
uxt generate is run and loaded from dist/_nuxt/workers to site
2023-06-01 07:26:51 -07:00
12dd6cdd34 Update explorers 2023-06-01 07:23:10 -07:00
5562db53dc Change RPC's to uncensored & links to actual 2023-06-01 02:45:12 -07:00
11 changed files with 33 additions and 26 deletions

5
.gitignore vendored Normal file

@ -0,0 +1,5 @@
.env
dist
node_modules
.husky
.nuxt

@ -1,4 +1,5 @@
import { ChainId, NetworkConfig, MetamaskList } from '@/types' import { ChainId, NetworkConfig, MetamaskList } from '@/types'
import { RPC_LIST } from '@/constants'
const L1_CHAIN_ID = ChainId.MAINNET const L1_CHAIN_ID = ChainId.MAINNET
@ -16,6 +17,7 @@ const CHAINS: NetworkConfig = {
hexChainId: '0x64', hexChainId: '0x64',
isEipSupported: false, isEipSupported: false,
ensSubdomainKey: 'gnosis-nova', ensSubdomainKey: 'gnosis-nova',
blockExplorerUrl: 'https://gnosisscan.io'
}, },
[ChainId.MAINNET]: { [ChainId.MAINNET]: {
symbol: 'ETH', symbol: 'ETH',
@ -29,6 +31,7 @@ const CHAINS: NetworkConfig = {
hexChainId: '0x1', hexChainId: '0x1',
isEipSupported: true, isEipSupported: true,
ensSubdomainKey: 'mainnet-tornado', ensSubdomainKey: 'mainnet-tornado',
blockExplorerUrl: 'https://etherscan.io'
}, },
[ChainId.BSC]: { [ChainId.BSC]: {
symbol: 'BNB', symbol: 'BNB',
@ -42,6 +45,7 @@ const CHAINS: NetworkConfig = {
hexChainId: '0x38', hexChainId: '0x38',
isEipSupported: false, isEipSupported: false,
ensSubdomainKey: 'bsc-tornado', ensSubdomainKey: 'bsc-tornado',
blockExplorerUrl: 'https://bscscan.com'
}, },
} }
@ -49,24 +53,24 @@ const METAMASK_LIST: MetamaskList = {
[ChainId.BSC]: { [ChainId.BSC]: {
chainId: '0x38', chainId: '0x38',
chainName: 'Binance Smart Chain Mainnet', chainName: 'Binance Smart Chain Mainnet',
rpcUrls: ['https://bsc-dataseed1.binance.org'], rpcUrls: [RPC_LIST[56]],
nativeCurrency: { nativeCurrency: {
name: 'Binance Chain Native Token', name: 'Binance Chain Native Token',
symbol: 'BNB', symbol: 'BNB',
decimals: 18, decimals: 18,
}, },
blockExplorerUrls: ['https://bscscan.com'], blockExplorerUrls: [CHAINS[ChainId.BSC].blockExplorerUrl],
}, },
[ChainId.XDAI]: { [ChainId.XDAI]: {
chainId: '0x64', chainId: '0x64',
chainName: 'Gnosis', chainName: 'Gnosis',
rpcUrls: ['https://rpc.gnosischain.com'], rpcUrls: [RPC_LIST[100]],
nativeCurrency: { nativeCurrency: {
name: 'xDAI', name: 'xDAI',
symbol: 'xDAI', symbol: 'xDAI',
decimals: 18, decimals: 18,
}, },
blockExplorerUrls: ['https://blockscout.com/xdai/mainnet'], blockExplorerUrls: [CHAINS[ChainId.XDAI].blockExplorerUrl],
}, },
} }

@ -21,9 +21,9 @@ export const WRAPPED_TOKEN: { [chainId in ChainId]: string } = {
} }
export const RPC_LIST: { [chainId in ChainId]: string } = { export const RPC_LIST: { [chainId in ChainId]: string } = {
[ChainId.BSC]: 'https://bsc-dataseed.binance.org/', [ChainId.BSC]: 'https://bsc-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
[ChainId.MAINNET]: 'https://api.securerpc.com/v1', [ChainId.MAINNET]: 'https://mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
[ChainId.XDAI]: 'https://rpc.gnosischain.com/tornado', [ChainId.XDAI]: 'https://gnosis-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
} }
export const FALLBACK_RPC_LIST: { [chainId in ChainId]: string[] } = { export const FALLBACK_RPC_LIST: { [chainId in ChainId]: string[] } = {
@ -36,16 +36,15 @@ export const FALLBACK_RPC_LIST: { [chainId in ChainId]: string[] } = {
// 'https://rpc.ankr.com/eth/dbe08b852ba176a8aeac783cc1fa8becaf4f107235dfdae79241063fbf52ca4a', // 'https://rpc.ankr.com/eth/dbe08b852ba176a8aeac783cc1fa8becaf4f107235dfdae79241063fbf52ca4a',
], ],
[ChainId.XDAI]: [ [ChainId.XDAI]: [
'https://poa-xdai.gateway.pokt.network/v1/lb/61a6992dd6fbf3591b90c95b',
// 'https://rpc.ankr.com/gnosis/dbe08b852ba176a8aeac783cc1fa8becaf4f107235dfdae79241063fbf52ca4a', // 'https://rpc.ankr.com/gnosis/dbe08b852ba176a8aeac783cc1fa8becaf4f107235dfdae79241063fbf52ca4a',
'https://rpc.gnosischain.com', 'https://rpc.gnosis.gateway.fm',
], ],
} }
export const RPC_WS_LIST: { [chainId in ChainId]: string } = { export const RPC_WS_LIST: { [chainId in ChainId]: string } = {
[ChainId.MAINNET]: 'wss://mainnet.infura.io/ws/v3/9b8f0ddb3e684ece890f594bf1710c88', [ChainId.MAINNET]: 'wss://mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
[ChainId.BSC]: 'wss://bsc-ws-node.nariox.org', [ChainId.BSC]: 'wss://bsc-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
[ChainId.XDAI]: 'wss://rpc.xdaichain.com/wss/', [ChainId.XDAI]: 'wss://gnosis-mainnet.chainnodes.org/d692ae63-0a7e-43e0-9da9-fe4f4cc6c607',
} }
export const MULTICALL: { [chainId in ChainId]: string } = { export const MULTICALL: { [chainId in ChainId]: string } = {

@ -35,6 +35,6 @@ export const menuLinks = {
// SOCIALS // SOCIALS
export const DUNE = 'https://dune.xyz/k06a/TornadoCash-Nova' export const DUNE = 'https://dune.xyz/k06a/TornadoCash-Nova'
export const TWITTER = 'https://twitter.com/TornadoCash' export const TWITTER = 'https://twitter.com/TornadoCash'
export const TELEGRAM = 'https://t.me/TornadoCashOfficial' export const TELEGRAM = 'https://t.me/TornadoOfficial'
export const GITHUB = 'https://github.com/tornadocash' export const GITHUB = 'https://git.tornado.ws'
export const TORNADO_CASH_LANDING = 'https://tornado.cash' export const TORNADO_CASH_LANDING = 'https://tornado.ws'

@ -61,7 +61,7 @@ import { mapGetters, mapMutations, mapState } from 'vuex'
import { ApplicationMutation } from '@/types' import { ApplicationMutation } from '@/types'
import { SuccessModal } from '@/modals' import { SuccessModal } from '@/modals'
import { createModalArgs, getEtherscanLink } from '@/utilities' import { createModalArgs, getEtherscanLink } from '@/utilities'
import { numbers, confirmationStatus, confirmationStep, transactionMethods } from '@/constants' import { numbers, confirmationStatus, confirmationStep, transactionMethods, CHAINS } from '@/constants'
export default { export default {
name: 'ConfirmationModal', name: 'ConfirmationModal',
@ -136,7 +136,7 @@ export default {
} }
}, },
l2Link() { l2Link() {
return `https://alm-xdai.herokuapp.com/${this.modal.chainId}/${this.txHash}` return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')
}, },
explorerLink() { explorerLink() {
return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction') return getEtherscanLink(this.modal.chainId, this.txHash, 'transaction')

@ -41,8 +41,8 @@ class Provider implements WorkerProvider {
const basePath = `${window.location.origin}${ipfsPathPrefix}` const basePath = `${window.location.origin}${ipfsPathPrefix}`
this.nullifierWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/nullifier.worker.js`)) this.nullifierWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/_nuxt/workers/nullifier.worker.js`))
this.eventsWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/events.worker.js`)) this.eventsWorkers = new Array(CORES).fill('').map(() => new Worker(`${basePath}/_nuxt/workers/events.worker.js`))
// // @ts-expect-error // // @ts-expect-error
// this.nullifierWorkers = new Array(CORES).fill('').map(() => new NWorker()) // this.nullifierWorkers = new Array(CORES).fill('').map(() => new NWorker())

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -30,7 +30,8 @@ export type NetworkConfigItem = {
blockGasLimit: number blockGasLimit: number
hexChainId: string hexChainId: string
isEipSupported: boolean isEipSupported: boolean
ensSubdomainKey: string ensSubdomainKey: string,
blockExplorerUrl: string
} }
export type MetamaskConfigItem = { export type MetamaskConfigItem = {

@ -7,7 +7,7 @@ import { hexDataSlice } from '@ethersproject/bytes'
import { keccak256 } from '@ethersproject/keccak256' import { keccak256 } from '@ethersproject/keccak256'
import { entropyToMnemonic } from '@ethersproject/hdnode' import { entropyToMnemonic } from '@ethersproject/hdnode'
import { numbers } from '@/constants' import { numbers, CHAINS } from '@/constants'
import { ChainId, L1ChainId } from '@/types' import { ChainId, L1ChainId } from '@/types'
import { getBridgeHelper, getMulticall } from '@/contracts' import { getBridgeHelper, getMulticall } from '@/contracts'
import { ArgsProof, ExtData } from '@/services/core/@types' import { ArgsProof, ExtData } from '@/services/core/@types'
@ -74,9 +74,9 @@ export function getEtherscanLink(chainId: ChainId, data: string, type: 'transact
let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io` let prefix = `https://${ETHERSCAN_PREFIXES[chainId]}etherscan.io`
if (chainId === ChainId.BSC) { if (chainId === ChainId.BSC) {
prefix = `https://bscscan.com` prefix = CHAINS[ChainId.BSC].blockExplorerUrl
} else if (chainId === ChainId.XDAI) { } else if (chainId === ChainId.XDAI) {
prefix = `https://blockscout.com/poa/xdai` prefix = CHAINS[ChainId.XDAI].blockExplorerUrl
} }
switch (type) { switch (type) {