Trait cfg_traits::PoolMutate
source · 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§
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>
Object Safety§
This trait is not object safe.