Skip to content

Files

Latest commit

1bfdff8 · Sep 4, 2024

History

History

backend

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 21, 2022
Sep 16, 2022
Sep 4, 2024
Sep 26, 2022
Jun 16, 2022
Mar 28, 2023
Jun 16, 2022
Jun 21, 2022
Feb 27, 2023
Jun 6, 2023
Feb 14, 2024
Apr 19, 2024
Apr 19, 2024
Sep 4, 2024
Nov 15, 2023
Apr 19, 2024

Merkle drop framework backend

The backend worker for fetching rewards data and computing merkle data to publish to github.

NOTE: currently it's not generalized and it's set up for the Optimism fee refund rewards.

Install

npm install @hop-protocol/mdf

Docker image

docker pull hopprotocol/merkle-drop-framework:latest

Development

Environment variables

REWARDS_CONTRACT_ADDRESS=
TOKEN_ADDRESS=
REWARDS_DATA_GIT_URL=
REWARDS_DATA_OUTPUT_GIT_URL=
DATA_REPO_PATH=/tmp/rewards-data
OUTPUT_REPO_PATH=/tmp/rewards-output
OUTPUT_MERKLE_PATH=/tmp/merkle-output
PRIVATE_KEY=

Start worker

npm run start:worker

Instructions to run discourse locally with Docker, for testing discourse auto-post:

To generate api key:

Preferences -> Admin -> Manage Keys -> New API Key

Github Actions

Run github action build locally with act:

(cd ../../ && act --workflows .github/workflows/build.yml)