From 3ee7e04851d8c0c62eb848e7af7f9fb7a76da441 Mon Sep 17 00:00:00 2001 From: 0xPatrick Date: Thu, 8 Feb 2024 16:03:47 -0500 Subject: [PATCH] feat(zoe): describe afterDeadline functionality in more detail - replaces #821 --- main/reference/zoe-api/zoe.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main/reference/zoe-api/zoe.md b/main/reference/zoe-api/zoe.md index 74faba1ec5..0f1ed2b7a4 100644 --- a/main/reference/zoe-api/zoe.md +++ b/main/reference/zoe-api/zoe.md @@ -323,11 +323,19 @@ the Keywords might be "Asset" and "Bid". - `{ onDemand: null }`: (Default) The offering party can cancel on demand. - `{ waived: null }`: The offering party can't cancel and relies entirely on the smart contract to complete (finish or fail) their offer. - `{ afterDeadline: deadlineDetails }`: The offer is automatically cancelled after a deadline, - as determined by its **timer** and **deadline** properties. + as determined by its **timer** and **deadline** properties. The proposer cannot exit the seat before the deadline (the seat is in the **waived** state), but the contract can exit the proposer's seat early. **timer** must be a timer, and **deadline** must be timestamp understood by it. (Some timers use Unix epoch time, while others count block height.) For more details, see [Timer Services](/reference/repl/timerServices.md). +### Proposal Shape + +A contract can enforce a certain proposal shape using the +**[M](https://endojs.github.io/endo/interfaces/_endo_patterns.PatternMatchers.html)** (for '**M**atcher') object from `@endo/patterns`. + +For example, a contract holding an auction might require that all offers include an `afterDeadline` exit rule with a timestamp in the future. + + ### Payments **paymentPKeywordRecord** must be either `undefined` or a **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)**