Skip to main content
Active Facet
...

Infrastructure for evolving
onchain systems

A framework for modular, maintainable smart contracts.

Ship Extensions on Shared State

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

StablecoinMintFacet.sol
// Role-gated mint policy on shared ERC-20 storage
import { ERC20MintMod } from "compose/ERC20MintMod.sol";
import { AccessControlDataMod } from "compose/AccessControlDataMod.sol";
import { NonReentrancyMod } from "compose/NonReentrancyMod.sol";

contract StablecoinMintFacet {
function mint(
address recipient,
uint256 amount
) external {
// Only the MINTER_ROLE can mint
AccessControlDataMod.requireRole(
keccak256("MINTER_ROLE"),
msg.sender
);

// Reentrancy guard on shared storage
NonReentrancyMod.enter();
ERC20MintMod.mint(recipient, amount);
NonReentrancyMod.exit();
}
}

Build your next system one facet at a time.​

Start with a working project, add reusable Solidity building blocks, and keep your custom logic easy to understand.

  • MITOpen-source license
  • ERC-2535 + ERC-8153Diamond architecture
  • 34+GitHub contributors
  • Foundry + HardhatSupported workflows

Newsletter

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

No spam. Unsubscribe anytime.