Skip to content
Snippets Groups Projects
Unverified Commit af92541e authored by Liam Aharon's avatar Liam Aharon
Browse files

improve call docs

parent 1ecc7e2e
No related merge requests found
Pipeline #466401 canceled with stages
in 53 seconds
......@@ -313,6 +313,8 @@ pub mod pallet {
#[pallet::call(weight(<T as Config>::WeightInfo))]
impl<T: Config> Pallet<T> {
/// Create a new reward pool.
///
/// If an explicity admin is not specified, it defaults to the caller.
#[pallet::call_index(0)]
pub fn create_pool(
origin: OriginFor<T>,
......@@ -376,6 +378,8 @@ pub mod pallet {
}
/// Stake tokens in a pool.
///
/// A freeze is placed on the staked tokens.
#[pallet::call_index(1)]
pub fn stake(origin: OriginFor<T>, pool_id: PoolId, amount: T::Balance) -> DispatchResult {
let caller = ensure_signed(origin)?;
......@@ -404,6 +408,8 @@ pub mod pallet {
}
/// Unstake tokens from a pool.
///
/// Removes the freeze on the staked tokens.
#[pallet::call_index(2)]
pub fn unstake(
origin: OriginFor<T>,
......@@ -439,6 +445,9 @@ pub mod pallet {
}
/// Harvest unclaimed pool rewards for a staker.
///
/// Anyone may harvest rewards on behalf of a staker. If an explicit staker is not provided,
/// the caller is assumed to be the staker.
#[pallet::call_index(3)]
pub fn harvest_rewards(
origin: OriginFor<T>,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment