Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API

nest

Module0xff3e…279d
Move path
0x61e6…e413::nest
Functions
3123 public, 7 entry
Structs
15
Friend modules
nestv2
nest

Declarations

Rebuilt from the module interface. No verified source is published, and function bodies are only available as bytecode.

module nest;
struct AccumulatedHarvest has copy, drop {
nest_id: ID,
duck_id: ID,
owner: address,
cycles_harvested: u64,
total_sht_earned: u64,
harvest_results: vector<HarvestResult>,
}
struct DuckStaked has copy, drop {
nest_id: ID,
duck_id: ID,
staked_duck_id: ID,
owner: address,
slot_index: u8,
}
struct DuckUnstaked has copy, drop {
nest_id: ID,
duck_id: ID,
staked_duck_id: ID,
owner: address,
slot_index: u8,
}
struct HarvestAttempted has copy, drop {
nest_id: ID,
duck_id: ID,
owner: address,
success: bool,
sht_earned: u64,
luck_used: u8,
}
struct HarvestResult has copy, drop {
cycle_number: u64,
success: bool,
sht_earned: u64,
luck_used: u8,
}
struct HarvestStats has key {
id: UID,
total_sht_harvested: u64,
total_harvest_attempts: u64,
total_successful_harvests: u64,
active_ducks_staked: u64,
sht_harvested_today: u64,
last_harvest_reset_day: u64,
leaderboard: vector<LeaderboardEntry>,
}
struct LeaderboardEntry has copy, drop, store {
user: address,
total_harvested: u64,
}
struct Nest has key {
id: UID,
owner: address,
nest_index: u8,
level: u8,
staked_duck_id: Option<ID>,
}
struct NestAdminCap has key {
id: UID,
}
struct NestCreated has copy, drop {
nest_id: ID,
owner: address,
}
struct NestRegistry has key {
id: UID,
user_nests: Table<address, Table<u8, ID>>,
is_initialized: bool,
}
struct SlotUpgraded has copy, drop {
nest_id: ID,
owner: address,
slot_index: u8,
old_level: u8,
new_level: u8,
sht_cost: u64,
}
struct StakedDuck has key {
id: UID,
duck_id: ID,
owner: address,
nest_id: ID,
staked_at: u64,
last_harvest_time: u64,
duck_rarity: u8,
duck_multiplier: u8,
}
struct StakingKiosk has key {
id: UID,
kiosk: Kiosk,
cap: KioskOwnerCap,
}
struct UserHarvestStats has copy, drop, store {
lifetime_sht_earned: u64,
total_harvest_attempts: u64,
successful_harvests: u64,
current_ducks_staked: u64,
sht_earned_today: u64,
last_activity_day: u64,
}
public entry fun create_nest(&mut NestRegistry,u8)
public entry fun create_staking_transfer_policy(&NestAdminCap,&Publisher)
public fun get_available_harvest_cycles(&StakedDuck,&Clock): u64
fun get_duck_base_luck(u8): u8
fun get_duck_multiplier(u8): u8
public fun get_harvest_info(&StakedDuck,&Nest,&Clock): (u64, u64, bool, u64)
public fun get_harvest_stats(&HarvestStats): (u64, u64, u64, u64, u64)
public fun get_leaderboard(&HarvestStats): vector<LeaderboardEntry>
public fun get_leaderboard_entry(&HarvestStats, u64): (address, u64)
public fun get_leaderboard_length(&HarvestStats): u64
public fun get_nest_info(&Nest): (u8, u8, bool, address)
public fun get_nest_level(&Nest): u8
fun get_nest_luck_bonus(u8): u8
public fun get_original_duck_id(&StakedDuck): ID
public fun get_staked_duck_id(&Nest): Option<ID>
public fun get_staked_duck_info(&StakedDuck): (ID, address, ID, u64, u64, u8, u8)
public fun get_time_until_harvest(&StakedDuck,&Clock): u64
fun get_upgrade_cost(u8): u64
public fun get_user_harvest_stats(&HarvestStats,address): (u64, u64, u64, u64, u64)
public entry fun harvest_duck(&mut StakedDuck,&Nest,&mut HarvestStats,&shttoken::NestMintCap,&mut shttoken::SharedTreasury,&Random,&Clock)
public fun has_user_harvest_stats(&HarvestStats,address): bool
fun init()
public entry fun initialize_nest(&NestAdminCap,&mut NestRegistry)
public fun is_nest_initialized(&NestRegistry): bool
public fun is_staked_duck_ready_to_harvest(&StakedDuck,&Clock): bool
public entry fun stake_duck(&mut Kiosk,&KioskOwnerCap,ID,&mut Nest,&mut StakingKiosk,&mut TransferPolicy<duck_nft::DuckNFT>,&mut HarvestStats,&Clock)
public entry fun unstake_duck(StakedDuck,&mut Nest,&mut Kiosk,&KioskOwnerCap,&mut StakingKiosk,&mut TransferPolicy<duck_nft::DuckNFT>,&mut HarvestStats,&shttoken::NestMintCap,&mut shttoken::SharedTreasury,&Random,&Clock)
fun update_harvest_stats(&mut HarvestStats,address,u64,u64,u64,&Clock)
fun update_leaderboard(&mut HarvestStats,address)
fun update_user_stake_stats(&mut HarvestStats,address,bool,&Clock)
public entry fun upgrade_nest(&mut Nest,&mut Coin<shttoken::SHTTOKEN>,&mut shttoken::SharedTreasury)