Options
All
  • Public
  • Public/Protected
  • All
Menu

Module compiler/Constants

Index

Variables

Const intEnumValues

intEnumValues: Map<string, number> = ...

Functions

createConstantBlocks

  • Convert TEAL code from using pseudo-ops for constants to using assembled constant blocks. This conversion will assemble constants to be as space-efficient as possible.

    Parameters

    Returns TealComponent[]

    A list of TealComponent that are functionally the same as the input, but with all constants loaded either through blocks or the pushint/pushbytes single-use ops.

extractAddrValue

  • extractAddrValue(op: TealOp): string | Uint8Array
  • Extract the constant value being loaded by a TealOp whose op is Op.addr.

    Parameters

    Returns string | Uint8Array

    If the op is loading a template variable, returns the name of the variable as a string. Otherwise, returns the bytes of the public key of the address that the op is loading.

extractBytesValue

  • extractBytesValue(op: TealOp): string | Uint8Array
  • Extract the constant value being loaded by a TealOp whose op is Op.byte.

    Parameters

    Returns string | Uint8Array

    If the op is loading a template variable, returns the name of the variable as a string. Otherwise, returns the byte string that the op is loading.

extractIntValue

  • extractIntValue(op: TealOp): string | bigint
  • Extract the constant value being loaded by a TealOp whose op is Op.int.

    Parameters

    Returns string | bigint

    If the op is loading a template variable, returns the name of the variable as a string. Otherwise, returns the integer that the op is loading.

Generated using TypeDoc