CCengine
current bid ETH / pt
Docs/Contracts
Contract / sale pricing

ControllerV2

The Controller quotes and executes the engine's Statement and Credit sales.

Price reads

priceOf(uint256 sid) → uint256view

Current Statement ask in wei: at least the Core cost floor and the reference times the persistent multiplier.

referenceOf(uint256 sid) → uint256view

Reference used by the Statement ask.

statementSalesEnabled() → boolview

Whether Statement purchases are enabled.

statementSaleMultiplierBps() → uint32view

Persistent multiplier applied to the Statement reference. It does not decay with age.

creditPrice(uint256 id) → uint256view

Current sale price for a held Credit.

nextPage() → (bool ready, uint256[80] ids, uint8 format)view

Whether the Core can compose the next page.

Sale calls

buy(uint256 sid) payable

Buy a held Statement while sales are enabled; the Controller settles through Core.sellTo.

May revert: StatementSalesOff, NotForSale, Underpaid, NoQuote

buyCredit(uint256 id) payable

Buy one pile Credit while the sale is enabled.

May revert: CreditSaleOff, NotForSale, Underpaid

buyCredits(uint256[] ids) payable

Buy 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.