Documentation
¶
Index ¶
- type ABI
- type ABICustomSerializers
- type AliasDeclaration
- type AliasRef
- type ArrayOf
- type BitsN
- type CellOf
- type Declaration
- type DeclarationKind
- type DefaultValue
- type EnumDeclaration
- type EnumMember
- type EnumRef
- type Field
- type Generic
- type GetMethod
- type IncomingExternal
- type IncomingMessage
- type IntN
- type Kind
- type LispListOf
- type MapKV
- type Nullable
- type OutgoingMessage
- type Parameter
- type Prefix
- type ShapedTuple
- type Storage
- type String
- type StructDeclaration
- type StructRef
- type Tensor
- type ThrownError
- type Ty
- func NewAddressAnyType() Ty
- func NewAddressExtType() Ty
- func NewAddressOptType() Ty
- func NewAddressType() Ty
- func NewAliasType(name string, typeArgs ...Ty) Ty
- func NewBitsNType(n int) Ty
- func NewBoolType() Ty
- func NewCellOfType(of Ty) Ty
- func NewCellType() Ty
- func NewCoinsType() Ty
- func NewEnumType(name string) Ty
- func NewGenericType(nameT string) Ty
- func NewIntNType(n int) Ty
- func NewMapType(key, value Ty) Ty
- func NewNullableType(of Ty) Ty
- func NewRemainingType() Ty
- func NewStructType(name string, typeArgs ...Ty) Ty
- func NewTensorType(of ...Ty) Ty
- func NewTupleWithType(of ...Ty) Ty
- func NewUIntNType(n int) Ty
- func NewUnionType(prefixLen int, prefixEatIntPlace bool, variants ...UnionVariant) Ty
- func NewVarInt16Type() Ty
- func NewVarInt32Type() Ty
- func NewVarIntType(n int) Ty
- func NewVarUInt16Type() Ty
- func NewVarUInt32Type() Ty
- func NewVarUIntType(n int) Ty
- type TyKind
- type UintN
- type Union
- type UnionVariant
- type Unknown
- type VarIntN
- type VarUintN
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"`
OutgoingMessages []OutgoingMessage `json:"outgoingMessages"`
EmittedMessages []OutgoingMessage `json:"emittedEvents"`
GetMethods []GetMethod `json:"getMethods"`
ThrownErrors []ThrownError `json:"thrownErrors"`
Storage Storage `json:"storage,omitempty"`
CompilerName string `json:"compilerName"`
CompilerVersion string `json:"compilerVersion"`
CodeBoc64 string `json:"codeBoc64"`
CodeHashes []string `json:"codeHashes,omitempty"`
}
func MustParseABI ¶
func (*ABI) GetGolangContractName ¶
func (*ABI) GetGolangNamespace ¶
type ABICustomSerializers ¶ added in v1.22.0
type AliasDeclaration ¶
type AliasDeclaration struct {
Name string `json:"name"`
TargetTy Ty `json:"targetTy"`
TypeParams []string `json:"typeParams,omitempty"`
CustomPackUnpack ABICustomSerializers `json:"customPackUnpack"`
}
type Declaration ¶
type Declaration struct {
SumType DeclarationKind `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 DeclarationKind ¶ added in v1.22.0
type DeclarationKind string
const ( DeclarationKindStruct DeclarationKind = "Struct" DeclarationKindAlias DeclarationKind = "Alias" DeclarationKindEnum DeclarationKind = "Enum" )
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"`
CustomPackUnpack ABICustomSerializers `json:"customPackUnpack"`
}
type EnumMember ¶
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 (GetMethod) GolangFunctionName ¶
func (GetMethod) UsedByIntrospection ¶
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 LispListOf ¶ added in v1.22.0
type LispListOf 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 ShapedTuple ¶ added in v1.22.0
type ShapedTuple struct {
Items []Ty `json:"items"`
}
type Storage ¶ added in v1.22.0
type Storage struct {
StorageTy *Ty `json:"storageTy,omitempty"`
}
Storage describes the on-chain persistent storage layout of a contract.
type StructDeclaration ¶
type StructDeclaration struct {
Name string `json:"name"`
TypeParams []string `json:"typeParams,omitempty"`
Prefix *Prefix `json:"prefix,omitempty"`
Fields []Field `json:"fields"`
CustomPackUnpack ABICustomSerializers `json:"customPackUnpack"`
}
type ThrownError ¶
type Ty ¶
type Ty struct {
SumType string `json:"kind"`
IntN *IntN
UintN *UintN
VarIntN *VarIntN
BitsN *BitsN
Nullable *Nullable
CellOf *CellOf
ArrayOf *ArrayOf
LispListOf *LispListOf
Tensor *Tensor
ShapedTuple *ShapedTuple
MapKV *MapKV
EnumRef *EnumRef
StructRef *StructRef
AliasRef *AliasRef
Generic *Generic
Union *Union
VarUintN *VarUintN
}
func NewAddressAnyType ¶
func NewAddressAnyType() Ty
func NewAddressExtType ¶
func NewAddressExtType() Ty
func NewAddressOptType ¶
func NewAddressOptType() Ty
func NewAddressType ¶
func NewAddressType() Ty
func NewAliasType ¶
func NewBitsNType ¶
func NewBoolType ¶
func NewBoolType() Ty
func NewCellOfType ¶
func NewCellType ¶
func NewCellType() Ty
func NewCoinsType ¶
func NewCoinsType() Ty
func NewEnumType ¶
func NewGenericType ¶
func NewIntNType ¶
func NewMapType ¶
func NewNullableType ¶
func NewRemainingType ¶
func NewRemainingType() Ty
func NewStructType ¶
func NewTensorType ¶
func NewTupleWithType ¶
func NewUIntNType ¶
func NewUnionType ¶
func NewUnionType(prefixLen int, prefixEatIntPlace bool, variants ...UnionVariant) Ty
func NewVarInt16Type ¶
func NewVarInt16Type() Ty
func NewVarInt32Type ¶
func NewVarInt32Type() Ty
func NewVarIntType ¶
func NewVarUInt16Type ¶
func NewVarUInt16Type() Ty
func NewVarUInt32Type ¶
func NewVarUInt32Type() Ty
func NewVarUIntType ¶
func (*Ty) GetFixedSize ¶
func (Ty) InstantiateGenerics ¶ added in v1.22.0
InstantiateGenerics replaces all generic Ts (typeParams) with instantiation (typeArgs) recursively. Example: `(int, T, Wrapper<T?>)` and T=coins => `(int, coins, Wrapper<coins?>)` A new struct is returned
func (*Ty) MarshalJSON ¶
func (*Ty) UnmarshalJSON ¶
type TyKind ¶ added in v1.22.0
type TyKind = string
const ( TyKindInt TyKind = "int" TyKindIntN TyKind = "intN" TyKindUintN TyKind = "uintN" TyKindVarIntN TyKind = "varintN" TyKindVarUintN TyKind = "varuintN" TyKindCoins TyKind = "coins" TyKindBool TyKind = "bool" TyKindCell TyKind = "cell" TyKindBuilder TyKind = "builder" TyKindSlice TyKind = "slice" TyKindString TyKind = "string" TyKindRemaining TyKind = "remaining" TyKindAddress TyKind = "address" TyKindAddressOpt TyKind = "addressOpt" TyKindAddressExt TyKind = "addressExt" TyKindAddressAny TyKind = "addressAny" TyKindBitsN TyKind = "bitsN" TyKindNullLiteral TyKind = "nullLiteral" TyKindCallable TyKind = "callable" TyKindVoid TyKind = "void" TyKindUnknown TyKind = "unknown" TyKindNullable TyKind = "nullable" TyKindCellOf TyKind = "cellOf" TyKindArrayOf TyKind = "arrayOf" TyKindLispListOf TyKind = "lispListOf" TyKindTensor TyKind = "tensor" TyKindShapedTuple TyKind = "shapedTuple" TyKindMapKV TyKind = "mapKV" TyKindEnumRef TyKind = "EnumRef" TyKindStructRef TyKind = "StructRef" TyKindAliasRef TyKind = "AliasRef" TyKindGenericT TyKind = "genericT" TyKindUnion TyKind = "union" )
type Union ¶
type Union struct {
Variants []UnionVariant `json:"variants"`
StackWidth int `json:"stackWidth"`
}
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
Click to show internal directories.
Click to hide internal directories.