Type Alias development_runtime::LiquidityRewards
source · pub type LiquidityRewards = Pallet<Runtime>;
Aliased Type§
struct LiquidityRewards(/* private fields */);
Implementations
§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
pub fn apply_epoch_changes( counter: &mut ChangeCounter ) -> Result<(EpochData<T>, EpochChanges<T>), DispatchError>
§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
pub fn stake(
origin: <T as Config>::RuntimeOrigin,
currency_id: <T as Config>::CurrencyId,
amount: <T as Config>::Balance
) -> Result<(), DispatchError>
pub fn stake( origin: <T as Config>::RuntimeOrigin, currency_id: <T as Config>::CurrencyId, amount: <T as Config>::Balance ) -> Result<(), DispatchError>
Deposit a stake amount associated to a currency for the origin’s account. The account must have enough currency to make the deposit, if not, an Err will be returned.
pub fn unstake(
origin: <T as Config>::RuntimeOrigin,
currency_id: <T as Config>::CurrencyId,
amount: <T as Config>::Balance
) -> Result<(), DispatchError>
pub fn unstake( origin: <T as Config>::RuntimeOrigin, currency_id: <T as Config>::CurrencyId, amount: <T as Config>::Balance ) -> Result<(), DispatchError>
Withdraw a stake amount associated to a currency for the origin’s account. The account must have enough currency staked to make the withdraw, if not, an Err will be returned.
pub fn claim_reward(
origin: <T as Config>::RuntimeOrigin,
currency_id: <T as Config>::CurrencyId
) -> Result<(), DispatchError>
pub fn claim_reward( origin: <T as Config>::RuntimeOrigin, currency_id: <T as Config>::CurrencyId ) -> Result<(), DispatchError>
Claims the reward the associated to a currency. The reward will be transferred to the origin’s account.
pub fn set_distributed_reward(
origin: <T as Config>::RuntimeOrigin,
balance: <T as Config>::Balance
) -> Result<(), DispatchError>
pub fn set_distributed_reward( origin: <T as Config>::RuntimeOrigin, balance: <T as Config>::Balance ) -> Result<(), DispatchError>
Admin method to set the reward amount used for the next epochs. Current epoch is not affected by this call.
pub fn set_epoch_duration(
origin: <T as Config>::RuntimeOrigin,
duration: <<T as Config>::Timer as Time>::Moment
) -> Result<(), DispatchError>
pub fn set_epoch_duration( origin: <T as Config>::RuntimeOrigin, duration: <<T as Config>::Timer as Time>::Moment ) -> Result<(), DispatchError>
Admin method to set the duration used for the next epochs. Current epoch is not affected by this call.
pub fn set_group_weight(
origin: <T as Config>::RuntimeOrigin,
group_id: <T as Config>::GroupId,
weight: <T as Config>::Weight
) -> Result<(), DispatchError>
pub fn set_group_weight( origin: <T as Config>::RuntimeOrigin, group_id: <T as Config>::GroupId, weight: <T as Config>::Weight ) -> Result<(), DispatchError>
Admin method to set the group weights used for the next epochs. Current epoch is not affected by this call.
pub fn set_currency_group(
origin: <T as Config>::RuntimeOrigin,
currency_id: <T as Config>::CurrencyId,
group_id: <T as Config>::GroupId
) -> Result<(), DispatchError>
pub fn set_currency_group( origin: <T as Config>::RuntimeOrigin, currency_id: <T as Config>::CurrencyId, group_id: <T as Config>::GroupId ) -> Result<(), DispatchError>
Admin method to set the group used for a currency in the next epochs. Current epoch is not affected by this call.
This method will do the currency available for using it in stake/unstake/claim calls.
Trait Implementations
§impl<T> Callable<T> for Pallet<T>where
T: Config,
impl<T> Callable<T> for Pallet<T>where
T: Config,
type RuntimeCall = Call<T>
§impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_initialize(
_: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
) -> Weight
fn on_initialize( _: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> Weight
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
§impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].§impl<T> IntegrityTest for Pallet<T>where
T: Config,
impl<T> IntegrityTest for Pallet<T>where
T: Config,
§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].§impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> Weight
Hooks::on_initialize
].§impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
fn storage_info() -> Vec<StorageInfo>
§impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number )
Hooks::on_finalize
].§impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
§fn offchain_worker(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
)
fn offchain_worker( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number )
§impl<T> OnGenesis for Pallet<T>where
T: Config,
impl<T> OnGenesis for Pallet<T>where
T: Config,
§fn on_genesis()
fn on_genesis()
§impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.