Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 3.51 KB

File metadata and controls

105 lines (73 loc) · 3.51 KB

Contributing

Feel free to dive in! Open an issue, start a discussion or submit a PR. For any informal concerns or feedback, please join our Discord server.

Contributions are welcome by anyone interested in writing more tests, improving readability, optimizing for gas efficiency, or extending the protocol via new features.

Prerequisites

  • Node.js (v20+)
  • Just (command runner)
  • Bun (package manager)
  • Ni (package manager resolver)
  • Foundry (EVM development framework)
  • Rust (Rust compiler)
  • Bulloak (CLI for checking tests)

In addition, familiarity with Solidity is requisite.

Set Up

Clone this repository:

git clone git@github.com:sablier-labs/lockup.git sablier-lockup && cd sablier-lockup

To install Node.js dependencies:

bun install

Then, execute the one-time setup script:

just setup

To build the contracts:

just build

Switch to the staging branch, where all development work should be done:

git switch staging

Now you can start making changes.

To see a list of all available scripts, run this command:

just --list

Pull Requests

When making a pull request, ensure that:

  • The base development branch is staging.
  • All tests pass.
  • Concrete tests are generated using Bulloak and the Branching Tree Technique (BTT).
    • You can learn more about this on the Bulloak website.
    • If you modify a test tree, use this command to generate the corresponding test contract that complies with BTT: bulloak scaffold -wf /path/to/file.tree
  • Code coverage remains the same or greater.
  • All new code adheres to the style guide:
    • All lint checks pass.
    • Code is thoroughly commented with NatSpec where relevant.
  • If making a change to the contracts:
    • Gas snapshots are provided and demonstrate an improvement (or an acceptable deficit given other improvements).
    • Reference contracts are modified correspondingly if relevant.
    • New tests are included for all new features or code paths.
  • A descriptive summary of the PR has been provided.

Environment Variables

Local setup

To build locally, follow the .env.example file to create a .env file at the root of the repo and populate it with the appropriate environment values. You need to provide your mnemonic phrase and a few API keys.

Deployment

To make CI work in your pull request, ensure that the necessary environment variables are configured in your forked repository's secrets. Please add the following variable in your GitHub Secrets:

  • MAINNET_RPC_URL
  • ROUTEMESH_API_KEY

Integration with VSCode

The following VSCode extensions are not required but are recommended for a better development experience: