Contribution Guide · OnchainKit
Learn how to contribute to OnchainKit
Welcome to OnchainKit! So you want to contribute to this project? You came to the right place.
In this guide, you will learn how to:
Setup
Clone the repo
Install Node and pnpm
Use nvm, mise, n or your favorite version manager to install Node.js.
For pnpm, see the installation instructions on the pnpm website.
Install dependencies
From the root of the repository:
Codebase
This project is a monorepo managed with pnpm. The @coinbase/onchainkit
package is located in:
Here is a rough layout of the codebase:
Workflows
Development
To work on OnchainKit components with live UI feedback:
This will build the OnchainKit package in watch mode, and start a development environment (the playground) where you can see your components in action.
As you make changes, the playground will update automatically.
Navigate to http://localhost:3000 to open the playground.
Building
To build the package:
Testing
Write and update existing unit tests. You can run tests with:
For watching file changes and rerunning tests automatically:
We expect 100% code coverage for any updates. You can get coverage information with:
If the coverage drops below 100%, look at the coverage report generated by the above command with:
Updating changelog
To update the change log, run:
Select minor
and use the following format for the summary:
Possible values are:
feat
fix
docs
chore
Feature request
Have a component in mind that we are not supporting yet? You can submit a feature request to our Github. Create a “New issue” and label it “Feature Request: …”.