pub fn create_pool<T: Config>(
staked_asset_id: Box<T::AssetId>,
reward_asset_id: Box<T::AssetId>,
reward_rate_per_block: T::Balance,
expiry: DispatchTime<BlockNumberFor<T>>,
admin: Option<T::AccountId>,
)Expand description
Create a new reward pool.
Parameters:
origin: must beConfig::CreatePoolOrigin;staked_asset_id: the asset to be staked in the pool;reward_asset_id: the asset to be distributed as rewards;reward_rate_per_block: the amount of reward tokens distributed per block;expiry: the block number at which the pool will cease to accumulate rewards. The [DispatchTime::After] variant evaluated at the execution time.admin: the account allowed to extend the pool expiration, increase the rewards rate and receive the unutilized reward tokens back after the pool completion. IfNone, the caller is set as an admin.
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::create_pool.