Module 0x3::stake_subsidy
- Struct
StakeSubsidy
- Constants
- Function
create
- Function
advance_epoch
- Function
current_epoch_subsidy_amount
- Function
get_distribution_counter
use 0x1::u64;
use 0x2::bag;
use 0x2::balance;
use 0x2::sui;
use 0x2::tx_context;
Struct StakeSubsidy
struct StakeSubsidy has store
Click to open
Fields
Constants
const BASIS_POINT_DENOMINATOR: u128 = 10000;
const ESubsidyDecreaseRateTooLarge: u64 = 0;
Function create
public(friend) fun create(balance: balance::Balance<sui::SUI>, initial_distribution_amount: u64, stake_subsidy_period_length: u64, stake_subsidy_decrease_rate: u16, ctx: &mut tx_context::TxContext): stake_subsidy::StakeSubsidy
Click to open
Implementation
Function advance_epoch
Advance the epoch counter and draw down the subsidy for the epoch.
public(friend) fun advance_epoch(self: &mut stake_subsidy::StakeSubsidy): balance::Balance<sui::SUI>
Click to open
Implementation
Function current_epoch_subsidy_amount
Returns the amount of stake subsidy to be added at the end of the current epoch.
public fun current_epoch_subsidy_amount(self: &stake_subsidy::StakeSubsidy): u64
Click to open
Implementation
Function get_distribution_counter
Returns the number of distributions that have occurred.
public(friend) fun get_distribution_counter(self: &stake_subsidy::StakeSubsidy): u64
Click to open