OpenZeppelin is bringing its trusted smart contracts libraries and developer workflows to Stellar, a Rust-based blockchain. Developers can build payments, stablecoins, and DeFi apps on Stellar using familiar, audited building blocks. To see more, go to: https://www.openzeppelin.com/networks/stellar.For latest OpenZeppelin developer docs, please visit: https://docs.openzeppelin.com/stellar-contracts.
Getting started with Contract Wizard
OpenZeppelin’s Contract Wizard includes support for Stellar’s Rust-based smart contracts, making it easier for developers to generate and deploy secure, audited contracts. After you have selected your desired template and options you can download it as a single file, a Rust development package, or a Scaffold Stellar Package. Try it out below or visit the wizard here.
For a walkthrough on using these contracts check out the video linked below!
OpenZeppelin Stellar Contracts and Utilities
OpenZeppelin Stellar Contracts is a collection of audited contracts and utilities for Stellar. The contracts are developed by OpenZeppelin in collaboration with the Stellar community and the Stellar Development Foundation (SDF), in an effort to bring a library of high-quality and audited contracts that can be used to build applications on the Stellar network.Audited Modules Available
Fungible Token- Extensions:
- Burnable: Allow token holders to destroy their tokens
- Capped: Set maximum supply limits
- Allowlist: Restrict transfers to approved addresses
- Blocklist: Prevent transfers from/to blocked addresses
- Extensions:
- Burnable: Allow token holders to destroy their NFTs
- Enumerable: Enable iteration over all tokens and owner tokens
- Consecutive: Efficiently mint multiple tokens in batches
- Royalties: Support for creator royalties on secondary sales
- Extensions:
- Burnable: Allow token holders to destroy their tokens
- Capped: Set maximum supply limits
- Allowlist: Restrict transfers to approved addresses
- Blocklist: Prevent transfers from/to blocked addresses
- Features:
- Identity Management: Integration with identity registries for KYC/AML compliance
- Compliance Framework: Modular compliance rules and validation for transfers and minting
- Transfer Controls: Sophisticated transfer restrictions and validations
- Freezing Mechanisms: Address-level and partial token freezing capabilities
- Recovery System: Lost/old account recovery for verified investors
- Pausable Operations: Emergency pause functionality for the entire token
- Role-Based Access Control (RBAC): Flexible privilege management for administrative functions
stellar-confidential, released in v0.8.0) wraps an existing SEP-41 token and adds private balances and transfer amounts. Users deposit the underlying token, transfer it confidentially, and withdraw it. Standard SEP-41 clients cannot call the contract directly, because it exposes confidential_balance and confidential_transfer instead of balance and transfer. Balances are Pedersen commitments, and the contract verifies an UltraHonk proof onchain for every operation that spends private state. Sender and recipient addresses stay public. Auditors decrypt amounts with registered auditor keys, and an optional compliance extension adds freezing, an external authorization policy (such as an allowlist), and clawback. Proofs are not yet zero-knowledge. See Confidential Tokens for resources and current limitations.
Smart Accounts
Smart Accounts are contract based wallets made for flexible and programmable authorization. This framework takes a context-centric approach, separating three distinct concerns: who is allowed to sign (signers), what they are allowed to do (scope/context rules), and how those permissions are enforced (policies). The initial release includes policies for multisig and spending limits.
- Components:
- Context rules: Routing table for authorization
- Signers: List of authorized signers (delegated address, or external signers)
- Policies: Enforcement module attached to context rules
- Verifiers: Trust contracts that validate signatures on behalf of smart accounts
- Pausable and Upgradeable Utilities
- Role-based and Ownable Access Control
- Merkle Distributor
- Fixed point math (WAD)
- Time lock
- Governor
OpenZeppelin Open Source Tools
- Relayer: Infrastructure for relaying transactions on Stellar.
- Monitor: Infrastructure tool for monitoring blockchain events and transactions.
- UI Builder: Open source tool for creating UI forms for contracts.
- MCP Server: Generate secure Stellar smart contracts based on OpenZeppelin templates.
- Role Manager: Access control management interface for smart contracts. Visualize roles, permissions, and execute administrative actions.
- Soroban Security Detector SDK: Spot issues in contracts before they reach mainnet. This SDK enables developers to build custom static-analysis scanners and comes with prebuilt checks to catch common pitfalls early.