Skip to main content
Active Facet
...

Build the future of
Smart Contracts

Compose provides the standard facet library for building modular, diamond-based smart contract systems

Shared Storage Architecture

Facets and Modules Working Together

Both facets and modules access the same storage in your diamond. Your custom facets can extend Compose functionality without inheritance.

GameNFTFacet.sol
// Your custom facet uses the ERC721 module
import { ERC721Mod } from "compose/ERC721Mod.sol";

contract GameNFTFacet {
function mintWithGameLogic(
address player,
uint256 tokenId
) external {
// Your custom game logic
require(
playerHasEnoughPoints(player),
"Not enough points"
);

// Use ERC721Mod - same storage
ERC721Mod.mint(player, tokenId);

// Standard ERC721Facet functions work seamlessly
updatePlayerStats(player);
}
}

Ready to build with Compose?

Install Compose and put together a diamond-based system you can grow one facet at a time.

  • MITOpen Source
  • ERC-2535Diamond Standard
  • 17+Contributors
  • CommunityBuilt with Love

Newsletter

Get notified about releases, feature announcements, and technical deep-dives on building smart contracts with Compose.

No spam. Unsubscribe anytime.