v106

package
v1.4.1-patch.1 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "compute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteTxPosition

type AbsoluteTxPosition struct {
	// BlockHeight is the block the contract was created at
	BlockHeight int64
	// TxIndex is a monotonic counter within the block (actual transaction index, or gas consumed)
	TxIndex uint64
}

AbsoluteTxPosition can be used to sort contracts

type Code

type Code struct {
	CodeID     uint64   `json:"code_id"`
	CodeInfo   CodeInfo `json:"code_info"`
	CodesBytes []byte   `json:"code_bytes"`
}

Code struct encompasses CodeInfo and CodeBytes

type CodeInfo

type CodeInfo struct {
	CodeHash []byte         `json:"code_hash"`
	Creator  sdk.AccAddress `json:"creator"`
	Source   string         `json:"source"`
	Builder  string         `json:"builder"`
}

CodeInfo is data for the uploaded contract WASM code

type Contract

type Contract struct {
	ContractAddress    sdk.AccAddress     `json:"contract_address"`
	ContractInfo       ContractInfo       `json:"contract_info"`
	ContractState      []Model            `json:"contract_state"`
	ContractCustomInfo ContractCustomInfo `json:"contract_custom_info"`
}

Contract struct encompasses ContractAddress, ContractInfo, and ContractState

type ContractCustomInfo

type ContractCustomInfo struct {
	EnclaveKey []byte `json:"enclave_key"`
	Label      string `json:"label"`
}

ContractInfo stores a WASM contract instance

type ContractInfo

type ContractInfo struct {
	CodeID  uint64              `json:"code_id"`
	Creator sdk.AccAddress      `json:"creator"`
	Label   string              `json:"label"`
	Created *AbsoluteTxPosition `json:"created,omitempty"`
}

ContractInfo stores a WASM contract instance

type GenesisState

type GenesisState struct {
	Codes     []Code     `json:"codes,omitempty"`
	Contracts []Contract `json:"contracts,omitempty"`
	Sequences []Sequence `json:"sequences,omitempty"`
}

GenesisState is the struct representation of the export genesis

type Model

type Model struct {
	// hex-encode key to read it better (this is often ascii)
	Key tmBytes.HexBytes `json:"key"`
	// base64-encode raw value
	Value []byte `json:"val"`
}

Model is a struct that holds a KV pair

type Sequence

type Sequence struct {
	IDKey []byte `json:"id_key"`
	Value uint64 `json:"value"`
}

Jump to

Keyboard shortcuts

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