Adds or removes a partner. Only callable by the administrator (admin).
Parameters:
Parameter
Type
Description
partner
address
Partner address (cannot be zero address)
enabled
bool
true to add partner, false to remove partner
Events Emitted:
PartnerAdded emitted when a partner is added
PartnerRemoved emitted when a partner is removed
Set Platform Fee (setPlatformFeeBps)
Sets the platform fee ratio in basis points (bps). Only callable by the administrator.
Parameters:
Parameter
Type
Description
bps
uint16
Platform fee ratio (0 ~ 10,000)
Set Creator Absent Slash Ratio (setCreatorAbsentPartnerDepositSlashBps)
Sets the penalty ratio applied to partner deposits when the Creator is absent (bps). Only callable by the administrator.
Parameters:
Parameter
Type
Description
bps
uint16
Penalty ratio (0 ~ 10,000)
Create Session (createSession)
Creates a new Commit-Reveal session by a partner. The function validates fee ratios and partner deposit balances, and locks the corresponding deposit in the Treasury.
Parameters:
partialConfig:
Selected field descriptions:
Field
Type
Description
sessionCommitment
bytes32
Session commitment value (required, cannot be 0)
paymentToken
address
Payment token address; address(0) indicates ETH
ticketPrice
uint256
Price per ticket
totalTickets
uint256
Total number of tickets
commitDurationSeconds
uint256
Duration of the Commit phase (seconds)
revealDurationSeconds
uint256
Duration of the Reveal phase (seconds)
unlockTimestamp
uint256
Session unlock timestamp
partnerShareBps
uint16
Partner revenue share (bps)
unsoldTicketsPartnerDepositSlashBps
uint16
Deposit penalty ratio for unsold tickets (bps)
creatorAbsentPartnerDepositSlashBps
uint16
Deposit penalty ratio if partner does not reveal (bps)
Validation Logic:
sessionCommitment cannot be empty
partnerShareBps + platformFeeBps ≤ 10,000
Partner's available deposit in Treasury ≥ ticketPrice * totalTickets
Return Value:
Address of the newly created CommitRevealSession contract
Admin emergency unlock of a partner's deposit in a specific Session. Only callable by the administrator. The deposit is unlocked and transferred to the partner address that created the contract.
Events
SessionCreated
Triggered when a new Commit-Reveal session is successfully created and registered in the Treasury.