pub trait ConstantAddress {
    type Target: DecodeWithMetadata;

    fn pallet_name(&self) -> &str;
    fn constant_name(&self) -> &str;

    fn validation_hash(&self) -> Option<[u8; 32]> { ... }
}
Expand description

This represents a constant address. Anything implementing this trait can be used to fetch constants.

Required Associated Types§

The target type of the value that lives at this address.

Required Methods§

The name of the pallet that the constant lives under.

The name of the constant in a given pallet.

Provided Methods§

An optional hash which, if present, will be checked against the node metadata to confirm that the return type matches what we are expecting.

Implementors§