pub trait PoolMutate<AccountId, PoolId> {
    type Balance;
    type CurrencyId;
    type TrancheInput: Encode + Decode + Clone + TypeInfo + Debug + PartialEq;
    type PoolChanges: Encode + Decode + Clone + TypeInfo + Debug + PartialEq + MaxEncodedLen;
    type PoolFeeInput: Encode + Decode + Clone + TypeInfo + Debug;

    // Required methods
    fn create(
        admin: AccountId,
        depositor: AccountId,
        pool_id: PoolId,
        tranche_inputs: Vec<Self::TrancheInput>,
        currency: Self::CurrencyId,
        max_reserve: Self::Balance,
        pool_fees: Vec<Self::PoolFeeInput>
    ) -> DispatchResult;
    fn update(
        pool_id: PoolId,
        changes: Self::PoolChanges
    ) -> Result<UpdateState, DispatchError>;
    fn execute_update(pool_id: PoolId) -> Result<u32, DispatchError>;
}
Expand description

A trait that supports modifications of pools

Required Associated Types§

source

type Balance

source

type CurrencyId

source

type TrancheInput: Encode + Decode + Clone + TypeInfo + Debug + PartialEq

source

type PoolChanges: Encode + Decode + Clone + TypeInfo + Debug + PartialEq + MaxEncodedLen

source

type PoolFeeInput: Encode + Decode + Clone + TypeInfo + Debug

Required Methods§

source

fn create( admin: AccountId, depositor: AccountId, pool_id: PoolId, tranche_inputs: Vec<Self::TrancheInput>, currency: Self::CurrencyId, max_reserve: Self::Balance, pool_fees: Vec<Self::PoolFeeInput> ) -> DispatchResult

source

fn update( pool_id: PoolId, changes: Self::PoolChanges ) -> Result<UpdateState, DispatchError>

source

fn execute_update(pool_id: PoolId) -> Result<u32, DispatchError>

Object Safety§

This trait is not object safe.

Implementors§