update rpcs & remove sanction check

This commit is contained in:
gozzy 2022-09-08 11:43:26 +00:00
parent 1b922fa445
commit 135adee8e8
2 changed files with 20 additions and 75 deletions

@ -1,12 +1,3 @@
const {
INFURA_KEY,
ALCHEMY_MAINNET_KEY,
ALCHEMY_POLYGON_KEY,
ALCHEMY_OPTIMISM_KEY,
ALCHEMY_ARBITRUM_KEY,
ALCHEMY_GOERLI_KEY
} = process.env
export default { export default {
netId1: { netId1: {
rpcCallRetryAttempt: 15, rpcCallRetryAttempt: 15,
@ -28,13 +19,9 @@ export default {
networkName: 'Ethereum Mainnet', networkName: 'Ethereum Mainnet',
deployedBlock: 9116966, deployedBlock: 9116966,
rpcUrls: { rpcUrls: {
Infura: { SecureRPC: {
name: 'Infura', name: 'SecureRPC',
url: `https://mainnet.infura.io/v3/${INFURA_KEY}` url: 'https://api.securerpc.com/v1'
},
Alchemy: {
name: 'Alchemy',
url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_MAINNET_KEY}`
} }
}, },
multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441', multicall: '0xeefba1e63905ef1d7acba5a8513c70307c1ce441',
@ -148,17 +135,9 @@ export default {
multicall: '0x41263cba59eb80dc200f3e2544eda4ed6a90e76c', multicall: '0x41263cba59eb80dc200f3e2544eda4ed6a90e76c',
echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
rpcUrls: { rpcUrls: {
publicRpc1: { bscRpc: {
name: 'BSC Public RPC 1', name: 'BSC RPC',
url: 'https://bsc-dataseed.binance.org/' url: 'https://bscrpc.com/'
},
publicRpc2: {
name: 'BSC Public RPC 2',
url: 'https://bsc-dataseed1.defibit.io/'
},
publicRpc3: {
name: 'BSC Public RPC 3',
url: 'https://bsc-dataseed1.ninicoin.io/'
} }
}, },
tokens: { tokens: {
@ -203,13 +182,9 @@ export default {
multicall: '0x11ce4B23bD875D7F5C6a31084f55fDe1e9A87507', multicall: '0x11ce4B23bD875D7F5C6a31084f55fDe1e9A87507',
echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
rpcUrls: { rpcUrls: {
Infura: { polygonRPC: {
name: 'Infura', name: 'Polygon RPC',
url: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}` url: `https://polygon-rpc.com`
},
Alchemy: {
name: 'Alchemy',
url: `https://polygon-mainnet.g.alchemy.com/v2/${ALCHEMY_POLYGON_KEY}`
} }
}, },
tokens: { tokens: {
@ -255,13 +230,9 @@ export default {
echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
ovmGasPriceOracleContract: '0x420000000000000000000000000000000000000F', ovmGasPriceOracleContract: '0x420000000000000000000000000000000000000F',
rpcUrls: { rpcUrls: {
Alchemy: { Optimism: {
name: 'Alchemy', name: 'Optimism',
url: `https://opt-mainnet.g.alchemy.com/v2/${ALCHEMY_OPTIMISM_KEY}` url: `https://mainnet.optimism.io`
},
Infura: {
name: 'Infura',
url: `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`
} }
}, },
tokens: { tokens: {
@ -309,14 +280,6 @@ export default {
Arbitrum: { Arbitrum: {
name: 'Arbitrum Public RPC', name: 'Arbitrum Public RPC',
url: 'https://arb1.arbitrum.io/rpc' url: 'https://arb1.arbitrum.io/rpc'
},
Alchemy: {
name: 'Alchemy',
url: `https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_ARBITRUM_KEY}`
},
Infura: {
name: 'Infura',
url: `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`
} }
}, },
tokens: { tokens: {
@ -362,8 +325,8 @@ export default {
echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4', echoContractAccount: '0xa75BF2815618872f155b7C4B0C81bF990f5245E4',
rpcUrls: { rpcUrls: {
publicRpc: { publicRpc: {
name: 'Gnosis Chain RPC', name: 'Community RPC',
url: 'https://rpc.gnosischain.com/tornado' url: 'https://development.tornadocash.community/rpc/v1'
} }
}, },
tokens: { tokens: {
@ -455,9 +418,9 @@ export default {
echoContractAccount: '0x37e6859804b6499d1e4a86d70a5fdd5de6a0ac65', echoContractAccount: '0x37e6859804b6499d1e4a86d70a5fdd5de6a0ac65',
aggregatorContract: '0x8cb1436F64a3c33aD17bb42F94e255c4c0E871b2', aggregatorContract: '0x8cb1436F64a3c33aD17bb42F94e255c4c0E871b2',
rpcUrls: { rpcUrls: {
Alchemy: { Infura: {
name: 'Alchemy', name: 'Infura',
url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_GOERLI_KEY}` url: 'https://goerli.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161'
} }
}, },
tokens: { tokens: {

@ -7,8 +7,6 @@ import { PROVIDERS } from '@/constants'
import networkConfig from '@/networkConfig' import networkConfig from '@/networkConfig'
import { walletConnectConnector } from '@/services' import { walletConnectConnector } from '@/services'
import SanctionsListAbi from '@/abis/SanctionsList.abi'
const { toChecksumAddress } = require('web3-utils') const { toChecksumAddress } = require('web3-utils')
const state = () => { const state = () => {
@ -330,20 +328,6 @@ const actions = {
console.error('networkChangeHandler', err.message) console.error('networkChangeHandler', err.message)
} }
}, },
async checkIsSanctioned({ rootGetters }, { address }) {
const ethProvider = rootGetters['relayer/ethProvider']
const contract = new ethProvider.eth.Contract(
SanctionsListAbi,
'0x40C57923924B5c5c5455c48D93317139ADDaC8fb'
)
const isSanctioned = await contract.methods.isSanctioned(address).call()
if (isSanctioned) {
window.onbeforeunload = null
window.location = 'https://twitter.com/TornadoCash/status/1514904975037669386'
}
},
async onNetworkChanged({ state, getters, commit, dispatch }, { netId }) { async onNetworkChanged({ state, getters, commit, dispatch }, { netId }) {
dispatch('checkMismatchNetwork', netId) dispatch('checkMismatchNetwork', netId)
@ -424,8 +408,6 @@ const actions = {
throw new Error('lockedMetamask') throw new Error('lockedMetamask')
} }
await dispatch('checkIsSanctioned', { address })
commit('IDENTIFY', address) commit('IDENTIFY', address)
const netId = await dispatch('checkNetworkVersion') const netId = await dispatch('checkNetworkVersion')
@ -528,7 +510,7 @@ const actions = {
56: { 56: {
chainId: '0x38', chainId: '0x38',
chainName: 'Binance Smart Chain Mainnet', chainName: 'Binance Smart Chain Mainnet',
rpcUrls: ['https://bsc-dataseed1.ninicoin.io'], rpcUrls: ['https://bscrpc.com'],
nativeCurrency: { nativeCurrency: {
name: 'Binance Chain Native Token', name: 'Binance Chain Native Token',
symbol: 'BNB', symbol: 'BNB',
@ -550,7 +532,7 @@ const actions = {
100: { 100: {
chainId: '0x64', chainId: '0x64',
chainName: 'Gnosis', chainName: 'Gnosis',
rpcUrls: ['https://rpc.gnosischain.com'], rpcUrls: ['https://development.tornadocash.community/rpc/v1'],
nativeCurrency: { nativeCurrency: {
name: 'xDAI', name: 'xDAI',
symbol: 'xDAI', symbol: 'xDAI',
@ -561,7 +543,7 @@ const actions = {
137: { 137: {
chainId: '0x89', chainId: '0x89',
chainName: 'Polygon Mainnet', chainName: 'Polygon Mainnet',
rpcUrls: ['https://rpc-mainnet.maticvigil.com'], rpcUrls: ['https://polygon-rpc.com'],
nativeCurrency: { nativeCurrency: {
name: 'MATIC', name: 'MATIC',
symbol: 'MATIC', symbol: 'MATIC',