The frontend is a React 16 app written in TypeScript. It uses Parcel to handle source bundling.
First, get at least 0.102 Kovan ETH (0.1 plus gas fees) from a faucet. Next, navigate to the UI in your web browser.
Chose the network you want to use kovan
as exaple and the token ETH
and switch metamask to use kovan.
Enter the recipient's ETH address and click "Mix 0.1 ETH". This will trigger a MetaMask popup. Click submit. Do not close your browser window until you see the Countdown page.
Keep this browser window open till midnight UTC for the page to automatically
mix the funds. To speed up this process for testing purposes, you can set the
timestamp of the last entry in the localStorage MIXER
JSON array to 0
, and
a yellow button will appear which you can click to trigger the mix.
This mix process downloads about 170MB worth of gzipped zk-SNARK keys and
circuit data, generates a proof, and submits it to a centralised but
noncustodial relayer. The relayer verifies the proof and submits a mix()
transaction to the mixer contract.
For a hot-reloading development setup, run the following command in this directory:
npm run start
or with HtmlWebpack
npm run webpack-start
And launch http://localhost:1234 in your browser.
To create a production build, run:
npm run webpack-build
To run it, run;
npm run webpack-server
All stylesheets are written in LESS and stored in less/
.
index.html
imports index.less
. In turn, index.less
imports all other
stylesheets named index.less
in various subfolders.
We use convention to separate of style concerns.
-
constants.less
: defines colour values, lengths, font sizes, and any absolute values used by the other stylesheets. -
routes/index.less
: defines styles common to all routes, and also imports all stylesheets inroutes/
. -
routes/<name>.less
: defines styles specific toroutes/<name>.tsx
-
components/index.less
: defines styles common to all components, and also imports all stylesheets incomponents/
. -
components/<name>.less
: defines styles specific tocomponents/<name>.tsx
The layout should be responsive. Media queries should go into each individual
stylesheet. e.g. constants.less
should contain a media query which sets
different margins for different screen sizes, deposit.less
should handle its
own responsive styles, etc.