Expose an embedded Cairo component through the host contract ABI

A component contributes reusable storage, events and implementation code. Adding the component to a contract does not automatically expose every component method as a public entrypoint.

Check the embedded implementation

The example illustrates embedding an ownable implementation in a host contract. Wire the component’s storage and event variants as required, then inspect the compiled host ABI for the intended external methods. The names depend on the actual component definition.

#[abi(embed_v0)]
impl OwnableImpl = OwnableComponent::OwnableImpl<ContractState>;

If internal ownership helpers compile but clients cannot call the public getter, inspect which implementation was embedded and whether the external interface is present in the class that was actually declared. Test the host address after deployment.

Audit the public surface

Keep internal helper implementations internal. Embedding a broader public implementation than intended changes the host’s callable surface, including any administrative entrypoints it provides. Review the generated ABI when updating a component dependency. starknet.io The Cairo Programming Language