Run one bounded settlement phase on this queue and return the phase the queue is
in afterwards, which the next call runs (phase_drain, phase_pay, or
phase_done). Permissionless; aborts EMarketNotExpired before expiry.
DRAIN, while unfinished orders remain: refund them in τ order with reason 5,
visiting at most the policy's settle_refund_batch records, refunded or not.
No pruning and no account rows, so each refund loads its record alone. A
refund the receive address cannot take is parked in its record. Runs before
and after Predict settles, and while Predict is frozen.
PAY, once nothing is unfinished and Predict has settled the market: from the
payout cursor, visit at most settle_payout_batch records. Each Open record
is paid its settled payout through try_pay_settled (zero for a loser),
marked Closed, and reported with OpenRecordSettled. A record the market
cannot pay, or whose receive address is denied, stays Open with
OpenRecordPayoutSkipped, and pay_open pays it later. Before Predict
settles, a PAY call changes nothing.
DONE: the call whose walk reaches the last record emits
MarketPayoutsCompleted; later calls change nothing. Skipped records are
still paid through pay_open.
The keeper sends one call per transaction until it returns phase_done().
Run one bounded settlement phase on this queue and return the phase the queue is in afterwards, which the next call runs (
phase_drain,phase_pay, orphase_done). Permissionless; abortsEMarketNotExpiredbefore expiry.settle_refund_batchrecords, refunded or not. No pruning and no account rows, so each refund loads its record alone. A refund the receive address cannot take is parked in its record. Runs before and after Predict settles, and while Predict is frozen.settle_payout_batchrecords. Each Open record is paid its settled payout throughtry_pay_settled(zero for a loser), marked Closed, and reported withOpenRecordSettled. A record the market cannot pay, or whose receive address is denied, stays Open withOpenRecordPayoutSkipped, andpay_openpays it later. Before Predict settles, a PAY call changes nothing.MarketPayoutsCompleted; later calls change nothing. Skipped records are still paid throughpay_open.The keeper sends one call per transaction until it returns
phase_done().