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

API

duck_nft

Module0xff3e…279d
Move path
0x61e6…e413::duck_nft
Functions
9163 public, 24 entry
Structs
34
Friend modules
nestv2
duck_nft

Declarations

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

module duck_nft;
struct AddressRemovedFromWhitelist has copy, drop {
address: address,
removed_by: address,
}
struct AddressWhitelisted has copy, drop {
address: address,
added_by: address,
}
struct AdminCap has key {
id: UID,
team_mint_initialized: bool,
}
struct BatchStarted has copy, drop {
batch_number: u64,
start_time: u64,
packs_available: u64,
}
struct BatchWhitelisted has copy, drop {
count: u64,
added_by: address,
}
struct CooldownDurationUpdated has copy, drop {
old_duration_ms: u64,
new_duration_ms: u64,
updated_by: address,
}
struct CooldownStarted has copy, drop {
batch_number: u64,
sellout_time: u64,
cooldown_end_time: u64,
}
struct DUCK_NFT has drop {
dummy_field: bool,
}
struct DuckNFT has store, key {
id: UID,
name: String,
number: u64,
rarity: u8,
rarity_name: String,
image_url: String,
description: String,
mint_timestamp: u64,
owner: address,
luck: String,
multiplier: String,
batch: String,
is_staked: bool,
staked_at: u64,
last_harvest_time: u64,
nest_level: u8,
attributes: VecMap<String, String>,
}
struct DuckVirtuallyStaked has copy, drop {
duck_id: ID,
owner: address,
nest_level: u8,
staked_at: u64,
}
struct DuckVirtuallyUnstaked has copy, drop {
duck_id: ID,
owner: address,
total_time_staked: u64,
}
struct GenesisBatchCompleted has copy, drop {
end_time: u64,
total_packs_sold: u64,
}
struct GenesisBatchStarted has copy, drop {
start_time: u64,
total_supply: u64,
whitelist_allocation: u64,
}
struct GlobalStats has key {
id: UID,
common_minted: u64,
queen_minted: u64,
king_minted: u64,
golden_minted: u64,
total_sht_burned: u64,
sht_burned_today: u64,
last_burn_reset_day: u64,
}
struct HarvestTimeUpdated has copy, drop {
duck_id: ID,
new_harvest_time: u64,
}
struct HatchCap has key {
id: UID,
}
struct LastMintOfBatch has copy, drop {
completed_batch_number: u64,
next_batch_number: u64,
cooldown_end_time: u64,
final_nfts_minted: u64,
}
struct PackPurchased has copy, drop {
pack_type: u8,
buyer: address,
sht_cost: u64,
sui_cost: u64,
rarity: u8,
remaining_packs: u64,
}
struct PackSupply has key {
id: UID,
total_packs_remaining: u64,
last_refresh_time: u64,
start_time: u64,
basic_egg_sht_cost: u64,
basic_egg_sui_cost: u64,
rare_egg_sht_cost: u64,
rare_egg_sui_cost: u64,
golden_egg_sht_cost: u64,
golden_egg_sui_cost: u64,
genesis_whitelist_basic_sui_cost: u64,
genesis_whitelist_rare_sui_cost: u64,
genesis_whitelist_golden_sui_cost: u64,
genesis_public_basic_sui_cost: u64,
genesis_public_rare_sui_cost: u64,
genesis_public_golden_sui_cost: u64,
is_genesis_batch: bool,
genesis_batch_start_time: u64,
whitelist_packs_sold: u64,
whitelist_phase_active: bool,
user_whitelist_purchases: Table<address, u64>,
current_batch_number: u64,
display_batch_number: u64,
previous_batch_completed: bool,
total_nfts_minted_globally: u64,
in_cooldown: bool,
cooldown_end_time: u64,
last_sellout_time: u64,
batch_transition_lock: bool,
user_last_purchase_time: Table<address, u64>,
}
struct PackTypeLimitUpdated has copy, drop {
pack_type: u8,
old_limit: u64,
new_limit: u64,
updated_by: address,
}
struct PerTypeSupply has key {
id: UID,
basic_packs_remaining: u64,
rare_packs_remaining: u64,
golden_packs_remaining: u64,
max_basic_per_batch: u64,
max_rare_per_batch: u64,
max_golden_per_batch: u64,
}
struct PriceUpdated has copy, drop {
pack_type: u8,
old_sht_cost: u64,
new_sht_cost: u64,
old_sui_cost: u64,
new_sui_cost: u64,
}
struct ReferralRegistry has key {
id: UID,
referrers: Table<address, address>,
}
struct ReferralReward has copy, drop {
pack_type: u8,
buyer: address,
referrer: address,
sht_amount: u64,
timestamp: u64,
}
struct ReferrerSet has copy, drop {
user: address,
referrer: address,
timestamp: u64,
}
struct SupplyRefreshed has copy, drop {
refresh_time: u64,
total_packs_available: u64,
}
struct TeamMintCap has key {
id: UID,
team_wallet: address,
minted: bool,
}
struct TeamMintCompleted has copy, drop {
minter: address,
quantity: u64,
remaining_mints: u64,
}
struct TreasuryConfig has key {
id: UID,
treasury_wallet: address,
}
struct TreasuryWalletUpdated has copy, drop {
old_wallet: address,
new_wallet: address,
}
struct UserStats has copy, drop, store {
lifetime_sht_earned: u64,
total_harvest_attempts: u64,
successful_harvests: u64,
total_sht_burned: u64,
packs_bought: u64,
sht_earned_today: u64,
last_activity_day: u64,
}
struct UserStatsRegistry has key {
id: UID,
}
struct Whitelist has key {
id: UID,
addresses: VecSet<address>,
}
struct WhitelistPhaseEnded has copy, drop {
end_time: u64,
whitelist_packs_sold: u64,
remaining_for_public: u64,
}
public entry fun admin_add_batch_to_whitelist(&AdminCap,&mut Whitelist,vector<address>)
public entry fun admin_add_batch_to_whitelist_efficient(&AdminCap,&mut Whitelist,vector<address>)
public entry fun admin_add_to_whitelist(&AdminCap,&mut Whitelist,address)
public entry fun admin_refresh_supply(&AdminCap,&mut PackSupply,&mut PerTypeSupply,&Clock)
public entry fun admin_remove_from_whitelist(&AdminCap,&mut Whitelist,address)
public entry fun admin_update_basic_price(&AdminCap,&mut PackSupply,u64,u64)
public entry fun admin_update_cooldown_duration(&AdminCap,&mut PackSupply,u64)
public entry fun admin_update_genesis_public_prices(&AdminCap,&mut PackSupply,u64,u64,u64)
public entry fun admin_update_genesis_whitelist_prices(&AdminCap,&mut PackSupply,u64,u64,u64)
public entry fun admin_update_golden_price(&AdminCap,&mut PackSupply,u64,u64)
public entry fun admin_update_pack_limits(&AdminCap,&PackSupply,&mut PerTypeSupply,u64,u64,u64)
public entry fun admin_update_rare_price(&AdminCap,&mut PackSupply,u64,u64)
public entry fun admin_update_treasury_wallet(&AdminCap,&mut TreasuryConfig,address)
fun apply_genesis_purchase(&mut PackSupply,&Whitelist,address,u64,&Clock)
public fun can_set_referrer(&ReferralRegistry,&PackSupply,address): bool
fun check_and_start_new_batch_if_ready(&mut PackSupply,&mut PerTypeSupply,&Clock)
fun check_genesis_batch_completion(&mut PackSupply,&Clock)
fun create_duck_nft(u8,u64,u64,&Clock): DuckNFT
fun enforce_public_rate_limit(&mut PackSupply,bool,address,u64,u64)
public fun get_available_harvest_cycles(&DuckNFT,u64,u64,&Clock): u64
public fun get_batch_display_info(&PackSupply): (u64, u64, bool)
fun get_batch_name(u64): String
public fun get_batch_number(&PackSupply): u64
public fun get_cooldown_duration(&PackSupply): u64
public fun get_cooldown_status(&PackSupply,&Clock): (bool, u64, u64)
public fun get_current_batch(&PackSupply): (u64, bool)
public fun get_current_pack_prices(&PackSupply): (u64, u64, u64, u64, u64, u64)
public fun get_duck_staking_info(&DuckNFT): (bool, u64, u64, u8)
fun get_duck_stats(u8): (String, String)
public fun get_genesis_batch_total_supply(&PackSupply): u64
public fun get_genesis_pack_prices(&PackSupply): (u64, u64, u64, u64, u64, u64)
public fun get_global_stats(&GlobalStats): (u64, u64, u64, u64, u64, u64, u64)
public fun get_max_total_supply(&PackSupply): u64
public fun get_pack_supply_status(&PackSupply): (u64, u64, u64, u64, bool)
public fun get_per_type_supply_status(&PerTypeSupply): (u64, u64, u64, u64, u64, u64)
public fun get_public_phase_allocation(&PackSupply): u64
fun get_rarity_description(u8): String
public fun get_rarity_distribution(&GlobalStats): (u64, u64, u64, u64)
fun get_rarity_image_url(u8): String
public fun get_rarity_level(&DuckNFT): u8
fun get_rarity_name(u8): String
public fun get_referrer(&ReferralRegistry,address): Option<address>
public fun get_regular_batch_supply(&PackSupply): u64
public fun get_supply_constants(&PackSupply): (u64, u64, u64, u64, u64, u64)
public fun get_supply_refresh_interval(): u64
public fun get_team_mint_status(&TeamMintCap): (address, bool)
public fun get_time_until_harvest(&DuckNFT,u64,&Clock): u64
public fun get_time_until_refresh(&PackSupply,&Clock): u64
public fun get_total_minted(&PackSupply): u64
public fun get_treasury_wallet(&TreasuryConfig): address
public fun get_user_stats(&UserStatsRegistry,address): (u64, u64, u64, u64, u64, u64)
public fun get_whitelist_allocation(&PackSupply): u64
public fun get_whitelist_per_wallet_limit(): u64
public fun get_whitelist_period_duration(): u64
public fun get_whitelist_size(&Whitelist): u64
public fun has_user_stats(&UserStatsRegistry,address): bool
public entry fun hatch_basic_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&ReferralRegistry,&mut GlobalStats,&mut UserStatsRegistry,&mut shttoken::SharedTreasury,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<shttoken::SHTTOKEN>,Coin<SUI>,u64,&Random,&Clock)
public entry fun hatch_genesis_basic_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&mut GlobalStats,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<SUI>,u64,&Random,&Clock)
public entry fun hatch_genesis_golden_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&mut GlobalStats,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<SUI>,u64,&Random,&Clock)
public entry fun hatch_genesis_rare_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&mut GlobalStats,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<SUI>,u64,&Random,&Clock)
public entry fun hatch_golden_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&ReferralRegistry,&mut GlobalStats,&mut UserStatsRegistry,&mut shttoken::SharedTreasury,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<shttoken::SHTTOKEN>,Coin<SUI>,u64,&Random,&Clock)
public entry fun hatch_rare_egg(&HatchCap,&mut PackSupply,&mut PerTypeSupply,&Whitelist,&TreasuryConfig,&ReferralRegistry,&mut GlobalStats,&mut UserStatsRegistry,&mut shttoken::SharedTreasury,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,Coin<shttoken::SHTTOKEN>,Coin<SUI>,u64,&Random,&Clock)
fun init(DUCK_NFT)
public entry fun initialize_game_start(&AdminCap,&mut PackSupply,&mut PerTypeSupply,&Clock)
public entry fun initialize_team_mint(&mut AdminCap,address)
public fun is_duck_staked(&DuckNFT): bool
public fun is_game_started(&PackSupply,&Clock): bool
public fun is_in_cooldown(&PackSupply): bool
fun is_mint_running(&PackSupply): bool
public fun is_whitelisted(&Whitelist,address): bool
public entry fun lock_duck_in_kiosk(DuckNFT,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>)
public fun mark_as_staked(&mut DuckNFT,u64,u8)
public fun mark_as_unstaked(&mut DuckNFT)
fun roll_basic_egg_rarity(&Random): u8
fun roll_golden_egg_rarity(&Random): u8
fun roll_rare_egg_rarity(&Random): u8
public entry fun set_referrer(&mut ReferralRegistry,&PackSupply,address,&Clock)
public(package) fun stake_duck_virtual(&mut DuckNFT,u8,&Clock)
fun start_cooldown_if_sold_out(&mut PackSupply,&mut PerTypeSupply,&Clock)
public entry fun team_mint(&mut TeamMintCap,&mut PackSupply,&mut GlobalStats,&mut Kiosk,&KioskOwnerCap,&TransferPolicy<DuckNFT>,&Clock)
fun u64_to_string(u64): String
public(package) fun unstake_duck_virtual(&mut DuckNFT,&Clock)
fun update_burn_stats(&mut GlobalStats,u64,&Clock)
public(package) fun update_duck_nest_level(&mut DuckNFT,u8)
public(package) fun update_harvest_time(&mut DuckNFT,&Clock)
fun update_public_rate_limit(&mut PackSupply,address,u64)
fun update_rarity_stats(&mut GlobalStats,u8)
fun update_staked_attribute(&mut DuckNFT,bool)
fun update_user_pack_stats(&mut UserStatsRegistry,address,u64,u64,&Clock)
fun validate_genesis_purchase(&PackSupply,&Whitelist,address,u64,&Clock)
fun validate_public_rate_limit(&PackSupply,address,u64,u64)