Thank you for your interest in contributing to hypersdk! By contributing to hypersdk, you are helping to build the foundation for the next generation of blockchains and decentralized applications.
To contribute to hypersdk, you'll need:
- Go 1.23.7 or higher
On MacOS, a modern version of bash is required (e.g. via homebrew with brew install bash). The version installed by default is not compatible with HyperSDK's shell scripts.
An optional dev shell may be used to gain access to additional dependencies.
- Clone the repository:
git clone https://github.com/ava-labs/hypersdk.git
cd hypersdk- Install the dependencies:
go mod downloadThis will download and install all required dependencies for the project.
To build and run tests for the hypersdk, simply run:
./scripts/tests.unit.shThis will build and run all tests for the project.
To run the linters, simply run:
./scripts/lint.shThis will run the linters on all code in the project.
The hypersdk project also has a fixer that tries to help. To run the fixer, simply run:
./scripts/fix.lint.shSome activities, such as collecting metrics and logs from the nodes targeted by an e2e test run, require binary dependencies. One way of making these dependencies available is to use a nix shell which will give access to the dependencies expected by the test tooling:
- Install nix. The determinate systems installer is recommended.
- Use ./scripts/dev_shell.sh to start a nix shell
- Execute the dependency-requiring command (e.g.
./bin/ginkgo -v ./tests/e2e -- --start-collectors)
This repo also defines a .envrc file to configure devenv. With devenv
and nix installed, a shell at the root of the hypersdk repo will automatically start a nix dev
shell.
We welcome contributions to hypersdk! To contribute, please follow these steps:
-
Fork the repository and create a new branch for your contribution.
-
Make your changes, sign all of your commits, and ensure that all tests pass and linting is clean.
-
Write tests for any new features or bug fixes. (If necessary)
-
Submit a pull request with your changes.
When submitting a pull request, please ensure that:
-
Your code is formatted using
go fmt. -
Your code is properly tested.
-
Your code passes all linters.
-
Your pull request description explains the problem and solution clearly.