blocks

package
v0.0.0-...-e4e12f0 Latest Latest
Warning

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

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

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

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

type JSONClause

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

type JSONCollapsedBlock

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

type JSONEmbeddedTx

type JSONEmbeddedTx struct {
	ID           workshare.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       workshare.Address   `json:"origin"`
	Delegator    *workshare.Address  `json:"delegator"`
	Nonce        math.HexOrDecimal64 `json:"nonce"`
	DependsOn    *workshare.Bytes32  `json:"dependsOn"`
	Size         uint32              `json:"size"`

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

type JSONEvent

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

type JSONExpandedBlock

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

type JSONOutput

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

type JSONTransfer

type JSONTransfer struct {
	Sender    workshare.Address     `json:"sender"`
	Recipient workshare.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