This document describes the process of contributing to this project. It is intended for anyone considering opening an issue or pull request.
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.
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.
git clone https://github.com/flare-foundation/flare-stake-tool.git
cd flare-stake-tool
pnpm installTo compile TypeScript:
pnpm buildThis project uses ESLint and Prettier with the Flare shared configurations.
Lint all source files:
pnpm lint:checkLint and auto-fix:
pnpm lint:fixCheck formatting:
pnpm format:checkFormat all source files:
pnpm format:fixRun the test suite:
pnpm testRun with coverage report:
pnpm test:coverageIntegration tests spin up a local Flare network via docker-compose and exercise the CLI against real validators. They require Docker.
pnpm test:integrationNote
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.
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.