This repository contains the on-chain smart contracts for Access Layer on Stellar using Soroban.
These contracts hold the trust-sensitive marketplace rules. The goal is to keep pricing, ownership, and fee logic on-chain while leaving general application features to the server and client.
The contracts layer is responsible for:
- registering creators on-chain
- minting and burning creator keys
- enforcing bonding curve pricing
- handling buy and sell execution
- distributing creator and protocol fees
- exposing ownership and supply state to the app
- Rust
- Soroban SDK
- Stellar
- Cargo.toml: Rust workspace configuration
- creator-keys: first Soroban contract crate
The initial creator-keys contract is only a starting point. It currently supports:
- simple creator registration
- a basic purchase action that increments creator supply
- reading stored creator data
For first-time local setup, install the required Soroban tooling with docs/local-soroban-prerequisites.md.
Before running the full contract test suite locally, ensure you have:
- Rust (stable toolchain)
- Cargo
- rustfmt component
- Clippy component
- Soroban tooling as described in
docs/local-soroban-prerequisites.md
Install the required Rust components:
rustup component add rustfmt clippyVerify that all code is properly formatted:
cargo fmt --all -- --checkOr using the Makefile:
make fmt-checkRun Clippy with warnings treated as errors:
cargo clippy --workspace --all-targets -- -D warningsOr:
make clippyRun the full workspace test suite:
cargo test --workspaceOr:
make testRun the same checks executed by CI:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceNo additional environment variables are currently required to run the contract verification suite locally. If future contract tests require local configuration, those requirements will be documented alongside the affected tests.
For contributor test deployments and release checks, use the guide in docs/stellar-testnet-deployment.md. Store and name release wasm files using docs/deploy-artifacts.md. For client and server integration expectations (read methods, events, version bumps), see docs/contract-consumer-boundaries.md. For detailed return value semantics of every read-only entrypoint (units, precision, edge-case outputs), see docs/read-only-methods.md. For contract event naming conventions and topic format, see docs/contract-event-conventions.md. For quote-related storage key behavior and invariants, see docs/quote-storage-keys.md. For caller restrictions and the authorization model for each public function, see docs/authorization-model.md. For the bonding curve formula, fee application, and worked price examples, see docs/bonding-curve-formula.md.
- Read CONTRIBUTING.md before starting work.
- Browse the maintainer issue inventory in docs/open-source/issue-backlog.md.
- Review SECURITY.md before reporting vulnerabilities.
- Use the issue templates in
.github/ISSUE_TEMPLATEfor new scoped work.