2022-04-22 10:04:16 +03:00
# Tornado Cash Classic UI
2022-04-22 06:05:56 +03:00
2023-07-04 21:20:44 +03:00
> Self-hostable Tornado Cash UI software for interacting with the protocol
2022-04-22 06:05:56 +03:00
2022-04-22 10:04:16 +03:00
## Building locally
2022-04-22 06:05:56 +03:00
2022-04-22 10:04:16 +03:00
- Install [Node.js ](https://nodejs.org ) version 14
2022-06-15 09:24:13 +03:00
- If you are using [nvm ](https://github.com/creationix/nvm#installation ) (recommended) running `nvm use` will automatically choose the right node version for you.
2022-04-22 10:04:16 +03:00
- Install [Yarn ](https://yarnpkg.com/en/docs/install )
- Install dependencies: `yarn`
- Copy the `.env.example` file to `.env`
2022-06-15 09:24:13 +03:00
- Replace environment variables with your own personal.
2022-04-22 10:04:16 +03:00
- Build the project to the `./dist/` folder with `yarn generate` .
2022-04-22 06:05:56 +03:00
2022-04-22 10:04:16 +03:00
## Development builds
2022-04-22 06:05:56 +03:00
2022-04-22 10:04:16 +03:00
To start a development build (e.g. with logging and file watching) run `yarn dev` .
2022-04-22 06:05:56 +03:00
2022-04-22 10:04:16 +03:00
## Deploy on IPFS
- Make sure you set `PINATA_API_KEY` and `PINATA_SECRET_API_KEY` environment variables in `.env`
- To deploy a production build run `yarn deploy-ipfs` .
## Architecture
2022-04-22 06:05:56 +03:00
For detailed explanation on how things work, checkout [Nuxt.js docs ](https://nuxtjs.org ).
2022-06-15 09:24:13 +03:00
## Audit
2022-09-10 20:53:24 +03:00
[TornadoCash_Classic_dApp_audit_Decurity.pdf ](https://ipfs.io/ipfs/QmXzmwfsb4GwzmPD7W9VDNHh7ttyYKgXCY74973QMZqBDA )
2022-06-08 13:45:37 +03:00
## Update cached files
2023-07-04 21:20:44 +03:00
- To update deposit and withdrawal events use `yarn update:events {chainId} {optional: tokenOrEvent} {optional: tokenOrEvent}`
- To update encrypted notes use `yarn update:encrypted {chainId}`
- To update merkle tree use `yarn update:tree {chainId}`
2022-06-08 13:45:37 +03:00
#### NOTE!
2023-07-04 21:20:44 +03:00
After updating cached files do not forget to use `yarn update:zip` .
2022-06-08 13:45:37 +03:00
### Example for Ethereum Mainnet:
2023-07-04 21:20:44 +03:00
You may set in [`networkConfig.js` ](./networkConfig.js ) the `blockSyncInterval` (def: 10_000) to the maximum value allowed by your RPC provider. Command usage follows below.
```bash
# Updating events with just the required chain id parameter
2022-06-08 13:45:37 +03:00
yarn update:events 1
2023-07-04 21:20:44 +03:00
# Updating events for only one token across all instances on that network
yarn update:events 1 dai
# Updating events for only one event on only some network
yarn update:events 1 deposit
# Both
yarn update:events 1 dai deposit
# Updating encrypted notes for some chain id
2022-06-08 13:45:37 +03:00
yarn update:encrypted 1
2023-07-04 21:20:44 +03:00
# Updating trees for some chain id
2022-06-08 13:45:37 +03:00
yarn update:tree 1
2023-07-04 21:20:44 +03:00
# Finally zips must be updated
2022-06-08 13:45:37 +03:00
yarn update:zip
```
### Example for Binance Smart Chain:
2023-07-04 21:20:44 +03:00
```bash
2022-06-08 13:45:37 +03:00
yarn update:events 56
2023-07-04 21:20:44 +03:00
yarn update:events 56 bnb
yarn update:events 56 bnb deposit
2022-06-13 10:13:54 +03:00
yarn update:encrypted 56
2023-07-04 21:20:44 +03:00
yarn update:tree 56
2022-06-08 13:45:37 +03:00
yarn update:zip
```