blocks

package
v0.0.0-...-83a01c7 Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 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           luckyshare.Bytes32 `json:"id"`
	Size         uint32             `json:"size"`
	ParentID     luckyshare.Bytes32 `json:"parentID"`
	Timestamp    uint64             `json:"timestamp"`
	GasLimit     uint64             `json:"gasLimit"`
	Beneficiary  luckyshare.Address `json:"beneficiary"`
	GasUsed      uint64             `json:"gasUsed"`
	TotalScore   uint64             `json:"totalScore"`
	TxsRoot      luckyshare.Bytes32 `json:"txsRoot"`
	TxsFeatures  uint32             `json:"txsFeatures"`
	StateRoot    luckyshare.Bytes32 `json:"stateRoot"`
	ReceiptsRoot luckyshare.Bytes32 `json:"receiptsRoot"`
	Signer       luckyshare.Address `json:"signer"`
	IsTrunk      bool               `json:"isTrunk"`
}

type JSONClause

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

type JSONCollapsedBlock

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

type JSONEmbeddedTx

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

	// receipt part
	GasUsed  uint64                `json:"gasUsed"`
	GasPayer luckyshare.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 luckyshare.Address   `json:"address"`
	Topics  []luckyshare.Bytes32 `json:"topics"`
	Data    string               `json:"data"`
}

type JSONExpandedBlock

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

type JSONOutput

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

type JSONTransfer

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