Change instructions & remove unneccessary links
This commit is contained in:
parent
5a7839eb28
commit
9a168ca701
@ -26,7 +26,6 @@ const iconsNames = [
|
||||
'Medium',
|
||||
'Github',
|
||||
'Twitter',
|
||||
'Discord',
|
||||
'Success',
|
||||
'Missing',
|
||||
'Warning',
|
||||
|
@ -67,16 +67,15 @@ export const menuLinks = {
|
||||
}
|
||||
|
||||
export const instructions = {
|
||||
light: 'https://github.com/tornadocash/tornado-relayer/blob/light/README.md',
|
||||
relayer: 'https://github.com/tornadocash/tornado-relayer#deploy-with-docker-compose',
|
||||
nova: 'https://github.com/tornadocash/tornado-pool-relayer#deploy-with-docker-compose',
|
||||
relayer: 'https://git.tornado.ws/tornadocash/classic-relayer/src/branch/main-v5#deploy-with-script-and-docker-compose',
|
||||
nova: 'https://git.tornado.ws/tornadocash/nova-relayer#deploy-with-docker-compose',
|
||||
burn: 'https://torn.community/t/proposal-relayer-registry-setting-parameters-after-audit/2134',
|
||||
formula: 'https://docs.tornado.cash/general/how-to-become-a-relayer#1.-warning-be-aware-and-accept-potential-risks',
|
||||
formula:
|
||||
'https://docs.tornado.ws/general/guides/relayer.html#1-the-relayer-selection-system-how-a-relayer-is-chosen-by-frontends',
|
||||
}
|
||||
|
||||
// SOCIALS
|
||||
export const DISCOURSE = 'https://torn.community'
|
||||
export const DISCORD = ''
|
||||
export const DISCOURSE = 'https://forum.tornado.ws'
|
||||
export const MEDIUM = 'https://tornado-cash.medium.com'
|
||||
export const TWITTER = 'https://twitter.com/TornadoCash'
|
||||
export const TELEGRAM = 'https://t.me/TornadoOfficial'
|
||||
|
@ -12,11 +12,6 @@
|
||||
<base-icon name="discourse" size="fill" />
|
||||
</a>
|
||||
|
||||
<a :href="discord" target="_blank" aria-label="Discord" :class="$style.social__link" rel="noopener noreferrer nofollow">
|
||||
<span :class="$style.social__linkText">Discord</span>
|
||||
<base-icon name="discord" size="fill" />
|
||||
</a>
|
||||
|
||||
<a :href="medium" target="_blank" aria-label="Medium" :class="$style.social__link" rel="noopener noreferrer nofollow">
|
||||
<span :class="$style.social__linkText">Medium</span>
|
||||
<base-icon name="medium" size="fill" />
|
||||
@ -41,13 +36,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { DISCOURSE, DISCORD, MEDIUM, TWITTER, TELEGRAM, GITHUB } from '@/constants'
|
||||
import { DISCOURSE, MEDIUM, TWITTER, TELEGRAM, GITHUB } from '@/constants'
|
||||
|
||||
export default {
|
||||
data: function () {
|
||||
return {
|
||||
discourse: DISCOURSE,
|
||||
discord: DISCORD,
|
||||
medium: MEDIUM,
|
||||
twitter: TWITTER,
|
||||
telegram: TELEGRAM,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div :class="$style.container">
|
||||
<span :class="$style.texts">
|
||||
Tornado.cash Relayer Registry version:
|
||||
Tornado Cash Relayer Registry version:
|
||||
<span :class="$style.texts__version">{{ commit }}</span>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div @click="onReset">
|
||||
<nuxt-link :to="redirectPath" :class="$style.logoLink" aria-label="Home">
|
||||
<span role="none" :class="$style.logoText">Tornado.Cash Relayer Registry</span>
|
||||
<span role="none" :class="$style.logoText">Tornado Cash Relayer Registry</span>
|
||||
<base-icon name="tornado" size="fill" />
|
||||
</nuxt-link>
|
||||
</div>
|
||||
|
@ -77,8 +77,7 @@
|
||||
"second": "Change network at first"
|
||||
},
|
||||
"links": {
|
||||
"first": "Telegram group",
|
||||
"second": "Discord channel"
|
||||
"first": "Telegram group"
|
||||
},
|
||||
"error": {
|
||||
"title": "Try again"
|
||||
@ -113,9 +112,8 @@
|
||||
"second": "You can add different subdomains with corresponding TXT records to support other chains as well.",
|
||||
"third": "Ethereum Relayers (Mandatory)",
|
||||
"fourth": "Sidechains Relayers (Optional)",
|
||||
"fifth": "Sidechains relayers use a different version of the Relayer software. See instructions {link}.",
|
||||
"sixth": "Nova Relayer (Optional)",
|
||||
"seventh": "The Tornado Cash Nova uses its own version of the software as well. See instructions {link}."
|
||||
"fifth": "Nova Relayer (Optional)",
|
||||
"sixth": "The Tornado Cash Nova uses its own version of the software as well. See instructions {link}."
|
||||
},
|
||||
"links": {
|
||||
"first": "instructions",
|
||||
|
@ -54,20 +54,13 @@
|
||||
<li>arbitrum-tornado.xxx.eth</li>
|
||||
<li>avalanche-tornado.xxx.eth</li>
|
||||
</ul>
|
||||
<strong>
|
||||
<i18n path="pages.registration.ens.content.fifth">
|
||||
<template #link>
|
||||
<base-link :href="instructionLight">{{ $t('pages.registration.ens.links.second') }}</base-link>
|
||||
</template>
|
||||
</i18n>
|
||||
</strong>
|
||||
<h4>{{ $t('pages.registration.ens.content.sixth') }}</h4>
|
||||
<h4>{{ $t('pages.registration.ens.content.fifth') }}</h4>
|
||||
|
||||
<ul :class="$style.examples">
|
||||
<li>gnosis-nova.xxx.eth</li>
|
||||
</ul>
|
||||
<strong>
|
||||
<i18n path="pages.registration.ens.content.seventh">
|
||||
<i18n path="pages.registration.ens.content.sixth">
|
||||
<template #link>
|
||||
<base-link :href="instructionNova">{{ $t('pages.registration.ens.links.second') }}</base-link>
|
||||
</template>
|
||||
@ -94,7 +87,7 @@ export default {
|
||||
isENSChecking: false,
|
||||
ensInvalidReason: '',
|
||||
instructionNova: instructions.nova,
|
||||
instructionLight: instructions.light,
|
||||
instructionLink: instructions.relayer,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -5,9 +5,6 @@
|
||||
<template #first>
|
||||
<base-link :href="relayerGroup">{{ $t('pages.relayer.links.first') }}</base-link>
|
||||
</template>
|
||||
<template #second>
|
||||
<base-link :href="discord">{{ $t('pages.relayer.links.second') }}</base-link>
|
||||
</template>
|
||||
</i18n>
|
||||
</base-snackbar>
|
||||
|
||||
@ -58,7 +55,7 @@
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
|
||||
import { createModalArgs } from '@/utilities'
|
||||
import { RELAYERS_TELEGRAM, DISCORD } from '@/constants'
|
||||
import { RELAYERS_TELEGRAM } from '@/constants'
|
||||
import WorkArea from '@/containers/WorkArea/WorkArea'
|
||||
|
||||
import { StakeModal } from '@/modals'
|
||||
@ -72,7 +69,6 @@ export default {
|
||||
hasError: false,
|
||||
errorText: '',
|
||||
relayerGroup: RELAYERS_TELEGRAM,
|
||||
discord: DISCORD,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -12,3 +12,9 @@ export type GetTornadoStatusParams = {
|
||||
chainId?: ChainId
|
||||
hasEnabledLightProxy: boolean
|
||||
}
|
||||
|
||||
export type RelayerParsedData = {
|
||||
isValid: boolean
|
||||
address?: string
|
||||
chainId?: ChainId
|
||||
}
|
||||
|
@ -1,13 +1,18 @@
|
||||
import axios from 'axios'
|
||||
|
||||
import { ChainId, Relayer } from '@/types'
|
||||
import { ChainId, Relayer, RelayerParsedVersion } from '@/types'
|
||||
|
||||
import { errors } from '@/constants'
|
||||
import { getProvider, getRelayerValidateFunction } from '@/services'
|
||||
|
||||
import { GetTornadoStatusParams } from '../@types'
|
||||
import { GetTornadoStatusParams, RelayerParsedData } from '../@types'
|
||||
|
||||
async function getRelayerData({ url, ensName, hasEnabledLightProxy, chainId = ChainId.MAINNET }: GetTornadoStatusParams) {
|
||||
async function getRelayerData({
|
||||
url,
|
||||
ensName,
|
||||
hasEnabledLightProxy,
|
||||
chainId = ChainId.MAINNET,
|
||||
}: GetTornadoStatusParams): Promise<RelayerParsedData> {
|
||||
let response = null
|
||||
|
||||
try {
|
||||
@ -39,12 +44,23 @@ async function getRelayerData({ url, ensName, hasEnabledLightProxy, chainId = Ch
|
||||
return { isValid: false }
|
||||
}
|
||||
|
||||
const version = hasEnabledLightProxy ? '5.' : '4.'
|
||||
const isOutdated = !response.data.version.startsWith(version)
|
||||
const semVerRegex =
|
||||
/^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
|
||||
const regexpResult = semVerRegex.exec(response.data.version)
|
||||
const invalidVersionData = { isValid: false, address: response.data.rewardAccount, chainId: response.data.netId }
|
||||
|
||||
if (isOutdated) {
|
||||
if (!regexpResult?.groups) {
|
||||
console.error('askRelayerStatus', url || ensName, 'Version specified incorrectly.')
|
||||
return invalidVersionData
|
||||
}
|
||||
|
||||
const { major } = regexpResult.groups as RelayerParsedVersion
|
||||
const minimalMajorVersion = 5
|
||||
const isMajorVersionUpdated = Number(major) >= minimalMajorVersion
|
||||
|
||||
if (!isMajorVersionUpdated) {
|
||||
console.error('askRelayerStatus', url || ensName, 'Outdated version.')
|
||||
return { isValid: false, address: response.data.rewardAccount, chainId: response.data.netId }
|
||||
return invalidVersionData
|
||||
}
|
||||
|
||||
return { isValid, address: response.data.rewardAccount, chainId: response.data.netId }
|
||||
|
@ -3,3 +3,9 @@ import { BytesLike } from '@ethersproject/bytes'
|
||||
|
||||
export type AddStakeParams = [string, BigNumberish]
|
||||
export type AddStakePermitParams = [string, BigNumberish, string, BigNumberish, BigNumberish, BytesLike, BytesLike]
|
||||
export type RelayerParsedVersion = {
|
||||
major: string
|
||||
minor: string
|
||||
patch: string
|
||||
prerelease?: string
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user