First off, thank you for considering contributing to Arca! It's people like you that make Arca such a great tool for the Web3 community.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to support@arca.network.
Positive behaviors include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Unacceptable behaviors include:
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate
Before creating bug reports, please check the existing issues to avoid duplicates. When creating a bug report, include as many details as possible:
Bug Report Template:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Environment:**
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari]
- Node version: [e.g. 18.17.0]
- Network: [e.g. Arc Testnet, Base Sepolia]
**Additional context**
Add any other context about the problem here.Enhancement suggestions are tracked as GitHub issues. When creating an enhancement suggestion, include:
- Clear and descriptive title
- Step-by-step description of the suggested enhancement
- Explain why this enhancement would be useful to most users
- List any alternatives you've considered
- Fork the repo and create your branch from
main - Make your changes with clear, descriptive commits
- Test your changes thoroughly
- Update documentation if needed
- Submit a pull request
PR Title Format:
<type>(<scope>): <subject>
Examples:
feat(contracts): add subscription pause mechanism
fix(api): resolve CORS issue on /api/v1/status
docs(readme): update deployment instructions
chore(deps): upgrade ethers to v6.16.0
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
- Node.js 18+ and pnpm
- MongoDB (local or Atlas)
- Circle API key
- Privy App ID
- Git
# Clone your fork
git clone https://github.com/YOUR_USERNAME/autopay.git
cd autopay
# Install dependencies for all components
cd Arc_contracts && pnpm install && cd ..
cd circle-wallets && pnpm install && cd ..
cd indexer && pnpm install && cd ..
# Set up environment variables
cd circle-wallets
cp .env.example .env.local
# Edit .env.local with your credentials
# Start development server
pnpm dev# Smart contract tests
cd Arc_contracts
pnpm hardhat test
pnpm hardhat coverage
# Subgraph tests
cd indexer
graph test
# Frontend tests (if available)
cd circle-wallets
pnpm test- Use TypeScript for all new code
- ESLint + Prettier for formatting (run
pnpm lint) - Strict mode enabled
- Explicit types (avoid
any) - Async/await over promises
- Named exports preferred over default exports
Example:
// Good ✅
export async function fetchPlan(planId: string): Promise<Plan> {
const response = await fetch(`/api/plans/${planId}`);
return response.json();
}
// Bad ❌
export default async function fetchPlan(planId) {
return fetch(`/api/plans/${planId}`).then(r => r.json());
}- Follow OpenZeppelin conventions
- NatSpec comments for all public/external functions
- Use SafeERC20 for token transfers
- Checks-Effects-Interactions pattern
- Gas optimization where reasonable
- No assembly without strong justification
Example:
/**
* @notice Subscribe to a plan
* @param planId The plan identifier
* @param buyerData JSON metadata about the buyer
*/
function subscribe(bytes32 planId, string calldata buyerData) external {
Plan storage plan = plans[planId];
require(plan.active, "Plan is inactive");
// ... implementation
}- Conventional Commits format
- Present tense ("Add feature" not "Added feature")
- Imperative mood ("Move cursor to..." not "Moves cursor to...")
- Descriptive but concise
Good commit messages:
feat(api): add subscription renewal endpoint
fix(contracts): prevent reentrancy in subscribe()
docs(integration): add webhook examples
test(subgraph): add plan creation tests
Bad commit messages:
Update stuff
Fix bug
WIP
asdfasdf
autopay/
├── Arc_contracts/ # Smart contracts
│ ├── contracts/ # Solidity contracts
│ ├── ignition/ # Deployment scripts
│ └── test/ # Contract tests
│
├── circle-wallets/ # Next.js frontend
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ ├── lib/ # Utilities and helpers
│ └── public/ # Static assets
│
├── indexer/ # The Graph subgraph
│ ├── src/ # Subgraph mappings
│ ├── schema.graphql # GraphQL schema
│ └── subgraph.yaml # Subgraph config
│
└── docs/ # Documentation
- Smart Contracts: Minimum 80% coverage
- API Routes: Test all endpoints
- Critical Paths: 100% coverage for payment flows
describe('SubscriptionGateway', () => {
describe('createPlan', () => {
it('should create a plan with valid parameters', async () => {
// Arrange
const price = ethers.parseUnits('10', 6);
const duration = 30 * 24 * 60 * 60;
// Act
const tx = await contract.createPlan(price, duration, 'QmHash');
// Assert
expect(tx).to.emit(contract, 'PlanCreated');
});
it('should revert with zero price', async () => {
await expect(
contract.createPlan(0, 3600, 'QmHash')
).to.be.revertedWith('Price must be > 0');
});
});
});When adding new features:
- Update README.md if it affects user-facing behavior
- Add inline comments for complex logic
- Write NatSpec for smart contract functions
- Update API docs for new endpoints
- Add examples in the integration guide
All submissions require review before merging:
- Automated checks must pass (linting, tests, build)
- At least one approval from maintainers
- Responsive to feedback within 3 days
- Squash commits before merging (we'll do this)
- ✅ Code follows style guidelines
- ✅ Tests are included and passing
- ✅ Documentation is updated
- ✅ No breaking changes (or clearly documented)
- ✅ Security considerations addressed
- ✅ Performance implications considered
We especially welcome contributions in:
- 🐛 Bug Fixes: Check issues labeled "bug"
- 📚 Documentation: Improve clarity, add examples
- 🧪 Tests: Increase coverage, add edge cases
- 🌐 Internationalization: Add support for more languages
- ♿ Accessibility: Improve WCAG compliance
- 🎨 UI/UX: Design improvements, mobile optimization
- ⚡ Performance: Optimize gas usage, reduce bundle size
Good First Issues: Look for issues tagged good first issue
We use Semantic Versioning:
- MAJOR: Incompatible API changes
- MINOR: Backwards-compatible functionality
- PATCH: Backwards-compatible bug fixes
- GitHub Issues: Bug reports, feature requests
- GitHub Discussions: Questions, ideas, general discussion
- Discord: Real-time chat (link in README)
- Twitter: Updates and announcements
Contributors are recognized in:
- README.md Contributors section
- Release notes for significant contributions
- Hall of Fame on our website (coming soon)
By contributing, you agree that your contributions will be licensed under the same MIT License that covers the project.
Thank you for contributing to Arca! Every contribution, no matter how small, is valuable. 💙
Questions? Reach out to us at support@arca.network or join our Discord.