This commit is contained in:
Roman Storm 2020-11-11 11:07:00 -08:00
parent 2b6b9184c7
commit 47c425a801
No known key found for this signature in database
GPG Key ID: 522F2A785F34E71F
8 changed files with 352 additions and 108 deletions

View File

@ -17,10 +17,11 @@
"deployedBy": "Deployed by: {link}",
"startNow": "Start now",
"completedTasks": "Completed Tasks: {progress}",
"pageSubtitle": "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium.",
"pageSubtitle": "Follow these simple steps to become part of deployment of Tornado.Cash Governance protocol.",
"alreadyDeployed": "Already deployed",
"contractDeployed": "Contract successfully deployed",
"transactionFailed": "Transaction was failed",
"cannotBeExecuted": "This action is not deployable at the moment",
"sendingTransaction": "Sending transaction",
"viewOnEtherscan": "View on Etherscan",
"pleaseConnectWallet": "Please connect your wallet first",

View File

@ -8,7 +8,8 @@
"start": "nuxt start",
"generate": "nuxt generate",
"lint:js": "eslint --ext .js,.vue --ignore-path .gitignore .",
"lint": "yarn lint:js"
"lint": "yarn lint:js",
"deploy-prod": "npm run generate && push-dir --dir=dist --branch=gh-pages --cleanup --remote=origin"
},
"dependencies": {
"core-js": "^3.6.5",
@ -16,6 +17,7 @@
"node-sass": "^4.14.1",
"nuxt": "^2.14.6",
"nuxt-buefy": "^0.4.4",
"push-dir": "^0.4.1",
"sass-loader": "^10.0.3",
"vue-i18n": "^8.22.1",
"web3": "1.2.6"

View File

@ -1,6 +1,8 @@
<template>
<div>
<h1 class="title has-text-centered">Tornado.cash <span>Ceremony</span></h1>
<h1 class="title has-text-centered">
Tornado.cash <span>Governance</span> Initiation
</h1>
<h2 class="subtitle has-text-centered">{{ $t('pageSubtitle') }}</h2>
<div class="buttons is-centered">

View File

@ -354,7 +354,12 @@ class Provider {
_repeatUntilResult(action, totalAttempts, retryAttempt = 1) {
return new Promise((resolve, reject) => {
const iteration = async () => {
const result = await action()
let result
try {
result = await action()
} catch (e) {
reject(e)
}
if (!result) {
if (retryAttempt <= totalAttempts) {

1
static/CNAME Normal file
View File

@ -0,0 +1 @@
initiation.tornado.cash

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@ const actions = {
) {
try {
dispatch('loading/enable', {}, { root: true })
const isProxy = action.domain === 'deployer.deploy.tornadocash.eth'
const isProxy = action.domain === 'deployer.contract.tornadocash.eth'
const ethAccount = rootGetters['provider/getAccount']
const web3 = rootGetters['provider/getWeb3']
@ -69,13 +69,12 @@ const actions = {
from: ethAccount,
}
const gasEstimate =
action.domain === 'deployer.deploy.tornadocash.eth'
action.domain === 'deployer.contract.tornadocash.eth'
? numberToHex(1e6)
: await dispatch('provider/sendRequest', callParamsEstimate, {
root: true,
})
const gasWithBuffer = Math.ceil(hexToNumber(gasEstimate) * 1.1)
console.log('xyu', gasWithBuffer)
const callParams = {
method: 'eth_sendTransaction',
params: [
@ -151,6 +150,16 @@ const actions = {
}
} catch (e) {
console.error('deployContract', e.message)
await dispatch(
'notice/addNotice',
{
notice: {
title: 'cannotBeExecuted',
type: 'danger',
},
},
{ root: true }
)
} finally {
dispatch('loading/disable', {}, { root: true })
}

View File

@ -8259,6 +8259,13 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
push-dir@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/push-dir/-/push-dir-0.4.1.tgz#29481eacd9c2106bbb7941db6d37d122a071ecb4"
integrity sha1-KUgerNnCEGu7eUHbbTfRIqBx7LQ=
dependencies:
minimist "^1.2.0"
q@^1.1.2:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"