The Playground is a developer-friendly environment designed to interact with and visualize the functionality of the Tokamak zk-EVM ecosystem. It provides a frontend interface for developers to test, debug, and experiment with placements, permutations, and other functionalities related to Zero-Knowledge Proof (ZKP) circuits.
-
Make sure you have the following installed on your system:
- Node.js (v18 or later)
- npm (package manager)
-
Make sure you have the Tokamak zk-EVM repository cloned on your system. For example,
git clone https://github.com/tokamak-network/Tokamak-zk-EVM.git cd Tokamak-zk-EVM
-
Make sure you have installed Tokamak zk-EVM packages of your interest.
-
Open a new terminal and go to the playground directory.
-
Install dependencies:
npm install
-
Get your Etherscan API key from Etherscan -> My profile -> API Keys.
-
Add an
.env
file into the playground folder with the following content:VITE_ETHERSCAN_API_KEY=<Your Etherscan API Key>
- Open a new terminal for running your backend server. The backend handles operations like file reading, witness generation, and ZKP calculations.
- Go to the playground directory.
- Start the server:
By default, the server may run on
npm run server
http://localhost:3000
.
- Open a new terminal for running your frontend server. The frontend serves the Playground interface.
- Go to the playground directory.
- Start the server:
npm run dev
- Open your browser and visit:
http://localhost:5173