Class Logic
Logic class provides static checkProgram function that can be used for client-side program validation for size and execution cost.
Assembly: Algorand.dll
Syntax
Constructors
|
Edit this page
View Source
Logic()
Declaration
Methods
|
Edit this page
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
Returns
|
Edit this page
View Source
GetEvalMaxVersion()
Retrieves max supported version of TEAL evaluator
Declaration
public static int GetEvalMaxVersion()
Returns
|
Edit this page
View Source
GetLogicSigVersion()
Declaration
public static int GetLogicSigVersion()
Returns
|
Edit this page
View Source
GetUVarint(byte[], int)
Given a varint, get the integer value
Declaration
public static VarintResult GetUVarint(byte[] buffer, int bufferOffset)
Parameters
| Type |
Name |
Description |
| byte[] |
buffer |
serialized varint
|
| int |
bufferOffset |
position in the buffer to start reading from
|
Returns
| Type |
Description |
| VarintResult |
pair of values in in array: value, read size
|
|
Edit this page
View Source
ReadByteConstBlock(byte[], int)
Declaration
public static ByteConstBlock ReadByteConstBlock(byte[] program, int pc)
Parameters
| Type |
Name |
Description |
| byte[] |
program |
|
| int |
pc |
|
Returns
|
Edit this page
View Source
ReadIntConstBlock(byte[], int)
Declaration
public static IntConstBlock ReadIntConstBlock(byte[] program, int pc)
Parameters
| Type |
Name |
Description |
| byte[] |
program |
|
| int |
pc |
|
Returns
|
Edit this page
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 |
| byte[] |
program |
program Program to validate
|
| List<byte[]> |
args |
Program arguments to validate
|
Returns
|
Edit this page
View Source
ReadPushByteOp(byte[], int)
Declaration
protected static ByteConstBlock ReadPushByteOp(byte[] program, int pc)
Parameters
| Type |
Name |
Description |
| byte[] |
program |
|
| int |
pc |
|
Returns
|
Edit this page
View Source
ReadPushIntOp(byte[], int)
Declaration
protected static IntConstBlock ReadPushIntOp(byte[] program, int pc)
Parameters
| Type |
Name |
Description |
| byte[] |
program |
|
| int |
pc |
|
Returns