Deploy locally for dev

Deploy a full local spin-OPZK stack for development.

In this guide, we'll deploy a full spin-OPZK components for local development. This includes

  1. hardhat local testnet blockchain

  2. deploy OPZK contracts to the testnet

  3. spin-operator for handling submissions

  4. [optional] spin-challenger for validating submissions

  5. [optional] spin-da for providing nessacary data cache for validating submission

hardhat local testnet blockchain

  1. Obtain the smart contracts

git clone https://github.com/zkspin/opzk.git
  1. Go into spin-contracts

cd opzk/spin-contracts/
  1. Install the dependencies

npm install
  1. Run the local hardhat node, keep this terminal live

npm run node
  1. In a separate terminal, deploy the smart contracts

npm run deploy-local-opzk
  1. Run OPZK operator

docker run --env-file ./.env.template -e CHAIN_RPC_URL=http://host.docker.internal:8545 --mount type=bind,source=./wallets.json,target=/app/wallets.json -t zkspin/spin-operator
  1. [optional] Run OPZK challenger

TODO

  1. [optional] Run spin-DA

Last updated