- MetaMask
- Foundry
- Node.js
- npm
- yarn
- nvm
- Rust
- circom
- snarkjs
Recommended installation:
# To install MetaMask consult: `https://metamask.io/en-GB/download`
# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
# Install Node.js
nvm install 16
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install circom
cd ..
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circom
cd ..
# Install snarkjs
npm install -g snarkjs@latest
- Clone Tornado Cash Rebuilt repository.
cd ..
git clone https://github.com/ekrembal/tornado-cash-rebuilt.git
-
Consult this repository's README to deploy Tornado Cash on Citrea.
-
Get testnet cBTC from
https://citrea.xyz/faucet. Alternatively, you can use Garden Finance if you have testnet4 BTC and want to have a more authentic experience. ChooseCitrea Bitcoinas token to receive. -
Clone Tornado Cash UI repository, or visit
https://citrea-testnet-tornado-cash.netlify.app/for an already deployed version:
git clone https://github.com/ekrembal/classic-ui.git
-
If you did your own deployment, optionally change
networkConfig.js's5115part with your owninstanceAddress,deployedBlockNumber,NOTE_ACCOUNT_BLOCKandENCRYPTED_NOTES_BLOCK. You can use deployment block number from your deployment output for all three mentioned block numbers. -
Update
withdraw.wasmandwithdraw_final.zkeywith your versions fromtornado-cash-rebuilt. -
Run the UI on
http://localhost:3000:
cd classic-ui
nvm use
yarn install
yarn generate
yarn dev
- Foundry
Recommended installation:
# Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Read through
BitcoinMinerIncentives.sol. - Run tests:
forge test