pub trait PoolMetadata<Balance, VersionedMultiLocation> {
    type AssetMetadata;
    type CustomMetadata;
    type PoolMetadata;
    type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo + Encode + Decode + MaxEncodedLen;
    type TrancheId: Parameter + Member + Debug + Copy + Default + TypeInfo + MaxEncodedLen;

    // Required methods
    fn get_pool_metadata(
        pool_id: Self::PoolId
    ) -> Result<Self::PoolMetadata, DispatchError>;
    fn set_pool_metadata(
        pool_id: Self::PoolId,
        metadata: Vec<u8>
    ) -> DispatchResult;
    fn get_tranche_token_metadata(
        pool_id: Self::PoolId,
        tranche: Self::TrancheId
    ) -> Result<Self::AssetMetadata, DispatchError>;
    fn create_tranche_token_metadata(
        pool_id: Self::PoolId,
        tranche: Self::TrancheId,
        metadata: Self::AssetMetadata
    ) -> DispatchResult;
    fn update_tranche_token_metadata(
        pool_id: Self::PoolId,
        tranche: Self::TrancheId,
        decimals: Option<u32>,
        name: Option<Vec<u8>>,
        symbol: Option<Vec<u8>>,
        existential_deposit: Option<Balance>,
        location: Option<Option<VersionedMultiLocation>>,
        additional: Option<Self::CustomMetadata>
    ) -> DispatchResult;
}
Expand description

A trait that supports retrieval and mutation of pool and tranche token metadata.

Required Associated Types§

source

type AssetMetadata

source

type CustomMetadata

source

type PoolMetadata

source

type PoolId: Parameter + Member + Debug + Copy + Default + TypeInfo + Encode + Decode + MaxEncodedLen

source

type TrancheId: Parameter + Member + Debug + Copy + Default + TypeInfo + MaxEncodedLen

Required Methods§

source

fn get_pool_metadata( pool_id: Self::PoolId ) -> Result<Self::PoolMetadata, DispatchError>

Get the metadata of the given pool.

source

fn set_pool_metadata(pool_id: Self::PoolId, metadata: Vec<u8>) -> DispatchResult

Set the metadata of the given pool.

source

fn get_tranche_token_metadata( pool_id: Self::PoolId, tranche: Self::TrancheId ) -> Result<Self::AssetMetadata, DispatchError>

Get the metadata of the given pair of pool and tranche id.

source

fn create_tranche_token_metadata( pool_id: Self::PoolId, tranche: Self::TrancheId, metadata: Self::AssetMetadata ) -> DispatchResult

Register the metadata for the currency derived from the given pair of pool id and tranche.

source

fn update_tranche_token_metadata( pool_id: Self::PoolId, tranche: Self::TrancheId, decimals: Option<u32>, name: Option<Vec<u8>>, symbol: Option<Vec<u8>>, existential_deposit: Option<Balance>, location: Option<Option<VersionedMultiLocation>>, additional: Option<Self::CustomMetadata> ) -> DispatchResult

Update the metadata of the given pair of pool and tranche id.

Object Safety§

This trait is not object safe.

Implementors§