Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// Name of the Contract.
// Can be inferred from its metadata, if it implements TZIP-16 (TODO).
Name string
// Micheline script of the contract.
Micheline string
// Callable Entrypoints of the Contract.
Entrypoints []*Entrypoint
// Getters are TZIP-4 views (which should not be confused with Hangzhou views).
// Although they are entrypoints, they require to be handled differently from
// regular entrypoints.
Getters []*Getter
// Type of the Contract's Storage.
Storage *Struct
// Bigmaps referenced in the Contract's Storage.
Bigmaps []any
}
type Entrypoint ¶
type Entrypoint struct {
Name string
Raw *micheline.Entrypoint `json:"-"`
Params []*Struct
}
type Getter ¶
type Getter struct {
Entrypoint
ReturnType *Struct
}
Getter is a read-only Entrypoint, with a return value. It is implemented with TZIP-4.
type Struct ¶
type Struct struct {
Name string
MichelineType string
Fields []*Struct
Type *Struct
OriginalType string
Key *Struct
Value *Struct
ParamType *Struct
ReturnType *Struct
LeftType *Struct
RightType *Struct
Path [][]int
// If true, the expected prim matching to this struct has a flat structure,
// instead of a tree of pairs.
Flat bool
}
Struct is an aggregation of named fields. It corresponds to non-top-level `pair` prims, in Michelson. It can represent either a parameter's type of entrypoint, or a record in a storage type.
Click to show internal directories.
Click to hide internal directories.