Crate cw_utils

source ·
Expand description

This is a collection of common types shared among many specs. For example Expiration, which is embedded in many places.

Types should only be added here after they are duplicated in a second contract, not “because we might need it”

Structs§

Enums§

  • Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined
  • Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)
  • Scheduled represents a point in time when an event happens. It can compare with a BlockInfo and will return is_triggered() == true once the condition is hit (and for every block in the future)
  • This defines the different ways tallies can happen.
  • This defines the different ways tallies can happen. Every contract should support a subset of these, ideally all.

Constants§

Functions§