Thank you for your interest in contributing to our project! Before you submit a pull request, we kindly ask you to review this guide thoroughly.
First, fork and clone the repository onto your local machine. Once you have your local copy of the repository, you can commence with development. This typically involves installing the required dependencies and executing the tests.
After cloning the repository, navigate to its root directory and run the following command to install the necessary dependencies:
npm install
Features and bug fixes must be accompanied by tests, as this library aims to maintain 100% test coverage 🧪. Focus on testing only the public interfaces; avoid testing implementation details. To run the tests, you'll need a URL to an Ethereum RPC node. The easiest way to obtain one is by creating an API key through Alchemy. After obtaining the key, follow the instructions in the .env.example
file to get started.
Run the tests by running the following command:
npm test
Once you have made your changes and verified they work correctly, you can submit a pull request from your forked repository.
Before proposing changes, please open an issue or discussion for collaborative decision-making on solutions prior to submitting a pull request. This enhances the effectiveness of your contributions and promotes collective input.
- Open an issue: Start by opening an issue detailing the problem you want to solve or the feature you want to add.
- Fork and branch: Fork the repository and create a new branch on your fork to work on the changes.
- Add commits: Add new commits to your branch. Remember:
- Commits should be concise, descriptive, and well formatted.
- Commits should follow the Conventional Commits specification and use the standard headings.
- This repository maintains a linear git history, so merge commits are not allowed.
- Open a pull request: Open a new pull request on GitHub, and link it to the issue you created in the first step.
This repository employs Dependabot 🤖 to secure and update project dependencies by automatically initiating pull requests for package upgrades. The duty of project maintainers is to review, test, approve, and merge these Dependabot-generated pull requests.
Project maintainers are entrusted with the task of publishing new releases. Releases are automated with Google's release-please GitHub action. Simply put, to publish a release, you simply need to merge the release pull request (PR) 🚀.
The release-please GitHub action parses Conventional Commits to help automate the release process. It automatically generates a release PR, which is continuously updated as new commits are merged into the main branch. Once maintainers decide that it's time to publish a new release, they can merge the release PR.
Upon merging the release PR, the GitHub action initiates a series of tasks:
- Updates the
CHANGELOG.md
andpackage.json
files. - Tags the commit associated with the release with the version number.
- Creates a new GitHub release based on this tag.
- Publishes a new version of the package to npm.
This project follows Semantic Versioning 2.0 and the release tooling automatically parses the semantic version based on the Conventional Commits.