/competitions

On-chain competition framework for Lens Protocol

Primary LanguageSolidityMIT LicenseMIT

LensCompetitions 🌱

On-chain competition framework for Lens Protocol

Getting Started

This project uses Foundry.

  1. Clone and run cp .env.example .env.
  2. In a terminal, run:
forge install
forge test

Deploy to Anvil

  1. In one terminal run:
./script/node.sh
  1. In another terminal run:
forge script LocalScript --fork-url local --broadcast
  1. The addresses of the deployed contracts are printed at the start of the log outputs.

ABIs

Provided the memester frontend is in ../frontend relative to this repo, you can use the below script to update all ABIs:

./script/abis.sh

Recommendation

We recommend installing the accompanying pre-commit hook to automatically run forge fmt and forge snapshot on commit:

cp hooks/pre-commit .git/hooks/pre-commit

Usage

This powers the on-chain meme competitions for https://memester.xyz but has been built to be as extensible as possible for other Lens applications.