macro_rules! proof_of_indexing {
() => { ... };
($id:tt) => { ... };
}
Expand description
Converts a sequence of string literals containing hex-encoded data into a new
ProofOfIndexing
at compile time.
To create an ProofOfIndexing
from a string literal (no 0x
prefix) at compile time:
use thegraph_core::{proof_of_indexing, ProofOfIndexing};
const PROOF_OF_INDEXING: ProofOfIndexing =
proof_of_indexing!("bb31abb3bb85428d894fb4b3cee8a0889bbe8585939b70910bbdda31b30d2240");
If no argument is provided, the macro will create an ProofOfIndexing
with the zero POI:
use thegraph_core::{proof_of_indexing, ProofOfIndexing};
const PROOF_OF_INDEXING: ProofOfIndexing = proof_of_indexing!();
assert_eq!(PROOF_OF_INDEXING, ProofOfIndexing::ZERO);