Trait hydradx_traits::OnCreatePoolHandler
source · pub trait OnCreatePoolHandler<AssetId> {
fn on_create_pool(asset_a: AssetId, asset_b: AssetId) -> DispatchResult;
}
Expand description
Handler used by AMM pools to perform some tasks when a new pool is created.
Required Methods§
sourcefn on_create_pool(asset_a: AssetId, asset_b: AssetId) -> DispatchResult
fn on_create_pool(asset_a: AssetId, asset_b: AssetId) -> DispatchResult
Register an asset to be handled by price-oracle pallet.
If an asset is not registered, calling on_trade
results in populating the price buffer in the price oracle pallet,
but the entries are ignored and the average price for the asset is not calculated.