Our dApp implementation of ERC-5564: Stealth Addresses.
Created with ❤️ by Andre, Arwin, and Eddy.
- Deployment Links
- Motivation
- Presentation Link
- Preview
- Running dApp Locally
- Deploying smart contract on a Local Development Chain
- Deploying smart contract on a Testnet Chain (e.g Sepolia)
You can find our deployed dApp here:
https://stealth-verse.vercel.app/.
Note
Our app requires the Metamask browser extension (and some knowledge of Ethereum) to use!
Find our supplementary SendAndAnnounce smart contract deployed on the Sepolia chain here: 0xFA77444e2fB7ED0dd8554f3002bA4f5bB6335CbC.
Ethereum is too transparent. Any transaction you make is public on the blockchain and can easily be linked back to your wallet. This is an issue if we care about privacy.
Stealth addresses are private one-time-use addresses that are derived from your public meta-address. Senders can use your meta-address to derive new stealth addresses for you, which they send their funds to. As a receiver, your meta-address helps you monitor your stealth addresses and use their funds.
Using stealth addresses breaks the linkability between your public wallet (identity) and the private stealth wallets, granting receiver privacy and unlinkability.
This app implements the standard proposed in ERC-5564, providing a non-interactive way of sending funds to meta-addresses and checking the balance of your own stealth wallets.
Our presentation covering Stealth Addresses is in the root directory of this repository, titled "CSCD21-ERC5564.pdf".
- Navigate to the
frontenddirectory:
cd frontend- Install dependencies:
npm i- Start the development server:
npm run dev- Open http://localhost:3000 with your browser to see the result.
- Install dependencies
npm install- Compile the Solidity contracts
forge build- Start the local chain using
anvil(in a separate terminal)
anvil- Run the unit tests
npm testFor educational purposes, I wrote these tests in JavaScript using the Ethereum library viem and the test framework vitest.
FYI, the Foundry framework has a different approach to writing unit tests using Solidity directly.
To deploy your app, you need two things:
- A private key account with some Sepolia ETH. There are different wallets for Ethereum; we are going to use MetaMask here.
- An RPC endpoint for sending queries and transactions to the Ethereum Sepolia network. There are several Ethereum RPC providers such as Alchemy (our choice here) and Infura.
-
Install MetaMask, create a wallet, and export your private key.
-
Provision your account with Sepolia ETH. To get those ETH, you can use a faucet such as Google Sepolia Faucet or Sepolia PoW Faucet.
-
Create an account on Alchemy, then create and export an API key for Sepolia.
- Create an
.envfile and setALCHEMY_API_KEY:
ALCHEMY_API_KEY=
ALCHEMY_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_API_KEY}
- Load this
.envfile:
source .env- Verify that your RPC endpoint works. This command should show the Sepolia chain ID
11155111:
cast chain-id --rpc-url $ALCHEMY_RPC_URL- Record your key inside the Foundry keystore (use a strong password):
cast wallet import deployer --private-key your_private_key- Check your balance on Sepolia and make sure that you have at least 0.01 ETH on your account:
cast balance \
--rpc-url $ALCHEMY_RPC_URL \
--ether $(cast wallet address --account deployer)
forge create contracts/SendAndAnnounce.sol:SendAndAnnounce \
--rpc-url $ALCHEMY_RPC_URL \
--account deployer \
--broadcastThis should give the following output:
Deployer: <ACCOUNT_ADDRESS>
Deployed to: <DEPLOYED_ADDRESS>
Transaction hash: <TX_HASH>Your contract has been deployed to <DEPLOYED_ADDRESS> and <TX_HASH> contains the transaction that includes the deployment.
You can look at this contract on Etherscan:
https://sepolia.etherscan.io/address/<DEPLOYED_ADDRESS>
And the transaction hash:
https://sepolia.etherscan.io/tx/<TX_HASH>
Edit the file static/config.json and update the contract's address and transaction hash for the Sepolia chain (11155111):
{
"11155111": {
"address": "<DEPLOYED_ADDRESS>",
"hash": "<TX_HASH>"
}
}
Verifying a smart contract on Etherscan makes its source code publicly readable and provably matches the deployed bytecode, building trust and transparency. It allows users, auditors, and integrators to understand exactly what the contract does; reducing the risk of hidden logic, backdoors, or malicious behavior.
forge verify-contract \
--chain sepolia \
--etherscan-api-key "$ETHERSCAN_API_KEY" \
<DEPLOYED_ADDRESS> \
contracts/AuctionHouse.sol:AuctionHouse

