Skip to content

Latest commit

 

History

History
124 lines (86 loc) · 3.01 KB

File metadata and controls

124 lines (86 loc) · 3.01 KB

Contributing

This document describes the process of contributing to this project. It is intended for anyone considering opening an issue or pull request.

AI Assistance

Important

If you are using any kind of AI assistance to contribute to this project, it must be disclosed in the pull request.

If you are using any kind of AI assistance while contributing to this project, this must be disclosed in the pull request, along with the extent to which AI assistance was used. Trivial tab-completion doesn't need to be disclosed, as long as it is limited to single keywords or short phrases.

An example disclosure:

This PR was written primarily by Claude Code.

Or a more detailed disclosure:

I consulted ChatGPT to understand the codebase but the solution was fully authored manually by myself.

Quick start

If you'd like to contribute, report a bug, suggest a feature or you've implemented a feature you should open an issue or pull request.

Any contribution to the project is expected to contain code that is formatted, linted and that the existing tests still pass. Adding unit tests for new code is also welcome.

Tip

If you (or an AI agent) are about to make a non-trivial change, read AGENTS.md first. It documents project-specific conventions, the three signing paths, unit handling, pinned dependencies, and common gotchas. The behavioral spec for each command is in docs/COMMANDS.md.

Dev environment

git clone https://github.com/flare-foundation/flare-stake-tool.git
cd flare-stake-tool
pnpm install

To compile TypeScript:

pnpm build

Linting and formatting

This project uses ESLint and Prettier with the Flare shared configurations.

Lint all source files:

pnpm lint:check

Lint and auto-fix:

pnpm lint:fix

Check formatting:

pnpm format:check

Format all source files:

pnpm format:fix

Testing

Run the test suite:

pnpm test

Run with coverage report:

pnpm test:coverage

Integration tests

Integration tests spin up a local Flare network via docker-compose and exercise the CLI against real validators. They require Docker.

pnpm test:integration

Note

Integration tests are run locally only, not in CI. GitLab's shared runners use docker-in-docker, where docker-compose volume mounts (./local:/app/...) don't work because the docker daemon doesn't see the runner's filesystem. Run them on your machine before opening an MR for any change touching signing or RPC logic.

Release process

Releases are published to npm via GitLab CI when a semver git tag (e.g. v4.2.3) is pushed. The pipeline validates the tag format, checks that package.json version matches the tag, builds the project, and publishes to the npm registry using OIDC trusted publishers.