Intermediate-level examples demonstrating common patterns and real-world use cases for developers who have mastered the Soroban basics.
Patterns for securing contracts and managing permissions.
- Multi-Sig Patterns - Threshold signatures and multi-party authorization.
- Planned: Role-Based Access Control (RBAC), Timelocks, Admin management.
Working with fungible and non-fungible tokens.
- Planned: Custom token implementation, Token wrappers, Multi-token handling.
How contracts interact with each other.
- Planned: Contract Factory, Proxy patterns, Registry discovery.
Efficient ways to store and manage data on-chain.
- Planned: Iterable mappings, Queues, Priority queues, Linked lists.
- Custom Token - Create a custom token with minting and burning.
- Token Wrapper - Wrap existing tokens with additional functionality.
- Contract Factory - Deploy contracts from within a contract.
- Proxy Pattern - Upgradeable contract pattern.
- Registry - Central registry for contract discovery.
- Role-Based Access - Implement RBAC (Role-Based Access Control).
- Iterables - Implement iterable mappings.
Before diving into intermediate examples, ensure you understand:
- Basic Examples - Core Soroban concepts.
- Rust ownership and borrowing.
- Basic blockchain concepts (addresses, signatures, transactions).
# Navigate to an example
cd examples/intermediate/multi-sig-patterns
# Run tests
cargo test
# Build the contract
cargo build --target wasm32-unknown-unknown --release- Start with Access Control to understand security patterns.
- Explore Token Interactions for asset handling.
- Master Cross-Contract Patterns for complex architectures.
- Study Data Structures for efficient storage patterns.