Skip to main content

consumes

Attribute Macro consumes 

Source
#[consumes]
Expand description

#[toolkit::consumes(contract = ..., from = "gear")] — declare a contract dependency wired via eventual-readiness directory discovery.

Applied on the gear struct (alongside #[toolkit::gear]). Emits a ConsumerRegistration that the runtime’s proxy-wiring phase replays: a compile-time local impl wins, otherwise a directory-resolving REST client is registered. Does NOT inject a topo-sort dependency — see toolkit_contract_macros::consumes docs.