Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 2.56 KB

CONTRIBUTING.md

File metadata and controls

74 lines (45 loc) · 2.56 KB

gm.

Thanks for your interest in contributing to wagmi! Please take a moment to review this document before submitting a pull request.

If you want to contribute, but aren't sure where to start, you can create a new discussion or reach out on Twitter.

Pull requests

Please ask first before starting work on any significant new features.

It's never a fun experience to have your pull request declined after investing a lot of time and effort into a new feature. To avoid this from happening, we request that contributors create a feature request to first discuss any significant new ideas. This includes things like adding new hooks, connectors, chains, etc.

Prerequisites

This project uses pnpm as a package manager.

Development playground

To play around with code while making changes, you can run the development playground:

pnpm install
pnpm dev:playground

The development playground code is located at examples/_dev. Make sure you clean up after yourself before pushing up any changes.

Coding standards

Our code formatting rules are defined in .eslintrc. You can check your code against these standards by running:

pnpm lint

To automatically fix any error in your code, you can run:

pnpm lint:fix

Running tests

wagmi runs it's test suite against a forked Ethereum network using Hardhat. To get started, add a ALCHEMY_ID to your environment variables. You can sign up for a free Alchemy account here.

Once you are set up, you can start the local Ethereum network and run tests in parallel:

pnpm test:ci

Or fire up two terminal sessions and run pnpm hardhat:dev in one and pnpm test:watch in the other. This will run tests interactively while developing.

Please ensure that the tests are passing when submitting a pull request. If you're adding new features to wagmi, please include tests.

Updating documentation

Documentation is crucial to helping developers of all experience levels use wagmi. To preview the docs site in development mode, run:

pnpm dev:docs

Not all contributions require updates to the docs. Also, feel free to update the docs if you think somemthing is unclear or could be explained better.

CI setup

The following secrets are required to run the GitHub Actions workflows:

ALCHEMY_ID
BUNDLEWATCH_GITHUB_TOKEN
NPM_TOKEN