blocks

package
v1.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: LGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blocks

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

func New

func New(repo *chain.Repository) *Blocks

func (*Blocks) Mount

func (b *Blocks) Mount(root *mux.Router, pathPrefix string)

type JSONBlockSummary added in v1.3.2

type JSONBlockSummary struct {
	Number       uint32       `json:"number"`
	ID           thor.Bytes32 `json:"id"`
	Size         uint32       `json:"size"`
	ParentID     thor.Bytes32 `json:"parentID"`
	Timestamp    uint64       `json:"timestamp"`
	GasLimit     uint64       `json:"gasLimit"`
	Beneficiary  thor.Address `json:"beneficiary"`
	GasUsed      uint64       `json:"gasUsed"`
	TotalScore   uint64       `json:"totalScore"`
	TxsRoot      thor.Bytes32 `json:"txsRoot"`
	TxsFeatures  uint32       `json:"txsFeatures"`
	StateRoot    thor.Bytes32 `json:"stateRoot"`
	ReceiptsRoot thor.Bytes32 `json:"receiptsRoot"`
	Signer       thor.Address `json:"signer"`
	IsTrunk      bool         `json:"isTrunk"`
}

type JSONClause added in v1.3.2

type JSONClause struct {
	To    *thor.Address        `json:"to"`
	Value math.HexOrDecimal256 `json:"value"`
	Data  string               `json:"data"`
}

type JSONCollapsedBlock added in v1.3.2

type JSONCollapsedBlock struct {
	*JSONBlockSummary
	Transactions []thor.Bytes32 `json:"transactions"`
}

type JSONEmbeddedTx added in v1.3.2

type JSONEmbeddedTx struct {
	ID           thor.Bytes32        `json:"id"`
	ChainTag     byte                `json:"chainTag"`
	BlockRef     string              `json:"blockRef"`
	Expiration   uint32              `json:"expiration"`
	Clauses      []*JSONClause       `json:"clauses"`
	GasPriceCoef uint8               `json:"gasPriceCoef"`
	Gas          uint64              `json:"gas"`
	Origin       thor.Address        `json:"origin"`
	Delegator    *thor.Address       `json:"delegator"`
	Nonce        math.HexOrDecimal64 `json:"nonce"`
	DependsOn    *thor.Bytes32       `json:"dependsOn"`
	Size         uint32              `json:"size"`

	// receipt part
	GasUsed  uint64                `json:"gasUsed"`
	GasPayer thor.Address          `json:"gasPayer"`
	Paid     *math.HexOrDecimal256 `json:"paid"`
	Reward   *math.HexOrDecimal256 `json:"reward"`
	Reverted bool                  `json:"reverted"`
	Outputs  []*JSONOutput         `json:"outputs"`
}

type JSONEvent added in v1.3.2

type JSONEvent struct {
	Address thor.Address   `json:"address"`
	Topics  []thor.Bytes32 `json:"topics"`
	Data    string         `json:"data"`
}

type JSONExpandedBlock added in v1.3.2

type JSONExpandedBlock struct {
	*JSONBlockSummary
	Transactions []*JSONEmbeddedTx `json:"transactions"`
}

type JSONOutput added in v1.3.2

type JSONOutput struct {
	ContractAddress *thor.Address   `json:"contractAddress"`
	Events          []*JSONEvent    `json:"events"`
	Transfers       []*JSONTransfer `json:"transfers"`
}

type JSONTransfer added in v1.3.2

type JSONTransfer struct {
	Sender    thor.Address          `json:"sender"`
	Recipient thor.Address          `json:"recipient"`
	Amount    *math.HexOrDecimal256 `json:"amount"`
}

Jump to

Keyboard shortcuts

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