blocks

package
v0.0.0-...-71e40f4 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: LGPL-3.0 Imports: 18 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(chain *chain.Chain) *Blocks

func (*Blocks) Mount

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

type CommitteeMember

type CommitteeMember struct {
	Index uint32 `json:"index"`
	// Name    string `json:"name"`
	NetAddr string `json:"netAddr"`
	PubKey  string `json:"pubKey"`
}

type JSONBlockSummary

type JSONBlockSummary struct {
	Number           uint32             `json:"number"`
	ID               meter.Bytes32      `json:"id"`
	Size             uint32             `json:"size"`
	ParentID         meter.Bytes32      `json:"parentID"`
	Timestamp        uint64             `json:"timestamp"`
	GasLimit         uint64             `json:"gasLimit"`
	Beneficiary      meter.Address      `json:"beneficiary"`
	GasUsed          uint64             `json:"gasUsed"`
	TotalScore       uint64             `json:"totalScore"`
	TxsRoot          meter.Bytes32      `json:"txsRoot"`
	TxsFeatures      uint32             `json:"txsFeatures"`
	StateRoot        meter.Bytes32      `json:"stateRoot"`
	ReceiptsRoot     meter.Bytes32      `json:"receiptsRoot"`
	Signer           meter.Address      `json:"signer"`
	IsTrunk          bool               `json:"isTrunk"`
	IsKBlock         bool               `json:"isKBlock"`
	LastKBlockHeight uint32             `json:"lastKBlockHeight"`
	CommitteeInfo    []*CommitteeMember `json:"committee"`
	QC               *QC                `json:"qc"`
	Nonce            uint64             `json:"nonce"`
	Epoch            uint64             `json:"epoch"`
	KblockData       []string           `json:"kblockData"`
	PowBlocks        []*JSONPowBlock    `json:"powBlocks"`
}

type JSONClause

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

type JSONCollapsedBlock

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

type JSONEmbeddedTx

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

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

type JSONEpoch

type JSONEpoch struct {
	EpochID   uint64          `json:"epochID"`
	Number    uint32          `json:"number"`
	PowBlocks []*JSONPowBlock `json:"powBlocks"`
	Nonce     uint64          `json:"nonce"`
}

type JSONEvent

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

type JSONExpandedBlock

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

type JSONOutput

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

type JSONPowBlock

type JSONPowBlock struct {
	Hash        string `json:"hash"`
	PrevBlock   string `json:"prevBlock"`
	Beneficiary string `json:"beneficiary"`
	Height      uint32 `json:"height"`
}

type JSONTransfer

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

type QC

type QC struct {
	QCHeight         uint32 `json:"qcHeight"`
	QCRound          uint32 `json:"qcRound"`
	VoterBitArrayStr string `json:"voterBitArrayStr"`
	EpochID          uint64 `json:"epochID"`
}

Jump to

Keyboard shortcuts

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