Thank you for your interest in contributing to EVMAuth! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Reporting Issues
- Development Workflow
- Commit Messages
- Pull Requests
- Getting Started
- Running Tests
- Coverage Reports
- Documentation
- ABI & Bytecode
- Additional Resources
- Questions?
- License
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: opensource@radiustech.xyz.
We use GitHub issues to track bugs, feature requests, and documentation improvements.
Please use our issue templates when creating a new issue:
- Bug Report: Use this template for reporting bugs or unexpected behavior
- Feature Request: Use this template for suggesting new features or enhancements
- Documentation: Use this template for reporting issues with documentation
These structured templates help us gather the information we need to address your issue efficiently.
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/evmauth-core.git - Create a new branch:
git checkout -b my-feature - Make your changes
- Run
forge fmtandforge testto ensure code is formatted and tests pass - Push to your fork and submit a pull request
We use Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
Types:
feat:New featuresfix:Bug fixesdocs:Documentation onlystyle:Code style changesrefactor:Non-bug-fixing code changestest:Test updateschore:Build process updates
We have specialized templates for different types of contributions. When creating a pull request, choose the template that best fits your contribution:
- Default Template: For general changes
- Feature Template: For adding new features
- Bugfix Template: For bug fixes
- Documentation Template: For documentation updates
You can select a specific template by adding ?template=template_name.md to your PR creation URL. For example:
https://github.com/radiustech/evmauth-core/compare/main...your-branch?template=feature.md
All pull requests should include:
- Clear title following conventional commits
- Detailed description of changes
- Reference related issues
- Update documentation
- Add tests
- Update CHANGELOG.md
- Ensure CI checks pass
- Clone the repository:
git clone git@github.com:evmauth/evmauth-core.git- Navigate to the project directory:
cd evmauth-core- Install the dependencies:
forge install foundry-rs/forge-std
forge install OpenZeppelin/openzeppelin-contracts-upgradeable
forge install OpenZeppelin/openzeppelin-foundry-upgradesIt is highly recommended that you run the formatter, clear the cache, recompile the contracts, then run tests with detailed output (i.e. execution traces for all tests + setup traces for failing tests):
forge fmt && forge test --force -vvvTo just run all tests, simply use:
forge testAdd the --force flag to clear the cache and recompile the contracts first:
forge test --forceTo run tests with detailed output, use the -vv, -vvv, -vvvv, or -vvvvv flag:
# Print logs for all tests.
forge test -vv
# Print execution traces for failing tests.
forge test -vvv
# Print execution traces for all tests, and setup traces for failing tests.
forge test -vvvv
# Print execution and setup traces for all tests, including storage changes.
forge test -vvvvvTo run all tests in a specific file, use the --match-path option:
forge test --match-path test/EVMAuth6909.t.solTo run any test function with a specific name, use the --match-test option:
forge test --match-test test_initializeMore options can be found in the Forge Docs.
To generate a coverage report, use:
forge coverageYou can use the same flags as in the test command to customize the coverage report.
More options can be found in the Forge Docs.
To generate the documentation site, use:
forge doc --serve --openThis will create a docs directory with the generated documentation and open it in your default web browser.
To watch for changes and automatically regenerate the documentation, use the --watch (or -w) option:
forge doc -w -s --openTo include external libraries in the documentation, use the --include (or -i) option:
forge doc -i -s --openMore options can be found in the Forge Docs.
To generate the full ABI for a contract, use:
forge inspect src/EVMAuth1155.sol:EVMAuth1155 abi --json > src/EVMAuth1155.abi
forge inspect src/EVMAuth6909.sol:EVMAuth6909 abi --json > src/EVMAuth6909.abiTo generate bytecode for a contract, use:
forge inspect src/EVMAuth1155.sol:EVMAuth1155 bytecode > src/EVMAuth1155.bin
forge inspect src/EVMAuth6909.sol:EVMAuth6909 bytecode > src/EVMAuth6909.binMore options can be found in the Forge Docs.
- Intro to Smart Contracts
- Solidity Docs
- Forge Docs
- Forge Tests
- OpenZeppelin Upgrades
- OpenZeppelin Foundry Upgrades
If you have questions:
- Check existing issues
- Create a new issue with
questionlabel - Ask in your PR if you're working on code
Thank you for your contributions!
The EVMAuth smart contract is released under the MIT License. See the LICENSE file for details.