A minimalist on-chain referral tracking system.
- Demo referral link: https://genji-app.netlify.app/referral/0x3e50d7faf96b4294367cc3563b55cbd02bb4ce4d
- UI repo: https://github.com/w3hc/genji
This contract allows tracking referral relationships between addresses. Any address can register a referrer-referee relationship.
- Register referrer-referee relationships
- Track referral counts per address
- Query all referrals made by an address
- Get total registered users
# Install dependencies
bun install
# Compile
forge build
# Test
forge test
# Deploy locally
forge script script/Deploy.s.sol --broadcast --fork-url http://localhost:8545
Update your .env
file with your configuration:
cp .env.example .env
# Edit .env with your own keys
forge script script/Deploy.s.sol --rpc-url op_sepolia --private-key <YOUR_PRIVATE_KEY> --broadcast --verify
Example deployment to OP Sepolia: https://sepolia-optimism.etherscan.io/address/0x03917205bfef0692fae6e26dd87fcc7f96123af2#code
Feel free to reach out to Julien on Farcaster, Element, Status, Telegram, Twitter, Discord, or LinkedIn.
This project is licensed under the GNU General Public License v3.0.