parser

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABI

type ABI struct {
	Namespace        string            `json:"namespace"`
	ContractName     string            `json:"contractName"`
	InheritsContract string            `json:"inheritsContract,omitempty"`
	Author           string            `json:"author,omitempty"`
	Version          string            `json:"version,omitempty"`
	Description      string            `json:"description,omitempty"`
	Declarations     []Declaration     `json:"declarations"`
	IncomingMessages []IncomingMessage `json:"incomingMessages"`
	IncomingExternal *IncomingExternal `json:"incomingExternal,omitempty"`
	OutgoingMessages []OutgoingMessage `json:"outgoingMessages"`
	EmittedMessages  []OutgoingMessage `json:"emittedEvents"`
	GetMethods       []GetMethod       `json:"getMethods"`
	ThrownErrors     []ThrownError     `json:"thrownErrors"`
	CompilerName     string            `json:"compilerName"`
	CompilerVersion  string            `json:"compilerVersion"`
	CodeBoc64        string            `json:"codeBoc64"`
	CodeHashes       []string          `json:"codeHashes,omitempty"`
}

func MustParseABI

func MustParseABI(data []byte) ABI

func (*ABI) GetGolangContractName

func (a *ABI) GetGolangContractName() string

func (*ABI) GetGolangNamespace

func (a *ABI) GetGolangNamespace() string

type Address

type Address struct{}

type AddressAny

type AddressAny struct{}

type AddressExt

type AddressExt struct{}

type AddressOpt

type AddressOpt struct {
}

type AliasDeclaration

type AliasDeclaration struct {
	Name                  string   `json:"name"`
	TargetTy              Ty       `json:"targetTy"`
	TypeParams            []string `json:"typeParams,omitempty"`
	CustomPackToBuilder   bool     `json:"customPackToBuilder,omitempty"`
	CustomUnpackFromSlice bool     `json:"customUnpackFromSlice,omitempty"`
}

type AliasRef

type AliasRef struct {
	AliasName string `json:"aliasName"`
	TypeArgs  []Ty   `json:"typeArgs,omitempty"`
}

type BitsN

type BitsN struct {
	N int `json:"n"`
}

type Bool

type Bool struct{}

type Builder

type Builder struct{}

type Callable

type Callable struct{}

type Cell

type Cell struct{}

type CellOf

type CellOf struct {
	Inner Ty `json:"inner"`
}

type Coins

type Coins struct {
}

type Declaration

type Declaration struct {
	SumType           string  `json:"kind"`
	PayloadType       *string `json:"payloadType,omitempty"` // todo: think abt naming
	StructDeclaration StructDeclaration
	AliasDeclaration  AliasDeclaration
	EnumDeclaration   EnumDeclaration
}

func (Declaration) MarshalJSON

func (d Declaration) MarshalJSON() ([]byte, error)

func (*Declaration) UnmarshalJSON

func (d *Declaration) UnmarshalJSON(b []byte) error

type DefaultValue

type DefaultValue struct {
	SumType         string `json:"kind"`
	IntDefaultValue struct {
		V string `json:"v"`
	}
	BoolDefaultValue struct {
		V bool `json:"v"`
	}
	SliceDefaultValue struct {
		Hex string `json:"hex"`
	}
	AddressDefaultValue struct {
		Address string `json:"addr"`
	}
	TensorDefaultValue struct {
		Items []DefaultValue `json:"items"`
	}
	NullDefaultValue struct{}
}

func (*DefaultValue) MarshalJSON

func (d *DefaultValue) MarshalJSON() ([]byte, error)

func (*DefaultValue) UnmarshalJSON

func (d *DefaultValue) UnmarshalJSON(b []byte) error

type EnumDeclaration

type EnumDeclaration struct {
	Name      string       `json:"name"`
	EncodedAs Ty           `json:"encodedAs"`
	Members   []EnumMember `json:"members"`
}

type EnumMember

type EnumMember struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type EnumRef

type EnumRef struct {
	EnumName string `json:"enumName"`
}

type Field

type Field struct {
	Name         string        `json:"name"`
	IsPayload    *bool         `json:"isPayload,omitempty"`
	Ty           Ty            `json:"ty"`
	DefaultValue *DefaultValue `json:"defaultValue,omitempty"`
	Description  string        `json:"description,omitempty"`
}

type Generic

type Generic struct {
	NameT string `json:"nameT"`
}

type GetMethod

type GetMethod struct {
	TvmMethodID int         `json:"tvmMethodId"`
	Name        string      `json:"name"`
	Parameters  []Parameter `json:"parameters"`
	ReturnTy    Ty          `json:"returnTy"`
	Description string      `json:"description,omitempty"`
}

func (GetMethod) FullResultName

func (g GetMethod) FullResultName(contractName string) string

func (GetMethod) GolangFunctionName

func (g GetMethod) GolangFunctionName() string

func (GetMethod) UsedByIntrospection

func (g GetMethod) UsedByIntrospection() bool

type IncomingExternal

type IncomingExternal struct {
	BodyTy      Ty     `json:"bodyTy"`
	Description string `json:"description,omitempty"`
}

func (*IncomingExternal) GetMsgName

func (m *IncomingExternal) GetMsgName() (string, error)

type IncomingMessage

type IncomingMessage struct {
	BodyTy            Ty       `json:"bodyTy"`
	MinimalMsgValue   *big.Int `json:"minimalMsgValue,omitempty"`
	Description       string   `json:"description,omitempty"`
	PreferredSendMode int16    `json:"preferredSendMode,omitempty"`
}

func (*IncomingMessage) GetMsgName

func (m *IncomingMessage) GetMsgName() (string, error)

type Int

type Int struct{}

type IntN

type IntN struct {
	N int `json:"n"`
}

type Kind

type Kind struct {
	Kind string `json:"kind"`
}

type Map

type Map struct {
	K Ty `json:"k"`
	V Ty `json:"v"`
}

type NullLiteral

type NullLiteral struct{}

type Nullable

type Nullable struct {
	Inner Ty `json:"inner"`
}

type OutgoingMessage

type OutgoingMessage struct {
	BodyTy      Ty     `json:"bodyTy"`
	Description string `json:"description,omitempty"`
}

func (*OutgoingMessage) GetMsgName

func (m *OutgoingMessage) GetMsgName() (string, error)

type Parameter

type Parameter struct {
	Name string `json:"name"`
	Ty   Ty     `json:"ty"`
}

type Prefix

type Prefix struct {
	PrefixStr string `json:"prefixStr"`
	PrefixLen int    `json:"prefixLen"`
}

type Remaining

type Remaining struct{}

type Slice

type Slice struct{}

type StructDeclaration

type StructDeclaration struct {
	Name       string   `json:"name"`
	TypeParams []string `json:"typeParams,omitempty"`
	Prefix     *Prefix  `json:"prefix,omitempty"`
	Fields     []Field  `json:"fields"`
}

type StructRef

type StructRef struct {
	StructName string `json:"structName"`
	TypeArgs   []Ty   `json:"typeArgs,omitempty"`
}

type Tensor

type Tensor struct {
	Items []Ty `json:"items"`
}

type ThrownError

type ThrownError struct {
	Name    string `json:"constName"`
	ErrCode int    `json:"errCode"`
}

type TupleAny

type TupleAny struct{}

type TupleWith

type TupleWith struct {
	Items []Ty `json:"items"`
}

type Ty

type Ty struct {
	SumType     string `json:"kind"`
	Int         *Int
	IntN        *IntN
	UintN       *UintN
	VarIntN     *VarIntN
	VarUintN    *VarUintN
	BitsN       *BitsN
	Coins       *Coins
	Bool        *Bool
	Cell        *Cell
	Slice       *Slice
	Builder     *Builder
	Callable    *Callable
	Remaining   *Remaining
	Address     *Address
	AddressOpt  *AddressOpt
	AddressExt  *AddressExt
	AddressAny  *AddressAny
	Nullable    *Nullable
	CellOf      *CellOf
	Tensor      *Tensor
	TupleWith   *TupleWith
	Map         *Map
	EnumRef     *EnumRef
	AliasRef    *AliasRef
	StructRef   *StructRef
	Generic     *Generic
	Union       *Union
	TupleAny    *TupleAny
	NullLiteral *NullLiteral
	Void        *Void
}

func NewAddressAnyType

func NewAddressAnyType() Ty

func NewAddressExtType

func NewAddressExtType() Ty

func NewAddressOptType

func NewAddressOptType() Ty

func NewAddressType

func NewAddressType() Ty

func NewAliasType

func NewAliasType(name string, typeArgs ...Ty) Ty

func NewBitsNType

func NewBitsNType(n int) Ty

func NewBoolType

func NewBoolType() Ty

func NewCellOfType

func NewCellOfType(of Ty) Ty

func NewCellType

func NewCellType() Ty

func NewCoinsType

func NewCoinsType() Ty

func NewEnumType

func NewEnumType(name string) Ty

func NewGenericType

func NewGenericType(nameT string) Ty

func NewIntNType

func NewIntNType(n int) Ty

func NewMapType

func NewMapType(key, value Ty) Ty

func NewNullableType

func NewNullableType(of Ty) Ty

func NewRemainingType

func NewRemainingType() Ty

func NewStructType

func NewStructType(name string, typeArgs ...Ty) Ty

func NewTensorType

func NewTensorType(of ...Ty) Ty

func NewTupleWithType

func NewTupleWithType(of ...Ty) Ty

func NewUIntNType

func NewUIntNType(n int) Ty

func NewUnionType

func NewUnionType(prefixLen int, prefixEatIntPlace bool, variants ...UnionVariant) Ty

func NewVarInt16Type

func NewVarInt16Type() Ty

func NewVarInt32Type

func NewVarInt32Type() Ty

func NewVarIntType

func NewVarIntType(n int) Ty

func NewVarUInt16Type

func NewVarUInt16Type() Ty

func NewVarUInt32Type

func NewVarUInt32Type() Ty

func NewVarUIntType

func NewVarUIntType(n int) Ty

func (*Ty) GetFixedSize

func (t *Ty) GetFixedSize() (int, bool)

func (*Ty) MarshalJSON

func (t *Ty) MarshalJSON() ([]byte, error)

func (*Ty) UnmarshalJSON

func (t *Ty) UnmarshalJSON(b []byte) error

type UintN

type UintN struct {
	N int `json:"n"`
}

type Union

type Union struct {
	Variants []UnionVariant `json:"variants"`
}

type UnionVariant

type UnionVariant struct {
	PrefixStr        string `json:"prefixStr"`
	PrefixLen        int    `json:"prefixLen"`
	PrefixEatInPlace bool   `json:"prefixEatInPlace,omitempty"`
	VariantTy        Ty     `json:"variantTy"`
}

func NewUnionVariant

func NewUnionVariant(variant Ty, prefixValue string) UnionVariant

type VarIntN

type VarIntN struct {
	N int `json:"n"`
}

type VarUintN

type VarUintN struct {
	N int `json:"n"`
}

type Void

type Void struct{}

Jump to

Keyboard shortcuts

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