Skip to content

Collect and trade location-based game built on Aztec's Zero-Knowledge blockchain

License

Notifications You must be signed in to change notification settings

ZeroK-Labs/froglin

Repository files navigation

cover_image

Introduction

Welcome to froglin, a mysterious universe hiding treasures and friends within!

Froglins are strange creatures which can be found all around us. They exist solely in cryptography terms, and you can befriend them through the use of Zero-Knowledge Proofs.

This repo is the Froglin game source code.


Contents



Setup

This project is based on a Linux development environment.
The setup instructions are equivalent for macOS.
If you're using Windows, you'll need to install WSL first.

In support of the development process, the following prerequisites are used:


Clone repository

git clone https://github.com/ZeroK-Labs/froglin

Install dependencies: prerequistites and packages

On first run, enable the setup script:

sudo chmod +x ./scripts/setup.sh

NOTE: Since Aztec is updated frequently, it is recommended to run this script instead of the usual bun i to update prequisites and packages, as it ensures the latest version of the sandbox is avalable locally.


Run the setup:

./scripts/setup.sh

After the script completes successfully, to use the tools you'll need to refresh the environment, or start a new console session. Follow the instructions shown on screen. This reloading will only be needed the very first time the script is run.

An env.config.js will be created on disk. This is the environment variables file, and it is filled with default values.

The last step in the setup is to add a MAPBOX_ACCESS_TOKEN to env.config.js in order to access mapbox API for development.


Remove dependencies, uninstalling everything

This will remove packages from node_modules and uninstall the prerequisites.

./scripts/cleanup.sh


Tasks

Build contracts and JSON ABIs

./scripts/aztec/compile.sh

or

bun aztec:build

Start aztec-sandbox

./scripts/aztec/start.sh

or

bun aztec:start

Start backend server

./scripts/backend/start.sh

or

bun backend:start

Start frontend server

./scripts/webpack/start.sh

or

bun webpack:start

Running tests

Backend server can be shutdown, as it isn't required for testing.

These tests can take a long time (>5 mins) to complete.
The list can be filtered by editing the test.sh file.

./scripts/test.sh

or

bun run test



Project Organization


  • .env - Environment management

  • .ssh - SSH-related scripting

  • .ssl - SSL Certificate management

  • aztec - Aztec Sandbox management and contract compilation

  • backend - Backend management and deployment

  • docker - Docker management (required for Aztec Sandbox)

  • git - GIT hooks and scripting

  • packages - Package update management

  • prerequisites - Individual installation scripts for all prerequisites

  • tailwind - Tailwind management (required for frontend)

  • webpack - Frontend management and deployment



  • endpoints - HTTP endpoints

  • stores - Server runtime data

  • types - Server-only types

  • utils - helpers, managers, converters, globals



tests - Bun tests



Contributing

Get in touch with the owners via Noir Discord to be added as a collaborator.

Use the hashtag froglin.

About

Collect and trade location-based game built on Aztec's Zero-Knowledge blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published