Module levana_perpswap_cosmos::prelude

source ·
Expand description

Exports very commonly used items into the prelude glob

Re-exports§

Macros§

  • Construct an ad-hoc error from a string or existing non-anyhow error value.
  • Return early with an error.

Structs§

  • A human readable address.
  • A fixed-point decimal value with 18 fractional digits, i.e. Decimal256(1_000_000_000_000_000_000) == 1.0
  • Item stores one typed item at the given key. This is an analog of Singleton. It functions the same way as Path does but doesn’t use a Vec and thus has a const fn constructor.
  • A raw address passed in via JSON.
  • Helper data type, following builder pattern, for constructing a [Response].
  • A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.

Enums§

  • Check that an addr satisfies auth checks
  • Bound is used to define the two ends of a range. None means that we don’t limit that side of the range at all. Inclusive means we use the given value as a limit and include anything at that exact key. Exclusive means we use the given value as a limit and exclude anything at that exact key.
  • What was the user doing when they hit the congestion error message?
  • An error type for known market errors with potentially special error handling.
  • Was the price provided by the trader too high or too low?
  • What type of price trigger occurred?

Traits§

  • Api are callbacks to system functions implemented outside of the wasm modules. Currently it just supports address conversion but we could add eg. crypto functions here.
  • Provides the context method for Result.
  • Format trait for an empty format, {}.
  • Parse a value from a string
  • Storage provides read and write access to a persistent storage. If you only want to provide read access, provide &Storage

Functions§

Type Aliases§

Attribute Macros§