First off, thank you for considering contributing to Carbon Protocol V3! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you find a bug, please open an issue using the bug report template. Be sure to include a clear title and description, as much relevant information as possible, and a code sample or screenshot if applicable.
If you have an idea for a new feature, please submit a feature request using the feature request template. Include a clear and concise description of the feature, why it would be useful, and any additional context. You can also contact us through Discord or Telegram to discuss about it.
- Choose an issue: Pick an unassigned issue and ask for more information if needed via Telegram or Discord.
- Fork the repository: Click the "Fork" button on the top right of the repository page and create a new branch dedicated to the issue.
- Code your changes: Implement your feature or fix the bug. Follow the project's coding style and commit message principles.
- Test your changes: Ensure that all tests pass and your changes do not break existing functionality.
- Submit your changes: Push your changes and open a new pull request with a clear description of your changes and link to any relevant issues.
- Scarb: v2.5.4
- Starknet Foundry v0.18.0
We recommend installing dependencies using asdf:
asdf plugin add scarb
asdf install scarb 2.5.4
asdf plugin add starknet-foundry
asdf install starknet-foundry 0.18.0
To compile the project, run:
scarb build
To format the code, run:
scarb fmt
To run tests (using Starknet-Foundry), use:
scarb test
To run a specific test:
scarb test <name_of_the_test>
- All tests should be placed in the
tests/
folder. - Tests should be organized according to the tested file and function.
- Refer to existing tests for coding style and structure.
- Use utility functions from
tests/tests_lib.cairo
to set up your tests and avoid redundancy (especiallydefault_setup_and_deploy
andbuy_utils
).
By contributing to Carbon Protocol V3, you agree that your contributions will be licensed under the License used.
Thank you for your interest in contributing to Carbon Protocol V3! We look forward to building something great together.