0x0::proceeds

Module performing custody of the funds acquired from the sale proceeds of an NFT Listing. In addition, Proceeds also performs the bookeeping of the sales, in quantities and -amount.

The process of retrieving the funds from the Proceeds object embedded in a Slot guarantees that fees are transferred to the marketplace.receiver and therefore the Slot.receiver receives the proceeds net of fees.

Structs

proceeds::Proceeds has store, key

Fields:

Name Type Description
id object::UID
qt_sold proceeds::QtSold

proceeds::QtSold has copy, drop, store

Fields:

Name Type Description
collected u64
total u64

Methods

public fun empty(ctx: &mut tx_context::TxContext): 
    proceeds::Proceeds

public fun add<FT>(
    proceeds: &mut proceeds::Proceeds,
    new_proceeds: balance::Balance<FT>,
    qty_sold: u64,
)

public fun collect_with_fees<FT>(
    proceeds: &mut proceeds::Proceeds,
    fees: u64,
    marketplace_receiver: address,
    listing_receiver: address,
    ctx: &mut tx_context::TxContext,
)

public fun collect_without_fees<FT>(
    proceeds: &mut proceeds::Proceeds,
    listing_receiver: address,
    ctx: &mut tx_context::TxContext,
)

public fun collected(proceeds: &proceeds::Proceeds): u64

public fun total(proceeds: &proceeds::Proceeds): u64

public fun balance<FT>(proceeds: &proceeds::Proceeds): 
    &balance::Balance<FT>