Contains a single contract that allows each user to save and read their own stored string value.
Directories inside of hardhat
directory
contracts
: Solidity contractstest
: Tests for Solidity contractsscripts
: Scripts for deploying contracts (typically not modified)hardhat.config.js
: Hardhat configuration file (e.g. adding more network deployment options)
- Install this Solidity VSCode extension: https://marketplace.visualstudio.com/items?itemName=JuanBlanco.solidity
- Install
pnpm
package manager:npm i -g pnpm
pnpm i
pnpm compile
pnpm test
pnpm run deploy
-
Set variables in
.env
file- Set
ACCOUNT_PRIVATE_KEY
- e.g. Metamask account private key
- Set
POLYGONSCAN_API_KEY
- get key from https://zkevm.polygonscan.com/myapikey
- Set
-
Deploy contract under you account address
pnpm deploy:zkEVM
- Make note of the contract address after deployment
-
Verify contract on PolygonScan using the contract address from the previous step
pnpm verify:zkEVM <contract address>