Before starting, install the required tools:
Install Git:
sudo apt-get update
sudo apt-get install git
Install Foundry:
curl -L https://foundry.paradigm.xyz | bash
foundryup
Install Bun:
curl -fsSL https://bun.sh/install | bash
Install vlayer:
curl -L https://install.vlayer.xyz | bash
Required tools: Git
Bun
Foundry
- Initialize project
mkdir vlayer-simple
cd vlayer-simple
vlayer init simple --template simple
- Build and install dependencies
cd simple
forge build
cd vlayer
bun install
- Create your
.env.testnet.local
EXAMPLES_TEST_PRIVATE_KEY=your_private_key
CHAIN_NAME=optimismSepolia
JSON_RPC_URL=https://sepolia.optimism.io
PROVER_URL=https://test-prover.vlayer.xyz
- Start vlayer server (in a new terminal)
vlayer serve --rpc-url '11155420:https://sepolia.optimism.io'
- Run proof generation
bun run prove:testnet
- Initialize project
mkdir vlayer-email
cd vlayer-email
vlayer init emailproof --template simple-email-proof
- Build and install dependencies
cd emailproof
forge build
cd vlayer
bun install
-
Use same
.env.testnet.local
configuration as Simple Template -
Run proof generation
bun run prove:testnet
- Initialize project
mkdir vlayer-teleport
cd vlayer-teleport
vlayer init teleportproof --template simple-teleport
- Build and install dependencies
cd teleportproof
forge build
cd vlayer
bun install
-
Use same
.env.testnet.local
configuration as Simple Template -
Run proof generation
bun run prove:testnet
- OptimismSepolia ETH needed for transactions
- Get testnet ETH from Optimism Faucet or Alchemy Faucet
- Keep vlayer server running during all operations
- Each template needs its own clean directory
- Run server and client commands in separate terminals
- Make sure you have enough OptimismSepolia ETH before starting