_struct

package
v0.0.0-...-43dd9f0 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20TransferEvent

type ERC20TransferEvent struct {
	Contract string `json:"contract"`
	From     string `json:"from"`
	To       string `json:"to"`
	Value    string `json:"value"`
}

func GetERC20TransferEvent

func GetERC20TransferEvent(logs []*ETHLog) []*ERC20TransferEvent

type ERC721TransferEvent

type ERC721TransferEvent struct {
	Contract string `json:"contract"`
	From     string `json:"from"`
	To       string `json:"to"`
	Value    string `json:"value"`
}

func GetERC721TransferEvent

func GetERC721TransferEvent(logs []*ETHLog) []*ERC721TransferEvent

type ETHBlock

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

type ETHBlockNumber

type ETHBlockNumber struct {
	Result string `json:"result"`
}

type ETHLog

type ETHLog struct {
	Address          string   `json:"address"`
	BlockHash        string   `json:"blockHash"`
	BlockNumber      string   `json:"blockNumber"`
	Data             string   `json:"data"`
	LogIndex         string   `json:"logIndex"`
	Removed          bool     `json:"removed"`
	Topics           []string `json:"topics"`
	TransactionHash  string   `json:"transactionHash"`
	TransactionIndex string   `json:"transactionIndex"`
}

type ETHResult

type ETHResult struct {
	JsonRpc string `json:"jsonrpc"`
	Id      string `json:"id"`
}

type ETHResultBlock

type ETHResultBlock struct {
	ETHResult
	Result *ETHBlock `json:"result"`
}

type ETHResultBlockNumber

type ETHResultBlockNumber struct {
	ETHResult
	ETHBlockNumber
}

type ETHResultTransactionByHash

type ETHResultTransactionByHash struct {
	ETHResult
	Result *ETHTransaction `json:"result"`
}

type ETHResultTransactionReceipt

type ETHResultTransactionReceipt struct {
	ETHResult
	Result *ETHTransactionReceipt `json:"result"`
}

type ETHRpc

type ETHRpc struct {
	Id      string      `json:"id"`
	Method  string      `json:"method"`
	JsonRpc string      `json:"jsonrpc"`
	Params  interface{} `json:"params"`
}

func ETHRpcBlockNumber

func ETHRpcBlockNumber() *ETHRpc

func ETHRpcBlockV1

func ETHRpcBlockV1(number uint64, full bool) *ETHRpc

func ETHRpcBlockV2

func ETHRpcBlockV2(number string, full bool) *ETHRpc

func ETHRpcTransactionByHash

func ETHRpcTransactionByHash(tx string) *ETHRpc

func ETHRpcTransactionReceipt

func ETHRpcTransactionReceipt(txs []string) *ETHRpc

type ETHTransaction

type ETHTransaction struct {
	BlockHash        string `json:"blockHash"`
	BlockNumber      string `json:"blockNumber"`
	From             string `json:"from"`
	Gas              string `json:"gas"`
	GasPrice         string `json:"gasPrice"`
	Hash             string `json:"hash"`
	Input            string `json:"input"`
	Nonce            string `json:"nonce"`
	To               string `json:"to"`
	TransactionIndex string `json:"transactionIndex"`
	Value            string `json:"value"`
	Type             string `json:"type"`
	V                string `json:"v"`
	R                string `json:"r"`
	S                string `json:"s"`
}

type ETHTransactionReceipt

type ETHTransactionReceipt struct {
	BlockHash         string    `json:"blockHash"`
	BlockNumber       string    `json:"blockNumber"`
	ContractAddress   string    `json:"contractAddress"`
	CumulativeGasUsed string    `json:"cumulativeGasUsed"`
	From              string    `json:"from"`
	GasUsed           string    `json:"gasUsed"`
	Logs              []*ETHLog `json:"logs"`
	LogsBloom         string    `json:"logsBloom"`
	Status            string    `json:"status"`
	To                string    `json:"to"`
	TransactionHash   string    `json:"transactionHash"`
	TransactionIndex  string    `json:"transactionIndex"`
	Type              string    `json:"type"`
}

type Error

type Error struct {
	Description string
}
var NotSupportError *Error

func (*Error) Error

func (this *Error) Error() string

type Page

type Page struct {
	TotalCount uint64      `json:"totalCount"`
	TotalPage  uint64      `json:"totalPage"`
	PageSize   uint64      `json:"pageSize"`
	Page       uint64      `json:"page"`
	Data       interface{} `json:"data"`
}

type ResV1

type ResV1 struct {
	Code uint64      `json:"code"`
	Msg  string      `json:"msg"`
	Ts   uint64      `json:"ts"`
	Data interface{} `json:"data"`
}

func ResV1FailV1

func ResV1FailV1() *ResV1

func ResV1FailV2

func ResV1FailV2(msg string) *ResV1

func ResV1FailV3

func ResV1FailV3(msg string, data interface{}) *ResV1

func ResV1SuccessV1

func ResV1SuccessV1() *ResV1

func ResV1SuccessV2

func ResV1SuccessV2(data interface{}) *ResV1

func ResV1V1

func ResV1V1(code uint64, msg string, data interface{}) *ResV1

Jump to

Keyboard shortcuts

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