ControllerV2
The Controller quotes and executes the engine's Statement and Credit sales.
Price reads
priceOf(uint256 sid) → uint256viewCurrent Statement ask in wei: at least the Core cost floor and the reference times the persistent multiplier.
referenceOf(uint256 sid) → uint256viewReference used by the Statement ask.
statementSalesEnabled() → boolviewWhether Statement purchases are enabled.
statementSaleMultiplierBps() → uint32viewPersistent multiplier applied to the Statement reference. It does not decay with age.
creditPrice(uint256 id) → uint256viewCurrent sale price for a held Credit.
nextPage() → (bool ready, uint256[80] ids, uint8 format)viewWhether the Core can compose the next page.
Sale calls
buy(uint256 sid) payableBuy a held Statement while sales are enabled; the Controller settles through Core.sellTo.
May revert: StatementSalesOff, NotForSale, Underpaid, NoQuote
buyCredit(uint256 id) payableBuy one pile Credit while the sale is enabled.
May revert: CreditSaleOff, NotForSale, Underpaid
buyCredits(uint256[] ids) payableBuy several eligible pile Credits in one payment.
May revert: CreditSaleOff, NotForSale, Underpaid
Events to index
Bought(sid, buyer, price)Statement purchase; pair with Core.StatementSoldTo in the same transaction.
StatementSalesSet(enabled)Statement sale availability changed.
StatementSaleMultiplierSet(multiplierBps)The Statement ask multiplier changed.
CreditSaleSet(credit)Credit sale policy changed.