Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Cond

Hierarchy

Index

Constructors

constructor

  • At least one argument must be provided, and each argument must be a list with two elements. The first element is a condition which evaluates to uint64, and the second is the body of the condition, which will execute if that condition is true. All condition bodies must have the same return type. During execution, each condition is tested in order, and the first condition to evaluate to a true value will cause its associated body to execute and become the value for this Cond expression. If no condition evaluates to a true value, the Cond expression produces an error and the TEAL program terminates. Example:

    new Cond([Globals.groupSize().eq(new Int(5)), bid],
     [Globals.groupSize().eq(new Int(4)), redeem],
     [Globals.groupSize().eq(new Int(1)), wrapup])
    

    Parameters

    Returns Cond

Properties

args

args: Expr[][]

valueType

valueType: 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

invert

le

lt

mod

mul

ne

or

sub

teal

toString

  • toString(): string

truediv

typeOf

xor

Generated using TypeDoc