add contributions json

-add a variable to disable attestation watcher
This commit is contained in:
Danil Kovtonyuk 2020-05-11 20:11:59 +10:00
parent 525c237b6c
commit 089db9ea31
5 changed files with 10057 additions and 17 deletions

View File

@ -8,6 +8,7 @@ MYSQL_USER=
MYSQL_PASSWORD=
MYSQL_DATABASE=phase2
DISABLE_ATTESTATION_WATCHER=false
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_CALLBACK_URL=https://ceremony.tornado.cash/api/oauth_callback/twitter

View File

@ -15,6 +15,7 @@ For command `yarn dev` the `.env.development` is used. The `yarn start` uses `.e
| MYSQL_USER | Mysql user the app uses. Notice, you don't need mysql db for development. The app will use local sqlite db in dev mode. Local db is stored in `db.development.sqlite` file. |
| MYSQL_PASSWORD | Mysql password for MYSQL_USER |
| MYSQL_DATABASE | Mysql database |
| DISABLE_ATTESTATION_WATCHER | Disable attestation watcher. `true` or `false` |
| TWITTER_CONSUMER_KEY | Twitter consumer API key. [Twitter app](https://developer.twitter.com/en/apps) |
| TWITTER_CONSUMER_SECRET | Twitter consumer API secret |
| TWITTER_CALLBACK_URL | Twitter callback URL. The app handles the `/api/oauth_callback/twitter` endpoint. Feel free to change domain name and protocol though |
@ -42,7 +43,7 @@ Follow instructions in the [Initialize ceremony](#initialize-real-ceremony) sect
$ cp .env.example .env.production
# Run Nginx + Letsencrypt containers to serve https requests to the app
$ cd frontend
$ cd frontend
$ docker-compose up -d
$ cd ..
@ -96,7 +97,7 @@ Example: `wasm-pack build --release --target web -- --no-default-features --feat
1. `npm run build:circuit:bin`
1. That's it you can use `Verifier.sol`, `withdraw.json`, `withdraw_verification_key.json` and `withdraw_proving_key.bin` to deploy contract and the UI.
Note.
Note.
1. Your also need to use [special](https://github.com/tornadocash/websnark.git#4c0af6a8b65aabea3c09f377f63c44e7a58afa6d) version of websnark lib on the UI.
2. update WASM module.

View File

@ -8,11 +8,15 @@
defines the rules of the game for the construction of zk-SNARKs. Please contribute with your
source of entropy, so that Tornado.cash can become fully trustless.
</p>
<div class="buttons is-centered">
<!-- <div class="buttons is-centered">
<b-button type="is-primary" outlined tag="router-link" to="/make-contribution">
Contribute
</b-button>
</div>
</div> -->
<h2 class="title">
Tornado.cash <span>Trusted Setup Ceremony</span> is completed.<br />
Thank you for your participation!
</h2>
<div class="currently">
Currently there are <span>{{ contributions.length }}</span> contributions
</div>
@ -55,9 +59,10 @@
</b-table-column>
<b-table-column :centered="true" label="Attestation">
<!-- :href="`https://twitter.com/${props.row.handle}/status/${props.row.attestation}`" -->
<a
v-if="props.row.attestation"
:href="`https://twitter.com/${props.row.handle}/status/${props.row.attestation}`"
:href="props.row.attestation"
target="_blank"
class="button is-icon"
>
@ -118,10 +123,13 @@
</template>
<script>
import contributions from '@/store/contributions'
export default {
data() {
return {
contributions: [],
contributions,
// contributions: [],
// contributions: [
// {
// id: 1,
@ -147,15 +155,15 @@ export default {
})
.reverse()
}
},
async mounted() {
try {
const response = await fetch('/api/contributions')
const data = await response.json()
this.contributions = data
} catch (e) {
console.error('e', e)
}
}
// async mounted() {
// try {
// const response = await fetch('/api/contributions')
// const data = await response.json()
// this.contributions = data
// } catch (e) {
// console.error('e', e)
// }
// }
}
</script>

View File

@ -46,7 +46,9 @@ async function start() {
console.log(`Server is running on port ${port}.`)
})
attestationWatcher()
console.log('attestationWatcher started')
if (process.env.DISABLE_ATTESTATION_WATCHER !== 'true') {
attestationWatcher()
console.log('attestationWatcher started')
}
}
start()

10028
store/contributions.json Normal file

File diff suppressed because it is too large Load Diff