teal

package module
v0.0.0-...-9b912b9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 16 Imported by: 0

README

teal

Go packages for Algorand TEAL

tealsp

TEAL LSP Server for LSP-compatible editors, currently used in:

types

package main

import (
    "fmt"

    "github.com/dragmz/teal"
)

func main() {
    l1 := teal.Label("l1")

    prog := teal.Program{
        l1,
        teal.B(l1),
    }

    fmt.Println(prog)
}

Documentation

Index

Constants

View Source
const (
	DiagErr  = 1
	DiagWarn = 2
	DiagInfo = 3
	DiagHint = 4
)
View Source
const (
	GlobalMinTxnFee                 = GlobalField(0)
	GlobalMinBalance                = GlobalField(1)
	GlobalMaxTxnLife                = GlobalField(2)
	GlobalZeroAddress               = GlobalField(3)
	GlobalGroupSize                 = GlobalField(4)
	GlobalLogicSigVersion           = GlobalField(5)
	GlobalRound                     = GlobalField(6)
	GlobalLatestTimestamp           = GlobalField(7)
	GlobalCurrentApplicationID      = GlobalField(8)
	GlobalCreatorAddress            = GlobalField(9)
	GlobalCurrentApplicationAddress = GlobalField(10)
	GlobalGroupID                   = GlobalField(11)
	GlobalOpcodeBudget              = GlobalField(12)
	GlobalCallerApplicationID       = GlobalField(13)
	GlobalCallerApplicationAddress  = GlobalField(14)
	GlobalAssetCreateMinbalance     = GlobalField(15)
	GlobalAssetOptInMinBalance      = GlobalField(16)
)
View Source
const (
	TypeEnumUnknown = iota
	TypeEnumPay
	TypeEnumKeyReg
	TypeEnumAcfg
	TypeEnumAxfer
	TypeEnumAfrz
	TypeEnumAppl
)
View Source
const (
	BytesBase64        = 0
	BytesStringLiteral = 1
)
View Source
const (
	// NoOp = transactions.NoOpOC
	NoOp = OnCompletionConstType(transactions.NoOpOC)
	// OptIn = transactions.OptInOC
	OptIn = OnCompletionConstType(transactions.OptInOC)
	// CloseOut = transactions.CloseOutOC
	CloseOut = OnCompletionConstType(transactions.CloseOutOC)
	// ClearState = transactions.ClearStateOC
	ClearState = OnCompletionConstType(transactions.ClearStateOC)
	// UpdateApplication = transactions.UpdateApplicationOC
	UpdateApplication = OnCompletionConstType(transactions.UpdateApplicationOC)
	// DeleteApplication = transactions.DeleteApplicationOC
	DeleteApplication = OnCompletionConstType(transactions.DeleteApplicationOC)
)
View Source
const (
	TokenEol       = "EOL"
	TokenSemicolon = ";"

	TokenValue = "Value" // value

	TokenComment = "Comment" // value
)
View Source
const (
	OpArgTypeNone = iota
	OpArgTypeConstInt
	OpArgTypeUint64
	OpArgTypeUint8
	OpArgTypeInt8
	OpArgTypeBytes
	OpArgTypeTxnField
	OpArgTypeItxnField
	OpArgTypeTxnaField
	OpArgTypeJSONRefField
	OpArgTypeEcdsaCurve
	OpArgTypeGlobalField
	OpArgTypeLabel
	OpArgTypeAssetHoldingField
	OpArgTypeAssetParamsField
	OpArgTypeAppParamsField
	OpArgTypeAcctParamsField
	OpArgTypeVrfStandard
	OpArgTypeSignature
	OpArgTypeAddr
	OpArgTypePragmaName
	OpArgTypeDefineName
	OpArgTypeBase64EncodingField
	OpArgTypeBlockField
	OpArgTypeEcGroupField
)

Variables

View Source
var AcctParamsFields = FieldGroup{
	"acct_params", "Fields",
	acctParamsFieldNames[:],
	acctParamsFieldSpecByName,
}

AcctParamsFields describes acct_params_get's immediates

View Source
var Addw = &AddwExpr{}
View Source
var And = &AndExpr{}
View Source
var AppGlobalDel = &AppGlobalDelExpr{}
View Source
var AppGlobalGet = &AppGlobalGetExpr{}
View Source
var AppGlobalGetEx = &AppGlobalGetExExpr{}
View Source
var AppGlobalPut = &AppGlobalPutExpr{}
View Source
var AppLocalDel = &AppLocalDelExpr{}
View Source
var AppLocalGet = &AppLocalGetExpr{}
View Source
var AppLocalGetEx = &AppLocalGetExExpr{}
View Source
var AppLocalPut = &AppLocalPutExpr{}
View Source
var AppOptedIn = &AppOptedInExpr{}
View Source
var AppParamsFields = FieldGroup{
	"app_params", "Fields",
	appParamsFieldNames[:],
	appParamsFieldSpecByName,
}

AppParamsFields describes app_params_get's immediates

View Source
var Arg0 = &Arg0Expr{}
View Source
var Arg1 = &Arg1Expr{}
View Source
var Arg2 = &Arg2Expr{}
View Source
var Arg3 = &Arg3Expr{}
View Source
var Args = &ArgsExpr{}
View Source
var Assert = &AssertExpr{}
View Source
var AssetHoldingFields = FieldGroup{
	"asset_holding", "Fields",
	assetHoldingFieldNames[:],
	assetHoldingFieldSpecByName,
}

AssetHoldingFields describes asset_holding_get's immediates

View Source
var AssetParamsFields = FieldGroup{
	"asset_params", "Fields",
	assetParamsFieldNames[:],
	assetParamsFieldSpecByName,
}

AssetParamsFields describes asset_params_get's immediates

View Source
var Balance = &BalanceExpr{}
View Source
var Band = &BandExpr{}
View Source
var Base64Encodings = FieldGroup{
	"base64", "Encodings",
	base64EncodingNames[:],
	base64EncodingSpecByName,
}

Base64Encodings describes the base64_encode immediate

View Source
var Bgteq = &BgteqExpr{}
View Source
var BitAnd = &BitAndExpr{}
View Source
var BitLen = &BitLenExpr{}
View Source
var BitNot = &BitNotExpr{}
View Source
var BitOr = &BitOrExpr{}
View Source
var BitXor = &BitXorExpr{}
View Source
var BlockFields = FieldGroup{
	"block", "Fields",
	blockFieldNames[:],
	blockFieldSpecByName,
}

BlockFields describes the json_ref immediate

View Source
var BoxCreate = &BoxCreateExpr{}
View Source
var BoxDel = &BoxDelExpr{}
View Source
var BoxExtract = &BoxExtractExpr{}
View Source
var BoxGet = &BoxGetExpr{}
View Source
var BoxLen = &BoxLenExpr{}
View Source
var BoxPut = &BoxPutExpr{}
View Source
var BoxReplace = &BoxReplaceExpr{}
View Source
var BoxResize = &BoxResizeExpr{}
View Source
var BoxSplice = &BoxSpliceExpr{}
View Source
var Bsqrt = &BsqrtExpr{}
View Source
var Btoi = &BtoiExpr{}
View Source
var BuiltInLangSpec = func() LangSpec {
	spec, err := readLangSpec(strings.NewReader(BuiltInLangSpecJson))
	if err != nil {
		panic(err)
	}

	return spec
}()
View Source
var BuiltInLangSpecJson string
View Source
var Bytec0 = &Bytec0Expr{}
View Source
var Bytec1 = &Bytec1Expr{}
View Source
var Bytec2 = &Bytec2Expr{}
View Source
var Bytec3 = &Bytec3Expr{}
View Source
var BytesBitAnd = &BytesBitAndExpr{}
View Source
var BytesBitNot = &BytesBitNotExpr{}
View Source
var BytesBitOr = &BytesBitOrExpr{}
View Source
var BytesBitXor = &BytesBitXorExpr{}
View Source
var BytesDiv = &BdivExpr{}
View Source
var BytesEq = &BytesEqExpr{}
View Source
var BytesGe = &BytesGeExpr{}
View Source
var BytesGt = &BGtExpr{}
View Source
var BytesLe = &BytesLeExpr{}
View Source
var BytesLt = &BltExpr{}
View Source
var BytesMinus = &BminusExpr{}
View Source
var BytesModulo = &BytesModuloExpr{}
View Source
var BytesMul = &BmulExpr{}
View Source
var BytesNeq = &BytesNeqExpr{}
View Source
var BytesPlus = &BplusExpr{}
View Source
var BytesZero = &BytesZeroExpr{}
View Source
var Bzero = &BzeroExpr{}
View Source
var Concat = &ConcatExpr{}
View Source
var Div = &DivExpr{}
View Source
var DivModw = &DivModwExpr{}
View Source
var Divw = &DivwExpr{}
View Source
var Dup = &DupExpr{}
View Source
var Dup2 = &Dup2Expr{}
View Source
var ED25519Verify = &ED25519VerifyExpr{}
View Source
var EcGroups = FieldGroup{
	"EC", "Groups",
	ecGroupNames[:],
	ecGroupSpecByName,
}

EcGroups collects details about the constants used to describe EcGroups

View Source
var EcdsaCurves = FieldGroup{
	"ECDSA", "Curves",
	ecdsaCurveNames[:],
	ecdsaCurveSpecByName,
}

EcdsaCurves collects details about the constants used to describe EcdsaCurves

View Source
var Ed25519VerifyBare = &Ed25519VerifyBareExpr{}
View Source
var Empty = &EmptyExpr{}
View Source
var Eq = &EqExpr{}
View Source
var Err = &ErrExpr{}
View Source
var Exp = &ExpExpr{}
View Source
var Expw = &ExpwExpr{}
View Source
var Extract16Bits = &ExtractUint16Expr{}
View Source
var Extract3 = &Extract3Expr{}
View Source
var Extract32Bits = &ExtractUint32Expr{}
View Source
var Extract64Bits = &Extract64BitsExpr{}
View Source
var ExtractUint64 = &ExtractUint64Expr{}
View Source
var FalconVerify = &FalconVerifyExpr{}
View Source
var Gaids = &GaidsExpr{}
View Source
var Ge = &GtEqExpr{}
View Source
var GetBit = &GetBitExpr{}
View Source
var GetByte = &GetByteExpr{}
View Source
var Gloadss = &GloadssExpr{}
View Source
var GlobalFieldNames [invalidGlobalField]string

GlobalFieldNames are arguments to the 'global' opcode

View Source
var GlobalFields = FieldGroup{
	"global", "Fields",
	GlobalFieldNames[:],
	globalFieldSpecByName,
}

GlobalFields has info on the global opcode's immediate

View Source
var Gt = &GtExpr{}
View Source
var Intc0 = &Intc0Expr{}
View Source
var Intc1 = &Intc1Expr{}
View Source
var Intc2 = &Intc2Expr{}
View Source
var Intc3 = &Intc3Expr{}
View Source
var Itob = &ItobExpr{}
View Source
var ItxnBegin = &ItxnBeginExpr{}
View Source
var ItxnNext = &ItxnNextExpr{}
View Source
var ItxnSettableFields = FieldGroup{
	"itxn_field", "",
	itxnSettableFieldNames(),
	txnFieldSpecByName,
}

ItxnSettableFields collects info for itxn_field opcode

View Source
var ItxnSubmit = &ItxnSubmitExpr{}
View Source
var JSONRefTypes = FieldGroup{
	"json_ref", "Types",
	jsonRefTypeNames[:],
	jsonRefSpecByName,
}

JSONRefTypes describes the json_ref immediate

View Source
var Keccak256 = &Keccak256Expr{}
View Source
var Le = &LtEqExpr{}
View Source
var Len = &LenExpr{}
View Source
var LintRules []LintRule
View Source
var Loads = &LoadsExpr{}
View Source
var Log = &LogExpr{}
View Source
var Lt = &LtExpr{}
View Source
var MinBalanceOp = &MinBalanceExpr{}
View Source
var MinusOp = &MinusExpr{}
View Source
var Modulo = &ModExpr{}
View Source
var Mul = &MulExpr{}
View Source
var Mulw = &MulwExpr{}
View Source
var Neq = &NeqExpr{}
View Source
var Not = &NotExpr{}
View Source
var OnCompletionNames [invalidOnCompletionConst]string

OnCompletionNames is the string names of Txn.OnCompletion, array index is the const value

View Source
var OpArgVals map[NewOpArgType][]opItemArgVal
View Source
var OpCodeAvailabilityInModeRuleInstance = OpCodeAvailabilityInModeRule{}
View Source
var OpCodeVersionCompatibilityCheckRuleInstance = OpCodeVersionCompatibilityCheckRule{}
View Source
var OpValFieldNames map[NewOpArgType]map[int]string
View Source
var Ops = func() *opItems {
	d := &opItems{
		Items: map[string]opItem{},
	}

	for _, info := range opsList {
		c := &docContext{
			appVersion: 1,
			sigVersion: 1,
			args:       []opItemArg{},
		}

		info.Parse(c)

		doc := opDocByName[info.Name]
		extra := opDocExtras[info.Name]

		full := doc
		if extra != "" {
			if full != "" {
				full += "\n"
			}

			full += extra
		}

		var fullnames []string
		{
			var optional bool
			for _, arg := range c.args {
				name := fmt.Sprintf("%s : %s", arg.Type.String(), arg.Name)
				if arg.Array {
					name += ", ..."
				}

				name = "{" + name + "}"

				if arg.Optional {
					if !optional {
						name = "[" + name
					}
				}

				fullnames = append(fullnames, name)
			}

			if optional && len(fullnames) > 0 {
				fullnames[len(fullnames)-1] += "]"
			}
		}

		var shortnames []string
		{
			var optional bool
			for _, arg := range c.args {
				name := arg.Name
				if arg.Array {
					name += ", ..."
				}

				if arg.Optional {
					if !optional {
						optional = true
						name = "[" + name
					}
				}

				shortnames = append(shortnames, name)
			}

			if optional && len(shortnames) > 0 {
				shortnames[len(shortnames)-1] += "]"
			}
		}

		sigargs := strings.Join(shortnames, " ")
		sigfull := fmt.Sprintf("%s %s", info.Name, strings.Join(fullnames, " "))

		d.Items[info.Name] = opItem{
			Name: info.Name,

			SigVersion: c.sigVersion,
			AppVersion: c.appVersion,

			ArgsSig: sigargs,
			FullSig: sigfull,

			Args: c.args,

			Parse: info.Parse,

			Doc:     doc,
			FullDoc: full,
		}
	}

	return d
}()
View Source
var Or = &OrExpr{}
View Source
var PlusOp = &PlusExpr{}
View Source
var Pop = &PopExpr{}
View Source
var Replace3 = &Replace3Expr{}
View Source
var RetSub = &RetSubExpr{}
View Source
var Return = &ReturnExpr{}
View Source
var Select = &SelectExpr{}
View Source
var SetBit = &SetBitExpr{}
View Source
var SetByte = &SetByteExpr{}
View Source
var Sha256 = &Sha256Expr{}
View Source
var Sha3256 = &Sha3256Expr{}
View Source
var Sha512256 = &Sha512256Expr{}
View Source
var ShiftLeft = &ShlExpr{}
View Source
var ShiftRight = &ShrExpr{}
View Source
var Sqrt = &SqrtExpr{}
View Source
var Stores = &StoresExpr{}
View Source
var Substring3 = &Substring3Expr{}
View Source
var SumHash512 = &Sumhash512Expr{}
View Source
var Swap = &SwapExpr{}
View Source
var TxnArrayFields = FieldGroup{
	"txna", "Fields (see [transaction reference](https://developer.algorand.org/docs/reference/transactions/))",
	txnaFieldNames(),
	txnFieldSpecByName,
}

TxnArrayFields narows TxnFields to only have the names of array fetching opcodes

View Source
var TxnFieldNames [invalidTxnField]string

TxnFieldNames are arguments to the 'txn' family of opcodes.

View Source
var TxnFields = FieldGroup{
	"txn", "",
	TxnFieldNames[:],
	txnFieldSpecByName,
}

TxnFields contains info on the arguments to the txn* family of opcodes

View Source
var TxnScalarFields = FieldGroup{
	"txn", "Fields (see [transaction reference](https://developer.algorand.org/docs/reference/transactions/))",
	txnScalarFieldNames(),
	txnFieldSpecByName,
}

TxnScalarFields narrows TxnFields to only have the names of scalar fetching opcodes

TxnTypeNames is the values of Txn.Type in enum order

View Source
var TypeNameDescriptions = map[string]string{
	string(protocol.UnknownTx):         "Unknown type. Invalid transaction",
	string(protocol.PaymentTx):         "Payment",
	string(protocol.KeyRegistrationTx): "KeyRegistration",
	string(protocol.AssetConfigTx):     "AssetConfig",
	string(protocol.AssetTransferTx):   "AssetTransfer",
	string(protocol.AssetFreezeTx):     "AssetFreeze",
	string(protocol.ApplicationCallTx): "ApplicationCall",
}

TypeNameDescriptions contains extra description about a low level protocol transaction Type string, and provide a friendlier type constant name in assembler.

View Source
var VrfStandards = FieldGroup{
	"vrf_verify", "Standards",
	vrfStandardNames[:],
	vrfStandardSpecByName,
}

VrfStandards describes the json_ref immediate

Functions

func Contains

func Contains(r Range, l, ch int) bool

func Overlaps

func Overlaps(a, b Range) bool

func Within

func Within(what, where Range) bool

Types

type AcctParamsField

type AcctParamsField int

AcctParamsField is an enum for `acct_params_get` opcode

const (
	// AcctBalance is the balance, with pending rewards
	AcctBalance AcctParamsField = iota
	// AcctMinBalance is algos needed for this accounts apps and assets
	AcctMinBalance
	// AcctAuthAddr is the rekeyed address if any, else ZeroAddress
	AcctAuthAddr

	// AcctTotalNumUint is the count of all uints from created global apps or opted in locals
	AcctTotalNumUint
	// AcctTotalNumByteSlice is the count of all byte slices from created global apps or opted in locals
	AcctTotalNumByteSlice

	// AcctTotalExtraAppPages is the extra code pages across all apps
	AcctTotalExtraAppPages

	// AcctTotalAppsCreated is the number of apps created by this account
	AcctTotalAppsCreated
	// AcctTotalAppsOptedIn is the number of apps opted in by this account
	AcctTotalAppsOptedIn
	// AcctTotalAssetsCreated is the number of ASAs created by this account
	AcctTotalAssetsCreated
	// AcctTotalAssets is the number of ASAs opted in by this account (always includes AcctTotalAssetsCreated)
	AcctTotalAssets
	// AcctTotalBoxes is the number of boxes created by the app this account is associated with
	AcctTotalBoxes
	// AcctTotalBoxBytes is the number of bytes in all boxes of this app account
	AcctTotalBoxBytes
)

func (AcctParamsField) String

func (i AcctParamsField) String() string

type AcctParamsGetExpr

type AcctParamsGetExpr struct {
	Field AcctParamsField
}

func (*AcctParamsGetExpr) String

func (e *AcctParamsGetExpr) String() string

type AddrExpr

type AddrExpr struct {
	Address string
}

func (*AddrExpr) String

func (e *AddrExpr) String() string

type AddwExpr

type AddwExpr struct{}

func (*AddwExpr) String

func (e *AddwExpr) String() string

type AndExpr

type AndExpr struct {
}

func (*AndExpr) String

func (e *AndExpr) String() string

type AppGlobalDelExpr

type AppGlobalDelExpr struct{}

func (*AppGlobalDelExpr) String

func (e *AppGlobalDelExpr) String() string

type AppGlobalGetExExpr

type AppGlobalGetExExpr struct{}

func (*AppGlobalGetExExpr) String

func (e *AppGlobalGetExExpr) String() string

type AppGlobalGetExpr

type AppGlobalGetExpr struct{}

func (*AppGlobalGetExpr) String

func (e *AppGlobalGetExpr) String() string

type AppGlobalPutExpr

type AppGlobalPutExpr struct{}

func (*AppGlobalPutExpr) String

func (e *AppGlobalPutExpr) String() string

type AppLocalDelExpr

type AppLocalDelExpr struct{}

func (*AppLocalDelExpr) String

func (e *AppLocalDelExpr) String() string

type AppLocalGetExExpr

type AppLocalGetExExpr struct{}

func (*AppLocalGetExExpr) String

func (e *AppLocalGetExExpr) String() string

type AppLocalGetExpr

type AppLocalGetExpr struct{}

func (*AppLocalGetExpr) String

func (e *AppLocalGetExpr) String() string

type AppLocalPutExpr

type AppLocalPutExpr struct{}

func (*AppLocalPutExpr) String

func (e *AppLocalPutExpr) String() string

type AppOptedInExpr

type AppOptedInExpr struct{}

func (*AppOptedInExpr) String

func (e *AppOptedInExpr) String() string

type AppParamsField

type AppParamsField int

AppParamsField is an enum for `app_params_get` opcode

const (
	// AppApprovalProgram AppParams.ApprovalProgram
	AppApprovalProgram AppParamsField = iota
	// AppClearStateProgram AppParams.ClearStateProgram
	AppClearStateProgram
	// AppGlobalNumUint AppParams.StateSchemas.GlobalStateSchema.NumUint
	AppGlobalNumUint
	// AppGlobalNumByteSlice AppParams.StateSchemas.GlobalStateSchema.NumByteSlice
	AppGlobalNumByteSlice
	// AppLocalNumUint AppParams.StateSchemas.LocalStateSchema.NumUint
	AppLocalNumUint
	// AppLocalNumByteSlice AppParams.StateSchemas.LocalStateSchema.NumByteSlice
	AppLocalNumByteSlice
	// AppExtraProgramPages AppParams.ExtraProgramPages
	AppExtraProgramPages

	// AppCreator is not *in* the Params, but it is uniquely determined.
	AppCreator

	// AppAddress is also not *in* the Params, but can be derived
	AppAddress
)

func (AppParamsField) String

func (i AppParamsField) String() string

type AppParamsGetExpr

type AppParamsGetExpr struct {
	Field AppParamsField
}

func (*AppParamsGetExpr) String

func (e *AppParamsGetExpr) String() string

type Arg0Expr

type Arg0Expr struct{}

func (*Arg0Expr) String

func (e *Arg0Expr) String() string

type Arg1Expr

type Arg1Expr struct{}

func (*Arg1Expr) String

func (e *Arg1Expr) String() string

type Arg2Expr

type Arg2Expr struct{}

func (*Arg2Expr) String

func (e *Arg2Expr) String() string

type Arg3Expr

type Arg3Expr struct{}

func (*Arg3Expr) String

func (e *Arg3Expr) String() string

type ArgExpr

type ArgExpr struct {
	Index uint8
}

func (*ArgExpr) String

func (e *ArgExpr) String() string

type ArgsExpr

type ArgsExpr struct{}

func (*ArgsExpr) String

func (e *ArgsExpr) String() string

type AssertExpr

type AssertExpr struct{}

func (*AssertExpr) String

func (e *AssertExpr) String() string

type AssetHoldingField

type AssetHoldingField int

AssetHoldingField is an enum for `asset_holding_get` opcode

const (
	// AssetBalance AssetHolding.Amount
	AssetBalance AssetHoldingField = iota
	// AssetFrozen AssetHolding.Frozen
	AssetFrozen
)

func (AssetHoldingField) String

func (i AssetHoldingField) String() string

type AssetHoldingGetExpr

type AssetHoldingGetExpr struct {
	Field AssetHoldingField
}

func (*AssetHoldingGetExpr) String

func (e *AssetHoldingGetExpr) String() string

type AssetParamsField

type AssetParamsField int

AssetParamsField is an enum for `asset_params_get` opcode

const (
	// AssetTotal AssetParams.Total
	AssetTotal AssetParamsField = iota
	// AssetDecimals AssetParams.Decimals
	AssetDecimals
	// AssetDefaultFrozen AssetParams.AssetDefaultFrozen
	AssetDefaultFrozen
	// AssetUnitName AssetParams.UnitName
	AssetUnitName
	// AssetName AssetParams.AssetName
	AssetName
	// AssetURL AssetParams.URL
	AssetURL
	// AssetMetadataHash AssetParams.MetadataHash
	AssetMetadataHash
	// AssetManager AssetParams.Manager
	AssetManager
	// AssetReserve AssetParams.Reserve
	AssetReserve
	// AssetFreeze AssetParams.Freeze
	AssetFreeze
	// AssetClawback AssetParams.Clawback
	AssetClawback

	// AssetCreator is not *in* the Params, but it is uniquely determined.
	AssetCreator
)

func (AssetParamsField) String

func (i AssetParamsField) String() string

type AssetParamsGetExpr

type AssetParamsGetExpr struct {
	Field AssetParamsField
}

func (*AssetParamsGetExpr) String

func (e *AssetParamsGetExpr) String() string

type BExpr

type BExpr struct {
	Label *LabelExpr
}

func B

func B(l *LabelExpr) *BExpr

func (*BExpr) Labels

func (e *BExpr) Labels() []*LabelExpr

func (*BExpr) String

func (e *BExpr) String() string

type BGtExpr

type BGtExpr struct{}

func (*BGtExpr) String

func (e *BGtExpr) String() string

type BJustBeforeLabelError

type BJustBeforeLabelError struct {
	// contains filtered or unexported fields
}

func (BJustBeforeLabelError) Error

func (e BJustBeforeLabelError) Error() string

func (BJustBeforeLabelError) Line

func (e BJustBeforeLabelError) Line() int

func (BJustBeforeLabelError) Rule

func (e BJustBeforeLabelError) Rule() string

func (BJustBeforeLabelError) Severity

func (BJustBeforeLabelError) Subline

func (e BJustBeforeLabelError) Subline() int

type BalanceExpr

type BalanceExpr struct{}

func (*BalanceExpr) String

func (e *BalanceExpr) String() string

type BandExpr

type BandExpr struct{}

func (*BandExpr) String

func (e *BandExpr) String() string

type Base64DecodeExpr

type Base64DecodeExpr struct {
	Index uint8
}

func (*Base64DecodeExpr) String

func (e *Base64DecodeExpr) String() string

type Base64Encoding

type Base64Encoding int

Base64Encoding is an enum for the `base64decode` opcode

const (
	// URLEncoding represents the base64url encoding defined in https://www.rfc-editor.org/rfc/rfc4648.html
	URLEncoding Base64Encoding = iota
	// StdEncoding represents the standard encoding of the RFC
	StdEncoding
)

func (Base64Encoding) String

func (i Base64Encoding) String() string

type BdivExpr

type BdivExpr struct{}

func (*BdivExpr) String

func (e *BdivExpr) String() string

type BgteqExpr

type BgteqExpr struct{}

func (*BgteqExpr) String

func (e *BgteqExpr) String() string

type BitAndExpr

type BitAndExpr struct{}

func (*BitAndExpr) String

func (e *BitAndExpr) String() string

type BitLenExpr

type BitLenExpr struct{}

func (*BitLenExpr) String

func (e *BitLenExpr) String() string

type BitNotExpr

type BitNotExpr struct{}

func (*BitNotExpr) String

func (e *BitNotExpr) String() string

type BitOrExpr

type BitOrExpr struct{}

func (*BitOrExpr) String

func (e *BitOrExpr) String() string

type BitXorExpr

type BitXorExpr struct{}

func (*BitXorExpr) String

func (e *BitXorExpr) String() string

type BlockExpr

type BlockExpr struct {
	Field BlockField
}

func (*BlockExpr) String

func (e *BlockExpr) String() string

type BlockField

type BlockField int

BlockField is an enum for the `block` opcode

const (
	// BlkSeed is the Block's vrf seed
	BlkSeed BlockField = iota
	// BlkTimestamp is the Block's timestamp, seconds from epoch
	BlkTimestamp
)

func (BlockField) String

func (i BlockField) String() string

type BltExpr

type BltExpr struct{}

func (*BltExpr) String

func (e *BltExpr) String() string

type BminusExpr

type BminusExpr struct{}

func (*BminusExpr) String

func (e *BminusExpr) String() string

type BmulExpr

type BmulExpr struct{}

func (*BmulExpr) String

func (e *BmulExpr) String() string

type BnzExpr

type BnzExpr struct {
	Label *LabelExpr
}

func Bnz

func Bnz(l *LabelExpr) *BnzExpr

func (*BnzExpr) Labels

func (e *BnzExpr) Labels() []*LabelExpr

func (*BnzExpr) String

func (e *BnzExpr) String() string

type BoxCreateExpr

type BoxCreateExpr struct {
}

func (*BoxCreateExpr) String

func (e *BoxCreateExpr) String() string

type BoxDelExpr

type BoxDelExpr struct {
}

func (*BoxDelExpr) String

func (e *BoxDelExpr) String() string

type BoxExtractExpr

type BoxExtractExpr struct {
}

func (*BoxExtractExpr) String

func (e *BoxExtractExpr) String() string

type BoxGetExpr

type BoxGetExpr struct {
}

func (*BoxGetExpr) String

func (e *BoxGetExpr) String() string

type BoxLenExpr

type BoxLenExpr struct {
}

func (*BoxLenExpr) String

func (e *BoxLenExpr) String() string

type BoxPutExpr

type BoxPutExpr struct {
}

func (*BoxPutExpr) String

func (e *BoxPutExpr) String() string

type BoxReplaceExpr

type BoxReplaceExpr struct {
}

func (*BoxReplaceExpr) String

func (e *BoxReplaceExpr) String() string

type BoxResizeExpr

type BoxResizeExpr struct {
}

func (*BoxResizeExpr) String

func (e *BoxResizeExpr) String() string

type BoxSpliceExpr

type BoxSpliceExpr struct {
}

func (*BoxSpliceExpr) String

func (e *BoxSpliceExpr) String() string

type BplusExpr

type BplusExpr struct{}

func (*BplusExpr) String

func (e *BplusExpr) String() string

type BsqrtExpr

type BsqrtExpr struct{}

func (*BsqrtExpr) String

func (e *BsqrtExpr) String() string

type BtoiExpr

type BtoiExpr struct{}

func (*BtoiExpr) String

func (e *BtoiExpr) String() string

type BuryExpr

type BuryExpr struct {
	Depth uint8
}

func (*BuryExpr) String

func (e *BuryExpr) String() string

type ByteExpr

type ByteExpr struct {
	Value  []byte
	Format BytesFormat
}

func StringBytes

func StringBytes(v string) *ByteExpr

func (*ByteExpr) String

func (e *ByteExpr) String() string

type Bytec0Expr

type Bytec0Expr struct{}

func (*Bytec0Expr) String

func (e *Bytec0Expr) String() string

type Bytec1Expr

type Bytec1Expr struct{}

func (*Bytec1Expr) String

func (e *Bytec1Expr) String() string

type Bytec2Expr

type Bytec2Expr struct{}

func (*Bytec2Expr) String

func (e *Bytec2Expr) String() string

type Bytec3Expr

type Bytec3Expr struct{}

func (*Bytec3Expr) String

func (e *Bytec3Expr) String() string

type BytecBlockExpr

type BytecBlockExpr struct {
	Values [][]byte
}

func (*BytecBlockExpr) String

func (e *BytecBlockExpr) String() string

type BytecExpr

type BytecExpr struct {
	Index uint8
}

func (*BytecExpr) String

func (e *BytecExpr) String() string

type Bytes

type Bytes struct {
	Value  []byte
	Format BytesFormat
}

func (Bytes) String

func (e Bytes) String() string

type BytesBitAndExpr

type BytesBitAndExpr struct{}

func (*BytesBitAndExpr) String

func (e *BytesBitAndExpr) String() string

type BytesBitNotExpr

type BytesBitNotExpr struct{}

func (*BytesBitNotExpr) String

func (e *BytesBitNotExpr) String() string

type BytesBitOrExpr

type BytesBitOrExpr struct{}

func (*BytesBitOrExpr) String

func (e *BytesBitOrExpr) String() string

type BytesBitXorExpr

type BytesBitXorExpr struct{}

func (*BytesBitXorExpr) String

func (e *BytesBitXorExpr) String() string

type BytesEqExpr

type BytesEqExpr struct{}

func (*BytesEqExpr) String

func (e *BytesEqExpr) String() string

type BytesFormat

type BytesFormat int

type BytesGeExpr

type BytesGeExpr struct{}

func (*BytesGeExpr) String

func (e *BytesGeExpr) String() string

type BytesLeExpr

type BytesLeExpr struct{}

func (*BytesLeExpr) String

func (e *BytesLeExpr) String() string

type BytesModuloExpr

type BytesModuloExpr struct{}

func (*BytesModuloExpr) String

func (e *BytesModuloExpr) String() string

type BytesNeqExpr

type BytesNeqExpr struct{}

func (*BytesNeqExpr) String

func (e *BytesNeqExpr) String() string

type BytesZeroExpr

type BytesZeroExpr struct{}

func (*BytesZeroExpr) String

func (e *BytesZeroExpr) String() string

type BzExpr

type BzExpr struct {
	Label *LabelExpr
}

func Bz

func Bz(l *LabelExpr) *BzExpr

func (*BzExpr) Labels

func (e *BzExpr) Labels() []*LabelExpr

func (*BzExpr) String

func (e *BzExpr) String() string

type BzeroExpr

type BzeroExpr struct{}

func (*BzeroExpr) String

func (e *BzeroExpr) String() string

type Call

type Call struct {
	Op   *CallSubExpr
	Line int
}

type CallSubExpr

type CallSubExpr struct {
	Label *LabelExpr
}

func CallSub

func CallSub[T Labelled](l T) *CallSubExpr

func (*CallSubExpr) Labels

func (e *CallSubExpr) Labels() []*LabelExpr

func (*CallSubExpr) String

func (e *CallSubExpr) String() string

type CheckBranchJustBeforeLabelRule

type CheckBranchJustBeforeLabelRule struct {
}

func (CheckBranchJustBeforeLabelRule) Desc

func (CheckBranchJustBeforeLabelRule) Id

func (CheckBranchJustBeforeLabelRule) Run

type CheckLoopsRule

type CheckLoopsRule struct{}

func (CheckLoopsRule) Desc

func (r CheckLoopsRule) Desc() string

func (CheckLoopsRule) Id

func (r CheckLoopsRule) Id() string

func (CheckLoopsRule) Run

func (r CheckLoopsRule) Run(l *Linter)

type CheckPragmaRule

type CheckPragmaRule struct{}

func (CheckPragmaRule) Desc

func (r CheckPragmaRule) Desc() string

func (CheckPragmaRule) Id

func (r CheckPragmaRule) Id() string

func (CheckPragmaRule) Run

func (r CheckPragmaRule) Run(l *Linter)

type CommentExpr

type CommentExpr struct {
	Text string
}

func Comment

func Comment(text string) *CommentExpr

func (*CommentExpr) IsNop

func (e *CommentExpr) IsNop()

func (*CommentExpr) String

func (e *CommentExpr) String() string

type ConcatExpr

type ConcatExpr struct{}

func (*ConcatExpr) String

func (e *ConcatExpr) String() string

type CoverExpr

type CoverExpr struct {
	Depth uint8
}

func (*CoverExpr) String

func (e *CoverExpr) String() string

type DecodedInlayHint

type DecodedInlayHint struct {
	T     Token
	Value string
}

type DefineExpr

type DefineExpr struct {
	Name string
}

func (*DefineExpr) IsNop

func (e *DefineExpr) IsNop()

func (*DefineExpr) String

func (e *DefineExpr) String() string

type Diagnostic

type Diagnostic interface {
	Line() int

	Begin() int
	End() int

	String() string
	Severity() DiagnosticSeverity

	Rule() string
}

type DiagnosticSeverity

type DiagnosticSeverity int

func (DiagnosticSeverity) String

func (s DiagnosticSeverity) String() string

type DigExpr

type DigExpr struct {
	Index uint8
}

func (*DigExpr) String

func (e *DigExpr) String() string

type DivExpr

type DivExpr struct{}

func (*DivExpr) String

func (e *DivExpr) String() string

type DivModwExpr

type DivModwExpr struct{}

func (*DivModwExpr) String

func (e *DivModwExpr) String() string

type DivwExpr

type DivwExpr struct{}

func (*DivwExpr) String

func (e *DivwExpr) String() string

type Dup2Expr

type Dup2Expr struct{}

func (*Dup2Expr) String

func (e *Dup2Expr) String() string

type DupExpr

type DupExpr struct{}

func (*DupExpr) Name

func (e *DupExpr) Name() string

func (*DupExpr) String

func (e *DupExpr) String() string

type DupNExpr

type DupNExpr struct {
	Count uint8
}

func (*DupNExpr) String

func (e *DupNExpr) String() string

type DuplicateLabelError

type DuplicateLabelError struct {
	// contains filtered or unexported fields
}

func (DuplicateLabelError) Error

func (e DuplicateLabelError) Error() string

func (DuplicateLabelError) Line

func (e DuplicateLabelError) Line() int

func (DuplicateLabelError) Rule

func (e DuplicateLabelError) Rule() string

func (DuplicateLabelError) Severity

func (DuplicateLabelError) Subline

func (e DuplicateLabelError) Subline() int

type DuplicateLabelsRule

type DuplicateLabelsRule struct {
}

func (DuplicateLabelsRule) Desc

func (r DuplicateLabelsRule) Desc() string

func (DuplicateLabelsRule) Id

func (r DuplicateLabelsRule) Id() string

func (DuplicateLabelsRule) Run

func (r DuplicateLabelsRule) Run(l *Linter)

type ED25519VerifyExpr

type ED25519VerifyExpr struct{}

func (*ED25519VerifyExpr) Name

func (e *ED25519VerifyExpr) Name() string

func (*ED25519VerifyExpr) String

func (e *ED25519VerifyExpr) String() string

type EcAddExpr

type EcAddExpr struct {
	Group EcGroup
}

func (*EcAddExpr) String

func (e *EcAddExpr) String() string

type EcGroup

type EcGroup int

EcGroup is an enum for `ec_` opcodes

const (
	// BN254g1 is the G1 group of BN254
	BN254g1 EcGroup = iota
	// BN254g2 is the G2 group of BN254
	BN254g2
	// BLS12_381g1 specifies the G1 group of BLS 12-381
	BLS12_381g1
	// BLS12_381g2 specifies the G2 group of BLS 12-381
	BLS12_381g2
)

func (EcGroup) String

func (i EcGroup) String() string

type EcMapToExpr

type EcMapToExpr struct {
	Group EcGroup
}

func (*EcMapToExpr) String

func (e *EcMapToExpr) String() string

type EcMultiExpExpr

type EcMultiExpExpr struct {
	Group EcGroup
}

func (*EcMultiExpExpr) String

func (e *EcMultiExpExpr) String() string

type EcMultiScalarMulExpr

type EcMultiScalarMulExpr struct {
	Group EcGroup
}

func (*EcMultiScalarMulExpr) String

func (e *EcMultiScalarMulExpr) String() string

type EcPairingCheckExpr

type EcPairingCheckExpr struct {
	Group EcGroup
}

func (*EcPairingCheckExpr) String

func (e *EcPairingCheckExpr) String() string

type EcScalarMul

type EcScalarMul struct {
	Group EcGroup
}

func (*EcScalarMul) String

func (e *EcScalarMul) String() string

type EcSubgroupCheckExpr

type EcSubgroupCheckExpr struct {
	Group EcGroup
}

func (*EcSubgroupCheckExpr) String

func (e *EcSubgroupCheckExpr) String() string

type EcdsaCurve

type EcdsaCurve int

EcdsaCurve is an enum for `ecdsa_` opcodes

const (
	// Secp256k1 curve for bitcoin/ethereum
	Secp256k1 EcdsaCurve = iota
	// Secp256r1 curve
	Secp256r1
)

func (EcdsaCurve) String

func (i EcdsaCurve) String() string

type EcdsaPkDecompressExpr

type EcdsaPkDecompressExpr struct {
	Index EcdsaCurve
}

func (*EcdsaPkDecompressExpr) String

func (e *EcdsaPkDecompressExpr) String() string

type EcdsaPkRecoverExpr

type EcdsaPkRecoverExpr struct {
	Index EcdsaCurve
}

func (*EcdsaPkRecoverExpr) String

func (e *EcdsaPkRecoverExpr) String() string

type EcdsaVerifyExpr

type EcdsaVerifyExpr struct {
	Index EcdsaCurve
}

func (*EcdsaVerifyExpr) Name

func (e *EcdsaVerifyExpr) Name() string

func (*EcdsaVerifyExpr) String

func (e *EcdsaVerifyExpr) String() string

type Ed25519VerifyBareExpr

type Ed25519VerifyBareExpr struct{}

func (*Ed25519VerifyBareExpr) String

func (e *Ed25519VerifyBareExpr) String() string

type EmptyExpr

type EmptyExpr struct {
}

func (*EmptyExpr) IsNop

func (e *EmptyExpr) IsNop()

func (*EmptyExpr) String

func (e *EmptyExpr) String() string

type EmptyLoopError

type EmptyLoopError struct {
	// contains filtered or unexported fields
}

func (EmptyLoopError) Error

func (e EmptyLoopError) Error() string

func (EmptyLoopError) Line

func (e EmptyLoopError) Line() int

func (EmptyLoopError) Rule

func (e EmptyLoopError) Rule() string

func (EmptyLoopError) Severity

func (e EmptyLoopError) Severity() DiagnosticSeverity

type EqExpr

type EqExpr struct {
}

func (*EqExpr) String

func (e *EqExpr) String() string

type ErrExpr

type ErrExpr struct{}

func (*ErrExpr) IsTerminator

func (e *ErrExpr) IsTerminator()

func (*ErrExpr) String

func (e *ErrExpr) String() string

type ExpExpr

type ExpExpr struct{}

func (*ExpExpr) String

func (e *ExpExpr) String() string

type Expr

type Expr interface {
}

func AssertEq

func AssertEq(a, b Expr) Expr

func AssertInRange

func AssertInRange(expr Expr, a_inclusive uint64, b_exclusive uint64) Expr

func AssertLen

func AssertLen(value Expr, len uint64) Expr

func AssertLtEq

func AssertLtEq(a, b Expr) Expr

func Itxn

func Itxn(exprs ...Expr) Expr

func Minus

func Minus(a, b Expr) Expr

func Plus

func Plus(a, b Expr) Expr

type ExpwExpr

type ExpwExpr struct{}

func (*ExpwExpr) String

func (e *ExpwExpr) String() string

type Extract3Expr

type Extract3Expr struct{}

func (*Extract3Expr) String

func (e *Extract3Expr) String() string

type Extract64BitsExpr

type Extract64BitsExpr struct{}

func (*Extract64BitsExpr) String

func (e *Extract64BitsExpr) String() string

type ExtractExpr

type ExtractExpr struct {
	Start  uint8
	Length uint8
}

func (*ExtractExpr) String

func (e *ExtractExpr) String() string

type ExtractUint16Expr

type ExtractUint16Expr struct{}

func (*ExtractUint16Expr) String

func (e *ExtractUint16Expr) String() string

type ExtractUint32Expr

type ExtractUint32Expr struct{}

func (*ExtractUint32Expr) String

func (e *ExtractUint32Expr) String() string

type ExtractUint64Expr

type ExtractUint64Expr struct{}

func (*ExtractUint64Expr) String

func (e *ExtractUint64Expr) String() string

type FalconVerifyExpr

type FalconVerifyExpr struct{}

func (*FalconVerifyExpr) String

func (e *FalconVerifyExpr) String() string

type FieldGroup

type FieldGroup struct {
	Name  string
	Doc   string
	Names []string
	// contains filtered or unexported fields
}

FieldGroup binds all the info for a field (names, int value, spec access) so they can be attached to opcodes and used by doc generation

func (*FieldGroup) SpecByName

func (fg *FieldGroup) SpecByName(name string) (FieldSpec, bool)

SpecByName returns a FieldsSpec for a name, respecting the "sparseness" of the Names array to hide some names

type FieldSpec

type FieldSpec interface {
	Field() byte
	Type() StackType
	OpVersion() uint64
	Note() string
	Version() uint64
}

FieldSpec unifies the various specs for assembly, disassembly, and doc generation.

type FrameBuryExpr

type FrameBuryExpr struct {
	Index int8
}

func (*FrameBuryExpr) String

func (e *FrameBuryExpr) String() string

type FrameDigExpr

type FrameDigExpr struct {
	Index int8
}

func FrameDig

func FrameDig(index int8) *FrameDigExpr

func (*FrameDigExpr) String

func (e *FrameDigExpr) String() string

type FuncExpr

type FuncExpr struct {
	Label *LabelExpr
	Proto *ProtoExpr
	Block *NestedExpr
}

func (*FuncExpr) Call

func (e *FuncExpr) Call(args ...Expr) Expr

func (*FuncExpr) GetLabel

func (e *FuncExpr) GetLabel() *LabelExpr

type GaidExpr

type GaidExpr struct {
	Group uint8
}

func (*GaidExpr) String

func (e *GaidExpr) String() string

type GaidsExpr

type GaidsExpr struct {
}

func (*GaidsExpr) String

func (e *GaidsExpr) String() string

type GetBitExpr

type GetBitExpr struct{}

func (*GetBitExpr) String

func (e *GetBitExpr) String() string

type GetByteExpr

type GetByteExpr struct{}

func (*GetByteExpr) String

func (e *GetByteExpr) String() string

type GitxnExpr

type GitxnExpr struct {
	Index uint8
	Field TxnField
}

func (*GitxnExpr) String

func (e *GitxnExpr) String() string

type GitxnaExpr

type GitxnaExpr struct {
	Group uint8
	Field TxnField
	Index uint8
}

func (*GitxnaExpr) String

func (e *GitxnaExpr) String() string

type GitxnasExpr

type GitxnasExpr struct {
	Index uint8
	Field TxnField
}

func (*GitxnasExpr) String

func (e *GitxnasExpr) String() string

type GloadExpr

type GloadExpr struct {
	Group uint8
	Index uint8
}

func (*GloadExpr) String

func (e *GloadExpr) String() string

type GloadsExpr

type GloadsExpr struct {
	Index uint8
}

func (*GloadsExpr) String

func (e *GloadsExpr) String() string

type GloadssExpr

type GloadssExpr struct{}

func (*GloadssExpr) String

func (e *GloadssExpr) String() string

type GlobalExpr

type GlobalExpr struct {
	Field GlobalField
}

func Global

func Global(index GlobalField) *GlobalExpr

func (*GlobalExpr) String

func (e *GlobalExpr) String() string

type GlobalField

type GlobalField uint64

GlobalField is an enum for `global` opcode

const (
	// MinTxnFee ConsensusParams.MinTxnFee
	MinTxnFee GlobalField = iota
	// MinBalance ConsensusParams.MinBalance
	MinBalance
	// MaxTxnLife ConsensusParams.MaxTxnLife
	MaxTxnLife
	// ZeroAddress [32]byte{0...}
	ZeroAddress
	// GroupSize len(txn group)
	GroupSize

	// LogicSigVersion ConsensusParams.LogicSigVersion
	LogicSigVersion
	// Round basics.Round
	Round
	// LatestTimestamp uint64
	LatestTimestamp
	// CurrentApplicationID uint64
	CurrentApplicationID

	// CreatorAddress [32]byte
	CreatorAddress

	// CurrentApplicationAddress [32]byte
	CurrentApplicationAddress
	// GroupID [32]byte
	GroupID

	// OpcodeBudget The remaining budget available for execution
	OpcodeBudget

	// CallerApplicationID The ID of the caller app, else 0
	CallerApplicationID

	// CallerApplicationAddress The Address of the caller app, else ZeroAddress
	CallerApplicationAddress

	// AssetCreateMinBalance is the additional minimum balance required to
	// create an asset (which also opts an account into that asset)
	AssetCreateMinBalance

	// AssetOptInMinBalance is the additional minimum balance required to opt in to an asset
	AssetOptInMinBalance
)

func (GlobalField) String

func (i GlobalField) String() string

type GtEqExpr

type GtEqExpr struct {
}

func (*GtEqExpr) String

func (e *GtEqExpr) String() string

type GtExpr

type GtExpr struct {
}

func (*GtExpr) String

func (e *GtExpr) String() string

type GtxnExpr

type GtxnExpr struct {
	Group uint8
	Field TxnField
}

func (*GtxnExpr) String

func (e *GtxnExpr) String() string

type GtxnaExpr

type GtxnaExpr struct {
	Group uint8
	Field TxnField
	Index uint8
}

func (*GtxnaExpr) String

func (e *GtxnaExpr) String() string

type GtxnasExpr

type GtxnasExpr struct {
	Field TxnField
	Index uint8
}

func (*GtxnasExpr) String

func (e *GtxnasExpr) String() string

type GtxnsExpr

type GtxnsExpr struct {
	Field TxnField
}

func Gtxns

func Gtxns(f TxnField) *GtxnsExpr

func (*GtxnsExpr) String

func (e *GtxnsExpr) String() string

type GtxnsaExpr

type GtxnsaExpr struct {
	Field TxnField
	Index uint8
}

func (*GtxnsaExpr) String

func (e *GtxnsaExpr) String() string

type GtxnsasExpr

type GtxnsasExpr struct {
	Field TxnField
}

func (*GtxnsasExpr) String

func (e *GtxnsasExpr) String() string

type ImmArg

type ImmArg struct {
	Name  string
	Array bool
}

type ImmNote

type ImmNote struct {
	Items []ImmArg
}

type InfiniteLoopError

type InfiniteLoopError struct {
	// contains filtered or unexported fields
}

func (InfiniteLoopError) Error

func (e InfiniteLoopError) Error() string

func (InfiniteLoopError) Line

func (e InfiniteLoopError) Line() int

func (InfiniteLoopError) Rule

func (e InfiniteLoopError) Rule() string

func (InfiniteLoopError) Severity

func (InfiniteLoopError) Subline

func (e InfiniteLoopError) Subline() int

type InlayHint

type InlayHint struct {
	Line      int
	Character int
	Label     string
}

type InlayHints

type InlayHints struct {
	Named   []NamedInlayHint
	Decoded []DecodedInlayHint
}

type IntExpr

type IntExpr struct {
	Value uint64
}

func Int

func Int(v uint64) *IntExpr

func (*IntExpr) String

func (e *IntExpr) String() string

type Intc0Expr

type Intc0Expr struct{}

func (*Intc0Expr) String

func (e *Intc0Expr) String() string

type Intc1Expr

type Intc1Expr struct{}

func (*Intc1Expr) String

func (e *Intc1Expr) String() string

type Intc2Expr

type Intc2Expr struct{}

func (*Intc2Expr) String

func (e *Intc2Expr) String() string

type Intc3Expr

type Intc3Expr struct{}

func (*Intc3Expr) String

func (e *Intc3Expr) String() string

type IntcBlockExpr

type IntcBlockExpr struct {
	Values []uint64
}

func (*IntcBlockExpr) String

func (e *IntcBlockExpr) String() string

type IntcExpr

type IntcExpr struct {
	Index uint8
}

func (*IntcExpr) String

func (e *IntcExpr) String() string

type ItobExpr

type ItobExpr struct{}

func (*ItobExpr) String

func (e *ItobExpr) String() string

type ItxnBeginExpr

type ItxnBeginExpr struct{}

func (*ItxnBeginExpr) String

func (e *ItxnBeginExpr) String() string

type ItxnExpr

type ItxnExpr struct {
	Field TxnField
}

func (*ItxnExpr) String

func (e *ItxnExpr) String() string

type ItxnFieldExpr

type ItxnFieldExpr struct {
	Field TxnField
}

func ItxnField

func ItxnField(field TxnField) *ItxnFieldExpr

func (*ItxnFieldExpr) String

func (e *ItxnFieldExpr) String() string

type ItxnNextExpr

type ItxnNextExpr struct{}

func (*ItxnNextExpr) String

func (e *ItxnNextExpr) String() string

type ItxnSubmitExpr

type ItxnSubmitExpr struct{}

func (*ItxnSubmitExpr) String

func (e *ItxnSubmitExpr) String() string

type ItxnaExpr

type ItxnaExpr struct {
	Field TxnField
	Index uint8
}

func (*ItxnaExpr) String

func (e *ItxnaExpr) String() string

type ItxnasExpr

type ItxnasExpr struct {
	Field TxnField
}

func (*ItxnasExpr) String

func (e *ItxnasExpr) String() string

type JSONRefType

type JSONRefType int

JSONRefType is an enum for the `json_ref` opcode

const (
	// JSONString represents string json value
	JSONString JSONRefType = iota
	// JSONUint64 represents uint64 json value
	JSONUint64
	// JSONObject represents json object
	JSONObject
)

func (JSONRefType) String

func (i JSONRefType) String() string

type JsonRefExpr

type JsonRefExpr struct {
	Index uint8
}

func (*JsonRefExpr) String

func (e *JsonRefExpr) String() string

type Keccak256Expr

type Keccak256Expr struct{}

func (*Keccak256Expr) String

func (e *Keccak256Expr) String() string

type LabelExpr

type LabelExpr struct {
	Name string
}

func Label

func Label(name string) *LabelExpr

func (*LabelExpr) GetLabel

func (e *LabelExpr) GetLabel() *LabelExpr

func (*LabelExpr) IsNop

func (e *LabelExpr) IsNop()

func (*LabelExpr) String

func (e *LabelExpr) String() string

type Labelled

type Labelled interface {
	GetLabel() *LabelExpr
}

type LangOp

type LangOp struct {
	Opcode  byte
	Name    string
	Args    string `json:",omitempty"`
	Returns string `json:",omitempty"`
	Size    int

	ArgEnum      []string `json:",omitempty"`
	ArgEnumTypes string   `json:",omitempty"`

	Doc           string
	DocExtra      string `json:",omitempty"`
	ImmediateNote string `json:",omitempty"`
	Version       int
	Groups        []string
}

type LangSpec

type LangSpec struct {
	EvalMaxVersion  int
	LogicSigVersion uint64
	Ops             []LangOp
}

type LenExpr

type LenExpr struct{}

func (*LenExpr) String

func (e *LenExpr) String() string

type Lexer

type Lexer struct {
	Source []byte
	// contains filtered or unexported fields
}

func (*Lexer) Curr

func (z *Lexer) Curr() Token

func (*Lexer) Errors

func (z *Lexer) Errors() []lexerError

func (*Lexer) Return

func (z *Lexer) Return() bool

func (*Lexer) Scan

func (z *Lexer) Scan() bool

type Line

type Line struct {
	Tokens []Token
	Subs   []Subline
}

func (Line) Begin

func (ln Line) Begin() int

func (Line) End

func (ln Line) End() int

func (Line) SublineBegin

func (ln Line) SublineBegin(i int) int

func (Line) SublineByIndex

func (ln Line) SublineByIndex(i int) Subline

func (Line) SublineEnd

func (ln Line) SublineEnd(i int) int

type LineError

type LineError interface {
	error
	Line() int
	Subline() int
	Severity() DiagnosticSeverity
	Rule() string
}

type LineOp

type LineOp struct {
	Line int
	Op   Op
}

type LineRange

type LineRange int

func (LineRange) StartLine

func (r LineRange) StartLine() int

type LintRule

type LintRule interface {
	Id() string
	Desc() string
}

type Linter

type Linter struct {
	// contains filtered or unexported fields
}

func (*Linter) Lint

func (l *Linter) Lint()

type Listing

type Listing []Op

func Compile

func Compile(exprs []Expr) Listing

func (Listing) Optimize

func (l Listing) Optimize() Listing

func (Listing) Reconstruct

func (l Listing) Reconstruct() Program

func (Listing) String

func (l Listing) String() string

type LoadExpr

type LoadExpr struct {
	Index uint8
}

func Load

func Load(index uint8) *LoadExpr

func (*LoadExpr) String

func (e *LoadExpr) String() string

type LoadsExpr

type LoadsExpr struct {
}

func (*LoadsExpr) String

func (e *LoadsExpr) String() string

type LogExpr

type LogExpr struct{}

func (*LogExpr) String

func (e *LogExpr) String() string

type LtEqExpr

type LtEqExpr struct {
}

func (*LtEqExpr) String

func (e *LtEqExpr) String() string

type LtExpr

type LtExpr struct {
}

func (*LtExpr) String

func (e *LtExpr) String() string

type MatchExpr

type MatchExpr struct {
	Targets []*LabelExpr
}

func Match

func Match(labels ...*LabelExpr) *MatchExpr

func (*MatchExpr) Labels

func (e *MatchExpr) Labels() []*LabelExpr

func (*MatchExpr) String

func (e *MatchExpr) String() string

type MethodExpr

type MethodExpr struct {
	Signature string
}

func (*MethodExpr) String

func (e *MethodExpr) String() string

type MinBalanceExpr

type MinBalanceExpr struct{}

func (*MinBalanceExpr) String

func (e *MinBalanceExpr) String() string

type MinusExpr

type MinusExpr struct {
}

func (*MinusExpr) String

func (e *MinusExpr) String() string

type MissingLabelError

type MissingLabelError struct {
	// contains filtered or unexported fields
}

func (MissingLabelError) Error

func (e MissingLabelError) Error() string

func (MissingLabelError) Line

func (e MissingLabelError) Line() int

func (MissingLabelError) Rule

func (e MissingLabelError) Rule() string

func (MissingLabelError) Severity

func (MissingLabelError) Subline

func (e MissingLabelError) Subline() int

type ModExpr

type ModExpr struct{}

func (*ModExpr) String

func (e *ModExpr) String() string

type MulExpr

type MulExpr struct{}

func (*MulExpr) String

func (e *MulExpr) String() string

type MulwExpr

type MulwExpr struct{}

func (*MulwExpr) String

func (e *MulwExpr) String() string

type NamedInlayHint

type NamedInlayHint struct {
	T    Token
	Name string
}

type NeqExpr

type NeqExpr struct {
}

func (*NeqExpr) String

func (e *NeqExpr) String() string

type NestedExpr

type NestedExpr struct {
	Label *LabelExpr
	Body  []Expr
}

func Block

func Block(exprs ...Expr) *NestedExpr

func MatchLabels

func MatchLabels(index Expr, labels ...*LabelExpr) *NestedExpr

type NewOpArgType

type NewOpArgType int

func (NewOpArgType) String

func (t NewOpArgType) String() string

type Nop

type Nop interface {
	IsNop()
}

type NotExpr

type NotExpr struct{}

func (*NotExpr) String

func (e *NotExpr) String() string

type OnCompletionConstType

type OnCompletionConstType transactions.OnCompletion

OnCompletionConstType is the same as transactions.OnCompletion

func (OnCompletionConstType) String

func (i OnCompletionConstType) String() string

type Op

type Op interface {
	fmt.Stringer
}

type OpCodeAvailabilityInModeRule

type OpCodeAvailabilityInModeRule struct {
}

func (OpCodeAvailabilityInModeRule) Desc

func (OpCodeAvailabilityInModeRule) Id

type OpCodeVersionCompatibilityCheckRule

type OpCodeVersionCompatibilityCheckRule struct {
}

func (OpCodeVersionCompatibilityCheckRule) Desc

func (OpCodeVersionCompatibilityCheckRule) Id

type OpContext

type OpContext struct {
	Name    string
	Version uint64
}

type OpsAfterUnconditionalBranchRule

type OpsAfterUnconditionalBranchRule struct {
}

func (OpsAfterUnconditionalBranchRule) Desc

func (OpsAfterUnconditionalBranchRule) Id

func (OpsAfterUnconditionalBranchRule) Run

type OrExpr

type OrExpr struct {
}

func (*OrExpr) String

func (e *OrExpr) String() string

type PlusExpr

type PlusExpr struct {
}

func (*PlusExpr) String

func (e *PlusExpr) String() string

type PopExpr

type PopExpr struct{}

func (*PopExpr) String

func (e *PopExpr) String() string

type PopNExpr

type PopNExpr struct {
	Depth uint8
}

func (*PopNExpr) String

func (e *PopNExpr) String() string

type PragmaExpr

type PragmaExpr struct {
	Version uint64
}

func (*PragmaExpr) IsNop

func (e *PragmaExpr) IsNop()

func (*PragmaExpr) String

func (e *PragmaExpr) String() string

type PragmaVersionAfterInstrError

type PragmaVersionAfterInstrError struct {
	// contains filtered or unexported fields
}

func (PragmaVersionAfterInstrError) Error

func (PragmaVersionAfterInstrError) Line

func (PragmaVersionAfterInstrError) Rule

func (PragmaVersionAfterInstrError) Severity

func (PragmaVersionAfterInstrError) Subline

func (e PragmaVersionAfterInstrError) Subline() int

type ProcessContext

type ProcessContext interface {
	// contains filtered or unexported methods
}

type ProcessResult

type ProcessResult struct {
	Mode RunMode

	Version      uint64
	VersionToken *Token
	Versions     []RequiredVersion

	Diagnostics []Diagnostic

	MissRefs   []Token
	Symbols    []Symbol
	SymbolRefs []Token

	Tokens     []Token
	Listing    []Op
	Sublisting [][]Op
	Lines      []Line

	Ops []Token

	Numbers  []Token
	Strings  []Token
	Keywords []Token
	Macros   []Token

	Redundants []RedundantLine

	RefCounts map[string]int
	Defines   map[string]bool
}

func Process

func Process(source string) *ProcessResult

func (ProcessResult) ArgAt

func (r ProcessResult) ArgAt(l int, ch int) (opItemArg, int, bool)

func (ProcessResult) ArgFieldName

func (r ProcessResult) ArgFieldName(t NewOpArgType, v int) string

func (ProcessResult) ArgVals

func (r ProcessResult) ArgVals(arg opItemArg) []opItemArgVal

func (ProcessResult) ArgValsAt

func (r ProcessResult) ArgValsAt(l int, ch int) []opItemArgVal

func (ProcessResult) DocAt

func (r ProcessResult) DocAt(l int, ch int) string

func (ProcessResult) InlayHints

func (r ProcessResult) InlayHints(rg Range) InlayHints

func (ProcessResult) SymByName

func (r ProcessResult) SymByName(name string) []Symbol

func (ProcessResult) SymOrRefAt

func (r ProcessResult) SymOrRefAt(rg Range) string

func (ProcessResult) SymRefByName

func (r ProcessResult) SymRefByName(name string) []Token

func (ProcessResult) SymbolRefsWithin

func (r ProcessResult) SymbolRefsWithin(rg Range) []Token

func (ProcessResult) SymbolsForRefWithin

func (r ProcessResult) SymbolsForRefWithin(rg Range) []Symbol

func (ProcessResult) SymbolsWithin

func (r ProcessResult) SymbolsWithin(rg Range) []Symbol

type Program

type Program []Expr

func (Program) Compile

func (p Program) Compile(c *compiler) Listing

func (Program) String

func (p Program) String() string

type ProtoExpr

type ProtoExpr struct {
	Args    uint8
	Results uint8
}

func Proto

func Proto(args uint8, results uint8) *ProtoExpr

func (*ProtoExpr) String

func (e *ProtoExpr) String() string

type PushBytesExpr

type PushBytesExpr struct {
	Value  []byte
	Format BytesFormat
}

func (*PushBytesExpr) String

func (e *PushBytesExpr) String() string

type PushBytessExpr

type PushBytessExpr struct {
	Bytess [][]byte
}

func (*PushBytessExpr) String

func (e *PushBytessExpr) String() string

type PushIntExpr

type PushIntExpr struct {
	Value uint64
}

func (*PushIntExpr) String

func (e *PushIntExpr) String() string

type PushIntsExpr

type PushIntsExpr struct {
	Ints []uint64
}

func (*PushIntsExpr) String

func (e *PushIntsExpr) String() string

type Range

type Range interface {
	StartLine() int
	StartCharacter() int
	EndLine() int
	EndCharacter() int
}

type RedundantBLine

type RedundantBLine struct {
	// contains filtered or unexported fields
}

func (RedundantBLine) Line

func (l RedundantBLine) Line() int

func (RedundantBLine) String

func (l RedundantBLine) String() string

func (RedundantBLine) Subline

func (l RedundantBLine) Subline() int

type RedundantLabelLine

type RedundantLabelLine struct {
	// contains filtered or unexported fields
}

func (RedundantLabelLine) Line

func (l RedundantLabelLine) Line() int

func (RedundantLabelLine) String

func (l RedundantLabelLine) String() string

func (RedundantLabelLine) Subline

func (l RedundantLabelLine) Subline() int

type RedundantLine

type RedundantLine interface {
	Line() int
	Subline() int
	String() string
}

type Replace2Expr

type Replace2Expr struct {
	Start uint8
}

func (*Replace2Expr) String

func (e *Replace2Expr) String() string

type Replace3Expr

type Replace3Expr struct{}

func (*Replace3Expr) String

func (e *Replace3Expr) String() string

type RequiredVersion

type RequiredVersion struct {
	Line  int
	Begin int
	End   int

	Version uint64
}

func (RequiredVersion) EndCharacter

func (v RequiredVersion) EndCharacter() int

func (RequiredVersion) EndLine

func (v RequiredVersion) EndLine() int

func (RequiredVersion) StartCharacter

func (v RequiredVersion) StartCharacter() int

func (RequiredVersion) StartLine

func (v RequiredVersion) StartLine() int

type RetSubExpr

type RetSubExpr struct{}

func (*RetSubExpr) IsTerminator

func (e *RetSubExpr) IsTerminator()

func (*RetSubExpr) String

func (e *RetSubExpr) String() string

type ReturnExpr

type ReturnExpr struct {
}

func (*ReturnExpr) IsTerminator

func (e *ReturnExpr) IsTerminator()

func (*ReturnExpr) String

func (e *ReturnExpr) String() string

type RunMode

type RunMode uint64
const (
	// ModeSig is LogicSig execution
	ModeSig RunMode = 1 << iota

	// ModeApp is application/contract execution
	ModeApp

	// local constant, run in any mode
	ModeAny = ModeSig | ModeApp
)

func (RunMode) String

func (m RunMode) String() string

type SelectExpr

type SelectExpr struct{}

func (*SelectExpr) String

func (e *SelectExpr) String() string

type SemanticToken

type SemanticToken struct {
	Line      int
	Index     int
	Length    int
	Type      int
	Modifiers int
}

type SemanticTokens

type SemanticTokens []SemanticToken

func (SemanticTokens) Encode

func (t SemanticTokens) Encode() []uint32

func (SemanticTokens) Len

func (t SemanticTokens) Len() int

func (SemanticTokens) Less

func (t SemanticTokens) Less(i, j int) bool

func (SemanticTokens) Swap

func (t SemanticTokens) Swap(i, j int)

type SetBitExpr

type SetBitExpr struct{}

func (*SetBitExpr) String

func (e *SetBitExpr) String() string

type SetByteExpr

type SetByteExpr struct{}

func (*SetByteExpr) String

func (e *SetByteExpr) String() string

type Sha256Expr

type Sha256Expr struct{}

func (*Sha256Expr) Name

func (e *Sha256Expr) Name() string

func (*Sha256Expr) String

func (e *Sha256Expr) String() string

type Sha3256Expr

type Sha3256Expr struct{}

func (*Sha3256Expr) String

func (e *Sha3256Expr) String() string

type Sha512256Expr

type Sha512256Expr struct{}

func (*Sha512256Expr) String

func (e *Sha512256Expr) String() string

type ShlExpr

type ShlExpr struct{}

func (*ShlExpr) String

func (e *ShlExpr) String() string

type ShrExpr

type ShrExpr struct{}

func (*ShrExpr) String

func (e *ShrExpr) String() string

type SignatureInlayHint

type SignatureInlayHint struct {
	Line  int
	Start int
	End   int

	Signature string
}

type SqrtExpr

type SqrtExpr struct{}

func (*SqrtExpr) String

func (e *SqrtExpr) String() string

type StackType

type StackType byte
const (
	// StackNone in an OpSpec shows that the op pops or yields nothing
	StackNone StackType = iota

	// StackAny in an OpSpec shows that the op pops or yield any type
	StackAny

	// StackUint64 in an OpSpec shows that the op pops or yields a uint64
	StackUint64

	// StackBytes in an OpSpec shows that the op pops or yields a []byte
	StackBytes

	StackAddress

	StackBytes32

	StackBoolean
)

type StackTypes

type StackTypes []StackType

StackTypes is an alias for a list of StackType with syntactic sugar

type StoreExpr

type StoreExpr struct {
	Index uint8
}

func Store

func Store(index uint8) *StoreExpr

func (*StoreExpr) String

func (e *StoreExpr) String() string

type StoresExpr

type StoresExpr struct {
}

func (*StoresExpr) String

func (e *StoresExpr) String() string

type Subline

type Subline struct {
	Tokens []Token
}

func (Subline) ImmAt

func (sln Subline) ImmAt(pos int) (Token, int, bool)

type Substring3Expr

type Substring3Expr struct{}

func (*Substring3Expr) String

func (e *Substring3Expr) String() string

type SubstringExpr

type SubstringExpr struct {
	Start uint8
	End   uint8
}

func (*SubstringExpr) String

func (e *SubstringExpr) String() string

type Sumhash512Expr

type Sumhash512Expr struct{}

func (*Sumhash512Expr) String

func (e *Sumhash512Expr) String() string

type SwapExpr

type SwapExpr struct{}

func (*SwapExpr) String

func (e *SwapExpr) String() string

type SwitchExpr

type SwitchExpr struct {
	Targets []*LabelExpr
}

func Switch

func Switch(labels ...*LabelExpr) *SwitchExpr

func (*SwitchExpr) Labels

func (e *SwitchExpr) Labels() []*LabelExpr

func (*SwitchExpr) String

func (e *SwitchExpr) String() string

type Symbol

type Symbol interface {
	Name() string
	Line() int
	Begin() int
	End() int

	StartLine() int
	StartCharacter() int

	EndLine() int
	EndCharacter() int

	Docs() string
	Signature() string
}

type Terminator

type Terminator interface {
	IsTerminator()
}

type Token

type Token struct {
	// contains filtered or unexported fields
}

func (Token) Begin

func (t Token) Begin() int

func (Token) End

func (t Token) End() int

func (Token) EndCharacter

func (t Token) EndCharacter() int

func (Token) EndLine

func (t Token) EndLine() int

func (Token) IsSeparator

func (t Token) IsSeparator() bool

func (Token) Line

func (t Token) Line() int

func (Token) StartCharacter

func (t Token) StartCharacter() int

func (Token) StartLine

func (t Token) StartLine() int

func (Token) String

func (t Token) String() string

func (Token) Type

func (t Token) Type() TokenType

type TokenType

type TokenType string

type TxnExpr

type TxnExpr struct {
	Field TxnField
}

func Txn

func Txn(f TxnField) *TxnExpr

func (*TxnExpr) String

func (e *TxnExpr) String() string

type TxnField

type TxnField int

TxnField is an enum type for `txn` and `gtxn`

const (
	// Sender Transaction.Sender
	Sender TxnField = iota
	// Fee Transaction.Fee
	Fee
	// FirstValid Transaction.FirstValid
	FirstValid
	// FirstValidTime timestamp of block(FirstValid-1)
	FirstValidTime
	// LastValid Transaction.LastValid
	LastValid
	// Note Transaction.Note
	Note
	// Lease Transaction.Lease
	Lease
	// Receiver Transaction.Receiver
	Receiver
	// Amount Transaction.Amount
	Amount
	// CloseRemainderTo Transaction.CloseRemainderTo
	CloseRemainderTo
	// VotePK Transaction.VotePK
	VotePK
	// SelectionPK Transaction.SelectionPK
	SelectionPK
	// VoteFirst Transaction.VoteFirst
	VoteFirst
	// VoteLast Transaction.VoteLast
	VoteLast
	// VoteKeyDilution Transaction.VoteKeyDilution
	VoteKeyDilution
	// Type Transaction.Type
	Type
	// TypeEnum int(Transaction.Type)
	TypeEnum
	// XferAsset Transaction.XferAsset
	XferAsset
	// AssetAmount Transaction.AssetAmount
	AssetAmount
	// AssetSender Transaction.AssetSender
	AssetSender
	// AssetReceiver Transaction.AssetReceiver
	AssetReceiver
	// AssetCloseTo Transaction.AssetCloseTo
	AssetCloseTo
	// GroupIndex i for txngroup[i] == Txn
	GroupIndex
	// TxID Transaction.ID()
	TxID
	// ApplicationID basics.AppIndex
	ApplicationID
	// OnCompletion OnCompletion
	OnCompletion
	// ApplicationArgs  [][]byte
	ApplicationArgs
	// NumAppArgs len(ApplicationArgs)
	NumAppArgs
	// Accounts []basics.Address
	Accounts
	// NumAccounts len(Accounts)
	NumAccounts
	// ApprovalProgram []byte
	ApprovalProgram
	// ClearStateProgram []byte
	ClearStateProgram
	// RekeyTo basics.Address
	RekeyTo
	// ConfigAsset basics.AssetIndex
	ConfigAsset
	// ConfigAssetTotal AssetParams.Total
	ConfigAssetTotal
	// ConfigAssetDecimals AssetParams.Decimals
	ConfigAssetDecimals
	// ConfigAssetDefaultFrozen AssetParams.AssetDefaultFrozen
	ConfigAssetDefaultFrozen
	// ConfigAssetUnitName AssetParams.UnitName
	ConfigAssetUnitName
	// ConfigAssetName AssetParams.AssetName
	ConfigAssetName
	// ConfigAssetURL AssetParams.URL
	ConfigAssetURL
	// ConfigAssetMetadataHash AssetParams.MetadataHash
	ConfigAssetMetadataHash
	// ConfigAssetManager AssetParams.Manager
	ConfigAssetManager
	// ConfigAssetReserve AssetParams.Reserve
	ConfigAssetReserve
	// ConfigAssetFreeze AssetParams.Freeze
	ConfigAssetFreeze
	// ConfigAssetClawback AssetParams.Clawback
	ConfigAssetClawback
	//FreezeAsset  basics.AssetIndex
	FreezeAsset
	// FreezeAssetAccount basics.Address
	FreezeAssetAccount
	// FreezeAssetFrozen bool
	FreezeAssetFrozen
	// Assets []basics.AssetIndex
	Assets
	// NumAssets len(ForeignAssets)
	NumAssets
	// Applications []basics.AppIndex
	Applications
	// NumApplications len(ForeignApps)
	NumApplications

	// GlobalNumUint uint64
	GlobalNumUint
	// GlobalNumByteSlice uint64
	GlobalNumByteSlice
	// LocalNumUint uint64
	LocalNumUint
	// LocalNumByteSlice uint64
	LocalNumByteSlice

	// ExtraProgramPages AppParams.ExtraProgramPages
	ExtraProgramPages

	// Nonparticipation Transaction.Nonparticipation
	Nonparticipation

	// Logs Transaction.ApplyData.EvalDelta.Logs
	Logs

	// NumLogs len(Logs)
	NumLogs

	// CreatedAssetID Transaction.ApplyData.EvalDelta.ConfigAsset
	CreatedAssetID

	// CreatedApplicationID Transaction.ApplyData.EvalDelta.ApplicationID
	CreatedApplicationID

	// LastLog Logs[len(Logs)-1]
	LastLog

	// StateProofPK Transaction.StateProofPK
	StateProofPK

	// ApprovalProgramPages [][]byte
	ApprovalProgramPages

	// NumApprovalProgramPages = len(ApprovalProgramPages) // 4096
	NumApprovalProgramPages

	// ClearStateProgramPages [][]byte
	ClearStateProgramPages

	// NumClearStateProgramPages = len(ClearStateProgramPages) // 4096
	NumClearStateProgramPages
)

func (TxnField) String

func (i TxnField) String() string

type TxnaExpr

type TxnaExpr struct {
	Field TxnField
	Index uint8
}

func Arg

func Arg(index uint8) *TxnaExpr

func Txna

func Txna(f TxnField, i uint8) *TxnaExpr

func (*TxnaExpr) String

func (e *TxnaExpr) String() string

type TxnasExpr

type TxnasExpr struct {
	Field TxnField
}

func (*TxnasExpr) String

func (e *TxnasExpr) String() string

type UncoverExpr

type UncoverExpr struct {
	Depth uint8
}

func Cover

func Cover(index uint8) *UncoverExpr

func Uncover

func Uncover(index uint8) *UncoverExpr

func (*UncoverExpr) String

func (e *UncoverExpr) String() string

type UnreachableCodeError

type UnreachableCodeError struct {
	// contains filtered or unexported fields
}

func (UnreachableCodeError) Error

func (e UnreachableCodeError) Error() string

func (UnreachableCodeError) Line

func (e UnreachableCodeError) Line() int

func (UnreachableCodeError) Rule

func (e UnreachableCodeError) Rule() string

func (UnreachableCodeError) Severity

func (UnreachableCodeError) Subline

func (e UnreachableCodeError) Subline() int

type UnusedLabelError

type UnusedLabelError struct {
	// contains filtered or unexported fields
}

func (UnusedLabelError) Error

func (e UnusedLabelError) Error() string

func (*UnusedLabelError) Line

func (e *UnusedLabelError) Line() int

func (UnusedLabelError) Rule

func (e UnusedLabelError) Rule() string

func (UnusedLabelError) Severity

func (e UnusedLabelError) Severity() DiagnosticSeverity

func (*UnusedLabelError) Subline

func (e *UnusedLabelError) Subline() int

type UnusedLabelsRule

type UnusedLabelsRule struct {
}

func (UnusedLabelsRule) Desc

func (r UnusedLabelsRule) Desc() string

func (UnusedLabelsRule) Id

func (r UnusedLabelsRule) Id() string

func (UnusedLabelsRule) Run

func (r UnusedLabelsRule) Run(l *Linter)

type VrfStandard

type VrfStandard int

VrfStandard is an enum for the `vrf_verify` opcode

const (
	// VrfAlgorand is the built-in VRF of the Algorand chain
	VrfAlgorand VrfStandard = iota
)

func (VrfStandard) String

func (i VrfStandard) String() string

type VrfVerifyExpr

type VrfVerifyExpr struct {
	Field VrfStandard
}

func (*VrfVerifyExpr) String

func (e *VrfVerifyExpr) String() string

Directories

Path Synopsis
cmd
debug
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL