Thank you for your interest in contributing! Whether you're fixing bugs, improving documentation, or adding new smart contract we appreciate your effort.
This guide will help you get started quickly.
Before you begin, make sure you have the following installed:
- Rust Install via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Install the stellar-CLI
Install with Homebrew (macOS, Linux):
brew install stellar-cliInstall with cargo from source:
cargo install --locked stellar-cli@23.0.0- for the windows it is available via Stellar installation for windows
- From the root of the project, run the following command:
cargo buildThis compiles the contract using the top-level workspace configuration.
- To run contract tests, use the following command:
cargo testThe project includes property-based fuzz tests for critical paths (invoice creation, bid placement, and settlement). These tests use proptest to generate many random inputs and verify that:
- No panics occur
- State remains consistent
- Invalid inputs are properly rejected
Note: Fuzz tests are behind a feature flag to avoid interfering with CI/CD.
To run fuzz tests:
# Run all fuzz tests (with feature flag)
cargo test --features fuzz-tests fuzz_
# Run only fuzz tests with more iterations
PROPTEST_CASES=1000 cargo test --features fuzz-tests fuzz_
# Run specific fuzz test
cargo test --features fuzz-tests fuzz_store_invoice_valid_rangesFuzz test coverage:
fuzz_store_invoice_*: Tests invoice creation with various amounts, due dates, and description lengthsfuzz_place_bid_*: Tests bid placement with different amounts and expected returnsfuzz_settle_invoice_*: Tests settlement with various payment amounts
Security notes:
- Fuzz tests validate input ranges and boundary conditions
- All critical math operations are tested for overflow/underflow
- State consistency is verified after each operation
- Invalid inputs must return errors, never panic
- Fork the repository on GitHub and clone it locally:
git clone https://github.com/your-username/quicklendx-contracts.git
cd quicklendx-contracts- Create a new branch for your changes:
git checkout -b feature/your-feature-name-
Make your changes in the appropriate contract directory under you are assigned to.
-
Build the contract:
cargo build- Run the contract tests:
cargo test- Commit your changes and push to your fork:
git add .
git commit -m "Add your commit message"
git push origin feature/your-feature-name- Open a Pull Request to the main branch of this repository via Github.
if you encounter a bug or have an idea for improvement,feel free to open an issue and describe it. Contributions are welcome!