Initial commit

This commit is contained in:
Tornado Contrib 2024-10-08 00:21:59 +00:00
commit 993b9148e2
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
148 changed files with 333804 additions and 0 deletions

25
.eslintrc.js Normal file

@ -0,0 +1,25 @@
module.exports = {
env: {
es2021: true,
browser: true,
},
extends: ['eslint:recommended'],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
],
plugins: ['html'],
rules: {
indent: ['error', 4],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
},
};

1
.gitignore vendored Normal file

@ -0,0 +1 @@
node_modules

53
README.md Normal file

@ -0,0 +1,53 @@
<div class="hero" align="center">
<img src="./static/torn2.png" style="max-width: 100px;">
# Tornado Withdraw
Fastest Tornado Cash Withdrawal UI built with Bootstrap and jQuery
</div>
## What is this?
This is a Withdrawal only UI for Tornado Cash Pools built upon [@tornado/core](https://git.tornado.ws/tornadocontrib/tornado-core) package that enables you to interact with [Tovarish Relayer](https://git.tornado.ws/tornadocontrib/tovarish-relayer) which provides historic events API as a replacement of deprecated The Graph Subgraph endpoints.
The UI is built with the simple technical stack of [Bootstrap 5](https://getbootstrap.com/) and [jQuery](https://jquery.com/) and it is based on the modern browser API like [WebAssembly](https://webassembly.org/), [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt), and [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) and thus this UI wouldn't work on older browsers like IE (Or any older browser that has been released before 2020).
You can run this UI from a single [index.html](./index.html) file or the standalone web server that could be spawned by `yarn dev` command (which should open the page on http://localhost:8080/).
As long as the `index.html` refers to the correct libraries with correct hash values, this UI can be considered uncontaminated.
## Disclaimer
This UI is built with the mindset of transparency, and simplicity. The UI has used the least required libraries ( @tornado/core, ethers.js, bootstrap, jquery, circomlibjs ) to make the withdrawal from Tornado Cash deposit pools happen. Auditing `index.html` and `@tornado/core` library will be enough to guarantee the functionality of the UI working correctly.
Currently, this UI should be considered as an early alpha phase and will fix or add the functionality if required. This UI has not been audited by any trusted party so before using this UI you must understand how it works, and most of all you must use this UI under your liabilities of yours including technical and legal perspectives.
This UI is built with the mindset of [free speech](https://digital-law-online.info/lpdi1.0/treatise50.html) and asset recoverability of deposited assets under Tornado Cash pools. By using this tool you must comply with local regulations and the author or dev of this tool holds no responsibility of your financial assets as you aren't interacting with us but [the world computer called Ethereum](https://inevitableeth.com/en/home/ethereum/world-computer).
## How to use
Simply open [index.html](./index.html) or start `yarn dev` if you have Node.js and yarn installed locally.
## How to Audit
This UI is designed with a focus on transparency which prevents any possible malicious code from being injected on the UI ( and it also prevents from scam sites from popping up. ).
You can audit components by
### @tornado/core
Clone the [@tornado/core](https://git.tornado.ws/tornadocontrib/tornado-core) repository from git and run `yarn && yarn build` command to make sure webpack produces the same result ( if the umd file has some manually added codes running `yarn build` will remove the edited line ).
### This UI
Simply clone this repository and run `yarn && yarn update`. You can audit the script `./scripts/update.ts` which would fetch the latest built @tornado/core from the repository and generate the digest hash of files under the `./static` directory ( can be checked on `./static/hashes.json` file ).
The hash values are included on `index.html` file which compares the fetched files either from remote CDN (jsdelivr) or from `./static` path. This ensures that if you have the correct `index.html` file any remote or local resources fetched will be audited by your local browser.
### Static files
Bootstrap CSS files and @tornado/core files are directly fetched from the respective npm repository. `tornado.json.zip` and `tornadoProvingKey.json.zip` file are fetched from the last commit of [tornado-classic-ui](https://github.com/tornadocash/tornado-classic-ui) repository.
Event files are irregularly updated by [tornado-cli](https://git.tornado.ws/tornadocontrib/tornado-cli) with 6~12 months timespan.

1672
index.html Normal file

File diff suppressed because it is too large Load Diff

24
package.json Normal file

@ -0,0 +1,24 @@
{
"name": "tornado-withdraw",
"version": "1.0.0",
"private": true,
"main": "index.js",
"scripts": {
"lint": "eslint index.html",
"dev": "npx http-server --cors .",
"update": "ts-node scripts/update.ts",
"sass": "sass static/bootstrap.scss static/bootstrap.css",
"sass:watch": "yarn sass --watch"
},
"devDependencies": {
"@tornado/core": "git+https://git.tornado.ws/tornadocontrib/tornado-core.git#0ebd4d175f4a7f8f0f339091cbec4dc4a7e8ad3a",
"@types/node": "^22.7.4",
"bootstrap": "^5.3.3",
"eslint": "8.57.0",
"eslint-plugin-html": "^8.1.1",
"sass": "^1.79.4",
"ts-node": "^10.9.2",
"tsc": "^2.0.4",
"typescript": "^5.6.2"
}
}

56
scripts/update.ts Normal file

@ -0,0 +1,56 @@
import path from 'path';
import fs from 'fs/promises';
import { bytesToBase64, digest } from '@tornado/core';
const src = [
'node_modules/@tornado/core/dist/tornado.umd.js',
'node_modules/@tornado/core/dist/tornado.umd.min.js',
'node_modules/@tornado/core/dist/tornadoContracts.umd.js',
'node_modules/@tornado/core/dist/tornadoContracts.umd.min.js',
'node_modules/@tornado/core/dist/merkleTreeWorker.umd.js',
'node_modules/@tornado/core/dist/merkleTreeWorker.umd.min.js',
];
async function copyFiles() {
for (const file of src) {
const dst = path.join('static', path.basename(file));
await fs.copyFile(file, dst);
console.log(`Copied ${file} to ${dst}`);
}
}
async function content(file: string) {
const content = new Uint8Array(await fs.readFile(file));
const hash = 'sha384-' + bytesToBase64(await digest(content));
console.log(`${hash}: ${file}`);
return hash;
}
async function update() {
await copyFiles();
const staticFiles = await fs.readdir('static', { recursive: true });
const hashes = {} as {
[key: string]: string;
};
for (const filePath of staticFiles) {
const file = path.join('static', filePath).replaceAll(path.sep, path.posix.sep);
if ((await fs.stat(file)).isDirectory() || file.includes('hashes.json')) {
continue;
}
const hash = await content(file);
hashes[file] = hash;
}
await fs.writeFile('static/hashes.json', JSON.stringify(hashes, null, 2));
}
update();

11848
static/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

1
static/bootstrap.css.map Normal file

File diff suppressed because one or more lines are too long

29
static/bootstrap.scss vendored Normal file

@ -0,0 +1,29 @@
// https://stackoverflow.com/questions/38792005/how-to-change-the-bootstrap-primary-color
// required to get $green variable
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/variables-dark";
$tornado-green: #94febf !default;
$tornado-black: #000403 !default;
$primary: $tornado-green; // set the $primary variable
$success: $tornado-green;
$component-active-bg: $tornado-green;
$nav-link-color: $tornado-green;
$nav-link-hover-color: $white;
$nav-pills-link-active-bg: $tornado-green;
$nav-pills-link-active-color: $tornado-black;
$card-border-color: $tornado-green;
// merge with existing $theme-colors map
$theme-colors: map-merge($theme-colors, (
"primary": $primary,
"success": $success
));
// set changes
@import "../node_modules/bootstrap/scss/bootstrap";

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

384
static/events/relayers.json Normal file

@ -0,0 +1,384 @@
{
"lastBlock": 20874000,
"timestamp": 1727826179,
"relayers": [
{
"ensName": "tornadowithdraw.eth",
"relayerAddress": "0x40c3d1656a26C9266f4A10fed0D87EFf79F54E64",
"hostnames": {},
"tovarishHost": "tornadowithdraw.com",
"tovarishNetworks": [
1,
56,
137,
10,
42161,
100,
43114,
11155111
]
},
{
"ensName": "therelayer.eth",
"relayerAddress": "0xA0F0287683E820FF4211e67C03cf46a87431f4E1",
"isRegistered": true,
"owner": "0xA0F0287683E820FF4211e67C03cf46a87431f4E1",
"stakeBalance": "1335.888771359625809238",
"hostnames": {
"1": "mainnet.therelayer.xyz",
"10": "optimism.therelayer.xyz",
"56": "bsc.therelayer.xyz",
"100": "xdai.therelayer.xyz",
"137": "polygon.therelayer.xyz",
"42161": "arbitrum.therelayer.xyz",
"43114": "avalanche.therelayer.xyz"
}
},
{
"ensName": "cheap-relayer.eth",
"relayerAddress": "0x076D4E32C6A5D888fC4658281539c94E778C796d",
"isRegistered": true,
"owner": "0x076D4E32C6A5D888fC4658281539c94E778C796d",
"stakeBalance": "500.878420081833044818",
"hostnames": {
"1": "mainnet-tornado.cheap-relayer.xyz",
"56": "bsc-tornado.cheap-relayer.xyz",
"137": "polygon-tornado.cheap-relayer.xyz",
"43114": "avalanche-tornado.cheap-relayer.xyz"
}
},
{
"ensName": "lowcost.eth",
"relayerAddress": "0x28907F21F43B419F34226d6f10aCbCf1832b1D4d",
"isRegistered": true,
"owner": "0x28907F21F43B419F34226d6f10aCbCf1832b1D4d",
"stakeBalance": "500.279638085962965981",
"hostnames": {
"1": "mainnet-tornado.low-fee.xyz",
"56": "bsc-tornado.low-fee.xyz",
"137": "polygon-tornado.low-fee.xyz",
"43114": "avalanche-tornado.low-fee.xyz"
}
},
{
"ensName": "relayernews.eth",
"relayerAddress": "0x6289C8a70EE2Ed6914834CaEa431F9a82c7eAf70",
"isRegistered": true,
"owner": "0x6289C8a70EE2Ed6914834CaEa431F9a82c7eAf70",
"stakeBalance": "1661.181918638614466424",
"hostnames": {
"1": "mainnet-tornado.relayernews.xyz",
"56": "bsc-tornado.relayernews.xyz"
}
},
{
"ensName": "on-sale.eth",
"relayerAddress": "0x63606C4011e97a73BCd844Cde6a38D45a728BC0E",
"isRegistered": true,
"owner": "0x63606C4011e97a73BCd844Cde6a38D45a728BC0E",
"stakeBalance": "4476.543684932880020592",
"hostnames": {
"1": "mainnet-tornado.appleworld.club",
"56": "bsc-tornado.appleworld.club"
}
},
{
"ensName": "em3tornado.eth",
"relayerAddress": "0x3a1d526D09b7E59Fd88De4726f68A8246dDC2742",
"isRegistered": true,
"owner": "0x3a1d526D09b7E59Fd88De4726f68A8246dDC2742",
"stakeBalance": "16864.242955629118561145",
"hostnames": {
"1": "em3torn.com",
"10": "optimism.em3torn.com",
"56": "bsc.em3torn.com",
"137": "polygon.em3torn.com",
"42161": "arbitrum.em3torn.com",
"43114": "avax.em3torn.com"
}
},
{
"ensName": "reslayer.eth",
"relayerAddress": "0x7Ba6781620c91676B070D319E7E894BFd4A9eC81",
"isRegistered": true,
"owner": "0x7Ba6781620c91676B070D319E7E894BFd4A9eC81",
"stakeBalance": "879.305690438201312145",
"hostnames": {
"1": "mainnet-tornado.reslayer.xyz",
"56": "bsc-tornado.reslayer.xyz",
"100": "gnosis-tornado.reslayer.xyz",
"137": "polygon-tornado.reslayer.xyz",
"42161": "arbitrum-tornado.reslayer.xyz",
"43114": "avalanche-tornado.reslayer.xyz"
}
},
{
"ensName": "0xtorn.eth",
"relayerAddress": "0x9Ffbd3f9eE795A4fDa880ED553A2A4BD6D45CE5B",
"isRegistered": true,
"owner": "0x9Ffbd3f9eE795A4fDa880ED553A2A4BD6D45CE5B",
"stakeBalance": "4627.036617270139345308",
"hostnames": {
"1": "mainnet.al1n.cc",
"56": "bsc-tornado.al1n.cc"
}
},
{
"ensName": "wetez.eth",
"relayerAddress": "0xe6184DA55174Cc0263a17eA2fc24E48511766505",
"isRegistered": true,
"owner": "0xe6184DA55174Cc0263a17eA2fc24E48511766505",
"stakeBalance": "567.980734786905511868",
"hostnames": {
"1": "tornado-1.wetez.io"
}
},
{
"ensName": "0xproxy.eth",
"relayerAddress": "0x08657a1f4C1F06d657F31767831421EE7FaDf549",
"isRegistered": true,
"owner": "0x08657a1f4C1F06d657F31767831421EE7FaDf549",
"stakeBalance": "705.605817336537209483",
"hostnames": {
"1": "mainnet.0x0relayer.xyz",
"56": "bsc.0x0relayer.xyz",
"137": "polygon.0x0relayer.xyz"
}
},
{
"ensName": "torn-eth.eth",
"relayerAddress": "0x42FecB4137aFF76E0E85702ff4F339DbFe6D859E",
"isRegistered": true,
"owner": "0x42FecB4137aFF76E0E85702ff4F339DbFe6D859E",
"stakeBalance": "978.62598484549460861",
"hostnames": {
"1": "mainnet-tornado.50swap.com"
}
},
{
"ensName": "shadow-out.eth",
"relayerAddress": "0x9Ee26a4bFd731E8e742B65bF955814EADdd7F151",
"isRegistered": true,
"owner": "0x9Ee26a4bFd731E8e742B65bF955814EADdd7F151",
"stakeBalance": "3571.639136672079169166",
"hostnames": {
"1": "livetobecomeavillain",
"56": "justarandomdude",
"100": "everythingisburning"
}
},
{
"ensName": "bitah.eth",
"relayerAddress": "0x7E3893725d4e238B4c8c83375bBAd024a66Ffa42",
"isRegistered": true,
"owner": "0x7E3893725d4e238B4c8c83375bBAd024a66Ffa42",
"stakeBalance": "503.237718892072788154",
"hostnames": {
"1": "tornado.bitah.link",
"56": "bsc-tornado.bitah.link",
"137": "polygon-tornado.bitah.link"
}
},
{
"ensName": "torntorn.eth",
"relayerAddress": "0x1247749d7E28D357B4279110af0802603AC526cE",
"isRegistered": true,
"owner": "0x1247749d7E28D357B4279110af0802603AC526cE",
"stakeBalance": "5535.435044583932530913",
"hostnames": {
"1": "eth.fsdhreu39jfk.com",
"56": "bsc.fsdhreu39jfk.com",
"100": "gnosis.tornad0.com",
"137": "polygon.tornad0.com"
}
},
{
"ensName": "secure-relay.eth",
"relayerAddress": "0x1036AF02bCDb2e3A4db2d3D40b29e5054EDc79BA",
"isRegistered": true,
"owner": "0x1036AF02bCDb2e3A4db2d3D40b29e5054EDc79BA",
"stakeBalance": "6751.661507930994067422",
"hostnames": {
"1": "torn-relayer.duckdns.org"
}
},
{
"ensName": "relayer007.eth",
"relayerAddress": "0xa0109274F53609f6Be97ec5f3052C659AB80f012",
"isRegistered": true,
"owner": "0xa0109274F53609f6Be97ec5f3052C659AB80f012",
"stakeBalance": "2075.677151387681021207",
"hostnames": {
"1": "torn.relayersdao.finance",
"56": "bsc.relayersdao.finance",
"137": "matic.relayersdao.finance"
}
},
{
"ensName": "reltor.eth",
"relayerAddress": "0x4750BCfcC340AA4B31be7e71fa072716d28c29C5",
"isRegistered": true,
"owner": "0x4750BCfcC340AA4B31be7e71fa072716d28c29C5",
"stakeBalance": "17078.896444585792890283",
"hostnames": {
"1": "eth.reltor.su",
"56": "binance.reltor.su",
"137": "polygon.reltor.su"
}
},
{
"ensName": "t-relayer.eth",
"relayerAddress": "0x000000Cd6521Ed1a65FAe0678eA15aF4EEAD74fe",
"isRegistered": true,
"owner": "0x000000Cd6521Ed1a65FAe0678eA15aF4EEAD74fe",
"stakeBalance": "9393.81613250700489948",
"hostnames": {
"1": "eth.t-relayer.com",
"56": "bsc.t-relayer.com"
}
},
{
"ensName": "default-relayer.eth",
"relayerAddress": "0x5555555731006f71f121144534Ca7C8799F66AA3",
"isRegistered": true,
"owner": "0x5555555731006f71f121144534Ca7C8799F66AA3",
"stakeBalance": "12244.203047120053584442",
"hostnames": {
"1": "eth.default-relayer.com",
"56": "bsc.default-relayer.com"
}
},
{
"ensName": "relayer-secure.eth",
"relayerAddress": "0xCEdac436cEA98E93F471331eCC693fF41D730921",
"isRegistered": true,
"owner": "0xCEdac436cEA98E93F471331eCC693fF41D730921",
"stakeBalance": "548.198082306127582623",
"hostnames": {
"1": "relsecc-mainnet.moon-relayer.app"
}
},
{
"ensName": "0xgm777.eth",
"relayerAddress": "0x94596B6A626392F5D972D6CC4D929a42c2f0008c",
"isRegistered": true,
"owner": "0x94596B6A626392F5D972D6CC4D929a42c2f0008c",
"stakeBalance": "1649.22629774180421325",
"hostnames": {
"1": "main.gm777.xyz",
"56": "bsc.gm777.xyz",
"42161": "arb.gm777.xyz"
}
},
{
"ensName": "k-relayer.eth",
"relayerAddress": "0xC49415493eB3Ec64a0F13D8AA5056f1CfC4ce35c",
"isRegistered": true,
"owner": "0xC49415493eB3Ec64a0F13D8AA5056f1CfC4ce35c",
"stakeBalance": "2392.026618435010858225",
"hostnames": {
"1": "black-hardy.com",
"56": "bsc.black-hardy.com"
}
},
{
"ensName": "tornxdo.eth",
"relayerAddress": "0xB399aa4c2F1678f72529Cd125F82cEA2c2a823eD",
"isRegistered": true,
"owner": "0xB399aa4c2F1678f72529Cd125F82cEA2c2a823eD",
"stakeBalance": "983.310689667160962345",
"hostnames": {
"1": "tornado.evmjunkie.xyz"
}
},
{
"ensName": "torrelayer.eth",
"relayerAddress": "0x2Ee39Ff05643bC7cc9ed31B71e142429044A425C",
"isRegistered": true,
"owner": "0x2Ee39Ff05643bC7cc9ed31B71e142429044A425C",
"stakeBalance": "4150.327987173762878437",
"hostnames": {
"1": "tornima.xyz",
"56": "binance.tornima.xyz"
}
},
{
"ensName": "torn-city.eth",
"relayerAddress": "0xd04e9f0945DEA8373D882C730e2c93a74B591796",
"isRegistered": true,
"owner": "0xd04e9f0945DEA8373D882C730e2c93a74B591796",
"stakeBalance": "6636.564618899564311691",
"hostnames": {
"1": "torn-city.com",
"56": "bsc.torn-city.com"
}
},
{
"ensName": "crelayer.eth",
"relayerAddress": "0x180c58B7305152357142b33Eea94cBB152058B61",
"isRegistered": true,
"owner": "0x180c58B7305152357142b33Eea94cBB152058B61",
"stakeBalance": "1460.389956347917729137",
"hostnames": {
"1": "eth.crelayer.xyz",
"56": "bsc.crelayer.xyz"
}
},
{
"ensName": "best-relay.eth",
"relayerAddress": "0xe5A4c70113b90566BC5f80a3866935d0d52F990E",
"isRegistered": true,
"owner": "0xe5A4c70113b90566BC5f80a3866935d0d52F990E",
"stakeBalance": "2002.0",
"hostnames": {
"1": "best-relay.gato-miaouw.xyz",
"56": "bsc.gato-miaouw.xyz"
}
},
{
"ensName": "safety-relayer.eth",
"relayerAddress": "0xF1F4F76c9969eFbFB5C9A90a6E44c0E3696D3EF8",
"isRegistered": true,
"owner": "0xF1F4F76c9969eFbFB5C9A90a6E44c0E3696D3EF8",
"stakeBalance": "500.879215977529089999",
"hostnames": {
"1": "a-relayer.top",
"56": "bsc.a-relayer.top",
"137": "polygon.a-relayer.top"
}
},
{
"ensName": "quick-relayer.eth",
"relayerAddress": "0x187541D7D312F742040f270d0221B4Fe577934B0",
"isRegistered": true,
"owner": "0x187541D7D312F742040f270d0221B4Fe577934B0",
"stakeBalance": "2931.033250737658918569",
"hostnames": {
"1": "quick-relayer.xyz"
}
},
{
"ensName": "okrelayer.eth",
"relayerAddress": "0x0e9D9a828247F5eed7f6D31D213A39805De52441",
"isRegistered": true,
"owner": "0x0e9D9a828247F5eed7f6D31D213A39805De52441",
"stakeBalance": "4668.726167448982243314",
"hostnames": {
"1": "okrelayer.xyz",
"56": "binance.okrelayer.xyz",
"137": "polygon.okrelayer.xyz",
"42161": "arb.okrelayer.xyz"
}
},
{
"ensName": "s-relayer.eth",
"relayerAddress": "0xc6398b4e8B60720051ed33f5C5a692f9785f5580",
"isRegistered": true,
"owner": "0xc6398b4e8B60720051ed33f5C5a692f9785f5580",
"stakeBalance": "5000.0",
"hostnames": {
"1": "s-relayer.xyz"
}
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More