ControllerV1
The Controller quotes and executes the engine's Statement and Credit sales.
Ethereum mainnet0x222CFeFC762e4Db84226DC17d15872B2169EB10e ↗
Source interfacesrc/interfaces/IControllerV1.sol ↗
Price reads
priceOf(uint256 sid) → uint256viewCurrent Statement ask in wei.
referenceOf(uint256 sid) → uint256viewReference used by the Statement sale curve.
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; the Controller settles through Core.sellTo.
May revert: 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.
AnchorMoved(sid, saleBps, anchorBps)A sale changed the curve anchor.
SaleSet(sale) / CreditSaleSet(credit)Sale policy changes that affect later quotes.