Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(zoe): describe afterDeadline functionality in more detail #969

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion main/reference/zoe-api/zoe.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Show the example? In particular: show / explain that zcf.makeInvitation() is the way to actually do it.



### Payments

**paymentPKeywordRecord** must be either `undefined` or a **[PaymentPKeywordRecord](./zoe-data-types.md#keywordrecord)**
Expand Down
Loading