Farm
Structs
Account
struct Account<phantom StakeCoin, phantom RewardCoin> has key, store {
id: UID,
farm_id: ID,
amount: u64,
reward_debt: u256
}Farm
struct Farm<phantom StakeCoin, phantom RewardCoin> has key, store {
id: UID,
rewards_per_second: u64,
start_timestamp: u64,
last_reward_timestamp: u64,
accrued_rewards_per_share: u256,
balance_stake_coin: Balance<StakeCoin>,
balance_reward_coin: Balance<RewardCoin>,
stake_coin_decimal_factor: u64,
owned_by: ID
}Interface
new_cap
new_farm
new_account
rewards_per_second
start_timestamp
last_reward_timestamp
accrued_rewards_per_share
balance_stake_coin
balance_reward_coin
stake_coin_decimal_factor
owned_by
amount
reward_debt
pending_rewards
add_rewards
stake
unstake
destroy_zero_account
update_rewards_per_second
destroy_zero_farm
borrow_mut_uid
Last updated
Was this helpful?