### Frontend Build and Run Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Commands to build the frontend application for production and start the development server. ```bash pnpm frontend run build pnpm frontend run dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Installs all project dependencies using pnpm. ```bash pnpm i ``` -------------------------------- ### Frontend Environment Setup Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Configures environment variables for the frontend, including Privy authentication settings and the password hash. ```txt # Privy Auth Settings NEXT_PUBLIC_PRIVY_APP_ID= # PASSWORD_HASH Settings PASSWORD_HASH= ``` -------------------------------- ### Backend Environment Setup Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Sets up the necessary environment variables for the backend, including private keys and API keys for services like Alchemy and Basescan. ```txt PRIVATE_KEY="" ALCHMEY_API_KEY="" BASESCAN_API_KEY="" ``` -------------------------------- ### Circuit Compilation and Setup Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Commands for compiling the zero-knowledge circuits, generating input data, executing Groth16, generating witness files, and testing the proof generation and verification process. ```bash pnpm circuit run compile pnpm circuit run generateInput pnpm circuit run executeGroth16 pnpm circuit run generateWitness pnpm circuit run test pnpm circuit run cp:verifier pnpm circuit run cp:zk ``` -------------------------------- ### Backend Compilation, Testing, and Deployment Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Commands for compiling the backend smart contracts, running tests, deploying the ZKNFT contract to the Base Sepolia network, and verifying the deployed contract. ```bash pnpm backend run compile pnpm backend run test pnpm backend run deploy:ZKNFT --network base-sepolia pnpm backend run verify chain-84532 --include-unrelated-contracts ``` -------------------------------- ### Circuit Input Data Generation Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Specifies the password for generating input data for the zero-knowledge circuit. Remember to recompile circuits if the password is changed. ```typescript const input = "serverless"; ``` -------------------------------- ### Backend Contract Interaction Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/README.md Commands to interact with the deployed smart contracts, such as fetching the total supply and minting new NFTs on the Base Sepolia network. ```bash pnpm backend run totalSupply --network base-sepolia pnpm backend run mint --network base-sepolia ``` -------------------------------- ### Hardhat Project Tasks Source: https://github.com/unchain-tech/base-serverless-zk-nft-app/blob/main/pkgs/backend/README.md Demonstrates common Hardhat tasks for project interaction, including getting help, running tests (with gas reporting), starting a local node, and deploying contracts using Hardhat Ignition. ```shell npx hardhat help ``` ```shell npx hardhat test ``` ```shell REPORT_GAS=true npx hardhat test ``` ```shell npx hardhat node ``` ```shell npx hardhat ignition deploy ./ignition/modules/Lock.ts ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.