This repository contains Solidity smart contracts for creating campaigns and distributing rewards. The system is designed to be deployed on multiple chains, enabling users to create campaigns, manage cross-chain rewards, and claim them using Merkle proofs.
This project consists of two main contracts:
- CampaignCreator: Allows users to create campaigns with specific parameters such as reward tokens, amounts, and durations.
- Distributor: Manages the distribution of rewards to users based on Merkle proofs.
The system is designed to be chain-agnostic, enabling deployment and interaction across multiple blockchain networks.
Deploys the CampaignCreator contract.
forge script script/DeployCampaignCreator.sol --rpc-url <RPC_URL> --broadcast --verify -vvvvDeploys the Distributor contract on multiple chains.
forge script script/DeployDistributor.sol --rpc-url <RPC_URL> --broadcast --verify -vvvvCreates a new campaign using the CampaignCreator contract.
forge script script/CreateCampaignScript.sol --rpc-url <RPC_URL> --broadcast -vvvvUpdates the Merkle root in the Distributor contract.
forge script script/UpdateRootScript.sol --rpc-url <RPC_URL> --broadcast -vvvvAllows users to claim rewards from the Distributor contract.
forge script script/ClaimScript.sol --rpc-url <RPC_URL> --broadcast -vvvv