Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MaybeValue

Represents a get operation returning a value that may not exist.

Hierarchy

Index

Constructors

constructor

  • Create a new MaybeValue.

    Parameters

    • op: Op

      The operation that returns values.

    • type: TealType

      The type of the returned value.

    • Optional immediateArgs: (string | number | bigint)[]

      (optional) Immediate arguments for the op. Defaults to None.

    • Optional args: Expr[]

      (optional) Stack arguments for the op. Defaults to None.

    Returns MaybeValue

Properties

args

args: Expr[]

immediateArgs

immediateArgs: (string | number | bigint)[]

op

op: Op

slotOk

slotOk: ScratchSlot

slotValue

slotValue: ScratchSlot

type

type: TealType

Methods

And

  • Take the logical And of this expression and another one.

    This expression must evaluate to uint64.

    This is the same as using And() with two arguments.

    Parameters

    Returns Expr

Or

  • Take the logical Or of this expression and another one.

    This expression must evaluate to uint64.

    This is the same as using Or() with two arguments.

    Parameters

    Returns Expr

add

and

eq

ge

gt

hasValue

invert

le

lt

mod

mul

ne

or

sub

teal

toString

  • toString(): string

truediv

typeOf

value

  • Get the value.

    Returns ScratchLoad

    the value will be returned if it exists. Otherwise, the zero value for this type will be returned (i.e. either 0 or an empty byte string, depending on the type).

xor

Generated using TypeDoc