Rethinking Smart Contract Development
Forget traditional smart contract design patterns. Compose takes a radically different approach with Smart Contract Oriented Programming.
We focus on building small, independent, and easy-to-understand smart contracts called facets. Each facet is designed to be deployed once, then reused and composed seamlessly with others to form complete smart contract systems.
Read First
Code written to be understood first, not just executed. Every facet is self-contained and readable top-to-bottom.
Diamond-Native
Built specifically for ERC-2535 Diamonds. Deploy facets once, reuse them across multiple diamonds onchain.
Composition Over Inheritance
Combine deployed facets instead of inheriting contracts. Build systems from simple, reusable pieces.
Intentional Simplicity
Smart Contract Oriented Programming (SCOP) - designed specifically for smart contracts, not general software.
Onchain Standard Library
(In the future) Access verified, audited facets deployed on multiple blockchains.
Community-Driven
Built with love by the community. Join us in creating the standard library for ERC-2535 Diamonds.
Facets and Libraries Working Together
Both facets and libraries access the same storage in your diamond. Your custom facets can extend Compose functionality without inheritance.
Facets
Complete, reusable implementations
Libraries
Helper functions for custom facets
Shared Storage
Both work with the same data
// Your custom facet uses LibERC721
import {LibERC721} from "compose/LibERC721.sol";
contract GameNFTFacet {
function mintWithGameLogic(
address player,
uint256 tokenId
) external {
// Your custom game logic
require(
playerHasEnoughPoints(player),
"Not enough points"
);
// Use LibERC721 - same storage!
LibERC721.mint(player, tokenId);
// Standard ERC721Facet functions
// work seamlessly
updatePlayerStats(player);
}
}Ready to build with Compose?
Start creating modular, maintainable smart contracts with our comprehensive documentation.