Skip to content
CCPEDIAby Unity Nodes
App Development

Behaviour of timing assertions

1 posts33 viewsLast activity Apr 2026

  1. bernhardOP

    The Standard Library has these four functions:

    assertAfterMsg: (CanAssert m, HasTime m) => Text → Time → m ()

    Check whether the given time is in the future. If it’s not, abort with a message.

    assertBeforeMsg: (CanAssert m, HasTime m) => Text → Time → m ()

    Check whether the given time is in the past. If it’s not, abort with a message.

    assertWithinDeadline: Text → Time → Update ()

    Check whether the ledger time of the transaction is strictly before the given deadline. If it’s not, abort with a message.

    assertDeadlineExceeded: Text → Time → Update ()

    Check whether the ledger time of the transaction is at or after the given deadline. If it’s not, abort with a message.

    The “Msg” functions are implemented in terms of getTime, not using the isLedgerTimeGE primitive. Does that make any difference in terms of timing tolerance for external signing?