common

package
v0.0.0-...-623e10f Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyString   = &decError{"empty hex string"}
	ErrSyntax        = &decError{"invalid hex string"}
	ErrMissingPrefix = &decError{"hex string without 0x prefix"}
	ErrOddLength     = &decError{"hex string of odd length"}
	ErrEmptyNumber   = &decError{"hex string \"0x\""}
	ErrLeadingZero   = &decError{"hex number with leading zero digits"}
	ErrUint64Range   = &decError{"hex number > 64 bits"}
	ErrUintRange     = &decError{fmt.Sprintf("hex number > %d bits", uintBits)}
	ErrBig256Range   = &decError{"hex number > 256 bits"}
)

Errors

Functions

func DecodeUint64

func DecodeUint64(input string) (uint64, error)

DecodeUint64 decodes a hex string with 0x prefix as a quantity.

func EncodeUint64

func EncodeUint64(i uint64) string

EncodeUint64 encodes i as a hex string with 0x prefix.

Types

type Block

type Block struct {
	Number          string   `bson:"number" json:"number"`
	Timestamp       string   `bson:"timestamp" json:"timestamp"`
	Transactions    []string `bson:"transactions" json:"transactions"`
	Hash            string   `bson:"hash" json:"hash"`
	ParentHash      string   `bson:"parentHash" json:"parentHash"`
	Sha3Uncles      string   `bson:"sha3Uncles" json:"sha3Uncles"`
	Miner           string   `bson:"miner" json:"miner"`
	Difficulty      string   `bson:"difficulty" json:"difficulty"`
	TotalDifficulty string   `bson:"totalDifficulty" json:"totalDifficulty"`
	Size            string   `bson:"size" json:"size"`
	GasUsed         string   `bson:"gasUsed" json:"gasUsed"`
	GasLimit        string   `bson:"gasLimit" json:"gasLimit"`
	Nonce           string   `bson:"nonce" json:"nonce"`
	Uncles          []string `bson:"uncles" json:"uncles"`
	ExtraData       string   `bson:"extraData" json:"extraData"`
	LogsBloom       string   `bson:"logsBloom" json:"logsBloom"`
	MixHash         string   `bson:"mixHash" json:"mixHash"`
	ReceiptsRoot    string   `bson:"receiptsRoot" json:"receiptsRoot"`
	StateRoot       string   `bson:"stateRoot" json:"stateRoot"`
	TransactionRoot string   `bson:"transactionsRoot" json:"transactionsRoot"`
}

Jump to

Keyboard shortcuts

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