Skip to content

Latest commit

 

History

History
133 lines (97 loc) · 3.94 KB

File metadata and controls

133 lines (97 loc) · 3.94 KB

Contributing to IntentLP

Thank you for your interest in contributing to IntentLP! This is a Uniswap v4 hook project built for the Atrium Academy UHI9 Hookathon, and we welcome all forms of contribution — from bug reports to feature implementations.

Table of Contents


Code of Conduct

By participating in this project, you agree to maintain a respectful and inclusive environment. Be kind, be constructive, and assume good faith.

Getting Started

Prerequisites

  • Foundry — Solidity build & test framework
  • Node.js 18+ — for the frontend
  • A wallet with testnet ETH (Arbitrum Sepolia recommended)

Local Setup

# Clone the repo
git clone https://github.com/Mosss-OS/IntentLP.git
cd IntentLP

# Install Solidity dependencies
make install

# Build contracts
make build

# Run tests
make test-v

# Frontend setup
cd frontend
npm install
npm run dev

Development Workflow

  1. Fork the repo and create a feature branch from main
  2. Make your changes following the style guide below
  3. Run tests — make sure all existing tests pass
  4. Write tests for new functionality
  5. Run forge fmt before committing
  6. Open a pull request with a clear description

Project Structure

intent-lp-hook/
├── src/                          # Smart contracts
│   ├── IntentLPHook.sol          # Core hook contract
│   └── IntentLPHookFactory.sol   # CREATE2 factory
├── test/                         # Test files
│   ├── IntentLPHook.t.sol        # Unit tests + fuzz
│   └── IntentLPHookIntegration.t.sol  # Integration tests
├── script/                       # Deploy scripts
├── frontend/                     # React + Vite UI
├── subgraph/                     # Graph Protocol indexer
└── broadcast/                    # Deployment receipts

Pull Request Guidelines

  • Title should be clear and descriptive (e.g., "Add time-weighting to penalty fee calculation")
  • Description should explain the problem, solution, and any breaking changes
  • Tests must be included for new features
  • Format with forge fmt before committing
  • One feature per PR — keep changes focused

PR Checklist

  • Code follows project style
  • Tests pass (make test-v)
  • forge fmt has been run
  • New tests cover the change
  • Gas impact has been considered
  • Documentation updated (if applicable)

Bug Reports

Open an issue using the Bug Report template. Include:

  • A clear description of the bug
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment (chain, block number, testnet/mainnet)
  • Relevant logs or error messages

Feature Requests

Open an issue using the Feature Request template. Include:

  • The problem you're trying to solve
  • Proposed solution
  • Alternative approaches considered
  • Any relevant context or references

Style Guide

Solidity

  • Target Solidity 0.8.26
  • Use NatSpec comments for all public/external functions
  • Follow existing naming conventions (camelCase for functions, _prefix for internal)
  • Use immutable variables where possible
  • Keep functions focused and small

TypeScript / React

  • Use TypeScript strict mode
  • Functional components with hooks
  • Inline styles consistent with the existing design system
  • Use existing utility classes from index.css

License

By contributing, you agree that your contributions will be licensed under the MIT License.