Rebuilt from the module interface. No verified source is published, and function bodies are only available as bytecode.
module bucket;
struct Bucket<phantom T0> has store, key {
id: UID,
min_collateral_ratio: u64,
recovery_mode_threshold: u64,
collateral_decimal: u8,
max_mint_amount: Option<u64>,
collateral_vault: Balance<T0>,
minted_buck_amount: u64,
base_fee_rate: u64,
latest_redemption_time: u64,
total_flash_loan_amount: u64,
}
struct FlashReceipt<phantom T0> {
amount: u64,
fee: u64,
}
struct OutputKey has copy, drop, store {
dummy_field: bool,
}
struct OutputVolume has store {
volume: u64,
}
struct PendingRecord has store, key {
id: UID,
bucket_pending_debt: u64,
bucket_pending_collateral: u64,
}
public(package) fun accrue_interests_by_debtor<T0>(&mut Bucket<T0>,address,&Clock):
u64 public(package) fun add_interest_index_to_bottle(&mut bottle::Bottle,u256)
public(package) fun add_interest_index_to_bottle_by_debtor<T0>(&mut Bucket<T0>,address,u256)
public(package) fun add_interest_table_to_bucket<T0>(&mut Bucket<T0>,&Clock)
public(package) fun add_pending_record_to_bucket<T0>(&mut Bucket<T0>)
public(package) fun adjust_pending_record<T0>(&mut Bucket<T0>,u64,u64)
fun apply_pending<T0>(&mut Bucket<T0>,address): (
u64, u64)
public fun bottle_exists<T0>(&Bucket<T0>,address):
bool fun check_insertion_place<T0>(&Bucket<T0>,address,&mut Option<address>)
public fun compute_base_rate<T0>(&Bucket<T0>, u64):
u64 fun compute_buck_value_to_collateral(u64,u8,u64,u64): u64
fun compute_collateral_value_to_buck(u64,u8,u64,u64): u64
public fun get_bottle_info_by_debtor<T0>(&Bucket<T0>,address): (
u64, u64)
public fun get_bottle_info_with_interest_by_debtor<T0>(&Bucket<T0>,address,&Clock): (
u64, u64)
public fun get_bottle_table_length<T0>(&Bucket<T0>):
u64 public fun get_bucket_debt<T0>(&Bucket<T0>,&Clock):
u64 public fun get_bucket_pending_collateral<T0>(&Bucket<T0>):
u64 public fun get_bucket_pending_debt<T0>(&Bucket<T0>):
u64 public fun get_bucket_size<T0>(&Bucket<T0>):
u64 public fun get_collateral_output_volume<T0>(&Bucket<T0>):
u64 public fun get_collateral_vault_balance<T0>(&Bucket<T0>):
u64 public fun get_lowest_cr_debtor<T0>(&Bucket<T0>):
Option<
address>
public fun get_max_mint_amount<T0>(&Bucket<T0>):
Option<
u64>
public fun get_minimum_collateral_ratio<T0>(&Bucket<T0>):
u64 public fun get_minted_buck_amount<T0>(&Bucket<T0>):
u64 public fun get_receipt_info<T0>(&FlashReceipt<T0>): (
u64, u64)
public fun get_surplus_bottle_info_by_debtor<T0>(&Bucket<T0>,address): (
u64, u64)
public fun get_surplus_bottle_table_size<T0>(&Bucket<T0>):
u64 public fun get_surplus_collateral_amount<T0>(&Bucket<T0>,address):
u64 public fun get_total_collateral_balance<T0>(&Bucket<T0>):
u64 public fun get_total_flash_loan_amount<T0>(&Bucket<T0>):
u64 public(package) fun handle_deposit_surplus<T0>(&mut Bucket<T0>,address,Balance<T0>)
public(package) fun handle_flash_borrow<T0>(&mut Bucket<T0>,u64): (
Balance<T0>, FlashReceipt<T0>)
public(package) fun handle_flash_repay<T0>(&mut Bucket<T0>,Balance<T0>,FlashReceipt<T0>):
Balance<
T0>
public(package) fun handle_repay<T0>(&mut Bucket<T0>,address,u64,u64,bool,&Clock):
Balance<
T0>
public(package) fun handle_top_up<T0>(&mut Bucket<T0>,Balance<T0>,address,Option<address>,&Clock)
public(package) fun handle_transfer<T0>(&mut Bucket<T0>,address,address,&Clock)
public(package) fun input<T0>(&mut Bucket<T0>,Balance<T0>)
public fun is_interest_table_exists<T0>(&Bucket<T0>):
bool public fun is_not_locked<T0>(&Bucket<T0>):
bool public(package) fun new<T0>(u64,u64,u8,Option<u64>):
Bucket<
T0>
public fun next_debtor<T0>(&Bucket<T0>,address):
&Option<
address>
public(package) fun output<T0>(&mut Bucket<T0>,u64):
Balance<
T0>
public fun prev_debtor<T0>(&Bucket<T0>,address):
&Option<
address>
public(package) fun update_base_rate_fee<T0>(&mut Bucket<T0>,u64,u64)
public(package) fun update_liquidation_config<T0>(&mut Bucket<T0>,u64,u64)
public(package) fun update_max_mint_amount<T0>(&mut Bucket<T0>,Option<u64>)
public(package) fun update_snapshot<T0>(&mut Bucket<T0>)
public(package) fun withdraw_surplus_collateral<T0>(&mut Bucket<T0>,address):
Balance<
T0>