Skip to main content
Hero Light

Prerequisites

Install the following languages: GoLand and Node.js. Then install:
  1. Hardhat - Hardhat is used to run a local blockchain network.
  2. Solc, abigen - Solc and abigen are used for deploying smart contracts to the hardhat network and interacting with the deployed smart contract.

hardhat

Run the following commands to install hardhat locally:
npm install --save-dev hardhat
Install the following plugins:
npm install --save-dev @nomicfoundation/hardhat-toolbox
npm install --save-dev @nomicfoundation/hardhat-ignition-ethers
Refer to the official hardhat tutorial if you encounter any errors in the installation of hardhat: https://hardhat.org/tutorial/creating-a-new-hardhat-project

Installing solc and abigen

Follow the instructions given in https://goethereumbook.org/en/smart-contract-compile/. The abigen tool can be installed using the following command:
go install github.com/ethereum/go-ethereum/cmd/abigen@latest

Run a local blockchain network

Change the directory to blockchain_hardhat and run a local network:
cd blockchain-hardhat
npx hardhat node

Run the golang program

go run zkrevoke

Plot results

cd plots
poetry install --no-root 
poetry run python main.py