subgraph_id

Macro subgraph_id 

Source
macro_rules! subgraph_id {
    () => { ... };
    ($id:tt) => { ... };
}
Expand description

Converts a sequence of string literals containing 32-bytes Base58-encoded data into a new SubgraphId at compile time.

To create an SubgraphId from a string literal (Base58) at compile time:

const SUBGRAPH_ID: SubgraphId = subgraph_id!("DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp");

If no argument is provided, the macro will create an SubgraphId with the zero ID:

const SUBGRAPH_ID: SubgraphId = subgraph_id!();

assert_eq!(SUBGRAPH_ID, SubgraphId::ZERO);