Fees
Defines:
public struct Royalties has key {
id: UID,
app: address,
custom_coin_type: TypeName,
partner_fee: u64,
partner_treasury: address,
protocol_fee: u64,
protocol_treasury: address
}
Collect Payment
The collect_payment
function has these effects:
Transfers custom & sui payments to the Sage treasury
Create Royalties
The create_royalties
function has these effects:
Asserts the fee settings are within range
Creates Royalties for the App
Adds the Royalties to the App
Shares the Royalties configuration
Returns the Royalties address
Distribute Payment
The distribute_payment
function has these effects:
Splits the custom payment depending upon the Royalties config
Sends payments to all relevant parties
Updates Royalties
The collect_payment
function has these effects:
Asserts the fee settings are within range
Updates the Royalties config
Last updated