Show / Hide Table of Contents

    Class Logic

    Logic class provides static checkProgram function that can be used for client-side program validation for size and execution cost.

    Inheritance
    System.Object
    Logic
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Algorand
    Assembly: Algorand.dll
    Syntax
    public class Logic

    Constructors

    | Improve this Doc View Source

    Logic()

    Declaration
    public Logic()

    Methods

    | Improve this Doc View Source

    CheckProgram(Byte[], List<Byte[]>)

    Performs basic program validation: instruction count and program cost

    Declaration
    public static bool CheckProgram(byte[] program, List<byte[]> args)
    Parameters
    Type Name Description
    System.Byte[] program
    System.Collections.Generic.List<System.Byte[]> args
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetEvalMaxVersion()

    Retrieves max supported version of TEAL evaluator

    Declaration
    public static int GetEvalMaxVersion()
    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetLogicSigVersion()

    TEAL supported version

    Declaration
    public static int GetLogicSigVersion()
    Returns
    Type Description
    System.Int32

    int

    | Improve this Doc View Source

    GetUVarint(Byte[], Int32)

    Given a varint, get the integer value

    Declaration
    public static VarintResult GetUVarint(byte[] buffer, int bufferOffset)
    Parameters
    Type Name Description
    System.Byte[] buffer

    serialized varint

    System.Int32 bufferOffset

    position in the buffer to start reading from

    Returns
    Type Description
    VarintResult

    pair of values in in array: value, read size

    | Improve this Doc View Source

    ReadByteConstBlock(Byte[], Int32)

    Declaration
    public static ByteConstBlock ReadByteConstBlock(byte[] program, int pc)
    Parameters
    Type Name Description
    System.Byte[] program
    System.Int32 pc
    Returns
    Type Description
    ByteConstBlock
    | Improve this Doc View Source

    ReadIntConstBlock(Byte[], Int32)

    Declaration
    public static IntConstBlock ReadIntConstBlock(byte[] program, int pc)
    Parameters
    Type Name Description
    System.Byte[] program
    System.Int32 pc
    Returns
    Type Description
    IntConstBlock
    | Improve this Doc View Source

    ReadProgram(Byte[], List<Byte[]>)

    Performs basic program validation: instruction count and program cost

    Declaration
    public static ProgramData ReadProgram(byte[] program, List<byte[]> args)
    Parameters
    Type Name Description
    System.Byte[] program

    program Program to validate

    System.Collections.Generic.List<System.Byte[]> args

    Program arguments to validate

    Returns
    Type Description
    ProgramData
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX