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