OpenZeppelin Stellar Contracts
To bring battle-tested smart contracts to the Stellar developer community, OpenZeppelin is actively contributing towards a library of smart contracts and extensions, as well as developer tooling.
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
Non-Fungible Token
- 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
Stablecoin 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
Utilities
- Pausable and Upgradeable Utilities
- Role-based and Ownable Access Control
- Merkle Distributor
Coming Soon
- Security Token (ERC-3643)
- Multisig
- Passkey signer
- Token Vault (ERC-4626)
These implementations are being released over time, ensuring that Stellar developers have access to extensible contract options. All contracts and extensions are audited by OpenZeppelin's security team, enhancing security and reliability of the contracts and extensions. To use the library, please go to: https://github.com/OpenZeppelin/stellar-contracts.
Repository Structure
│── audits/ # Audit reports
│── docs/ # Documentation
│── examples/ # Example contracts
│── packages/
│ ├── tokens/ # Various token types (fungible, non-fungible, etc.)
│ ├── contract-utils/ # Utilities for token types (pausable, upgradable, etc.)
│ ├── constants/ # Shared constants
│ ├── test-utils/ # Utilities for tests
To provide feedback, please open issues here: https://github.com/OpenZeppelin/stellar-contracts/issues
Docs for OpenZeppelin Stellar Contracts
For additional docs on Stellar smart contracts by OpenZeppelin, please visit: https://docs.openzeppelin.com/stellar-contracts.