chainrpc

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceChange

type BalanceChange struct {
	Address         string `json:"address"`
	ContractAddress string `json:"contractAddress"`
	Change          string `json:"change"`
}

type BasicChainHandler

type BasicChainHandler interface {
	GetHeight(ctx context.Context) (string, error)
	GetBalance(ctx context.Context, address, contractAddress, blockNumber string) (string, error)
	SendTx(ctx context.Context, signedHex string) (string, error)
	CheckTx(ctx context.Context, hash string) (*TxResult, error)
	CallContract(ctx context.Context, contractAddress, params, blockNumber string) ([]byte, error)
	InquireChain(ctx context.Context, instruction, params string) (string, error)
}

type BasicEvmTx

type BasicEvmTx struct {
	Hash    string `json:"hash"`
	From    string `json:"from"`
	To      string `json:"to"`
	Payload string `json:"input"`
}

type EvmLog

type EvmLog struct {
	Address     string `json:"address"`
	Topics      string `json:"topics"`
	Data        string `json:"data"`
	BlockNumber uint64 `json:"blockNumber"`
	TxHash      string `json:"txHash,omitempty"`
}

func (*EvmLog) String

func (in *EvmLog) String() string

type TokenInfo

type TokenInfo struct {
	Name     string `json:"name"`
	Symbol   string `json:"symbol"`
	Decimals string `json:"decimals"`
}

type Transfer

type Transfer struct {
	Sender          string `json:"sender"`
	Recipient       string `json:"recipient"`
	Amount          string `json:"amount"`
	ContractAddress string `json:"contractAddress"`
	Memo            string `json:"memo,omitempty"`
}

type TxResult

type TxResult struct {
	Status  string   `json:"status"`
	Height  string   `json:"height"`
	Time    string   `json:"time"`
	GasUsed string   `json:"gasUsed"`
	ErrMsg  string   `json:"errMsg"`
	Logs    []EvmLog `json:"logs,omitempty"`
}

type TxTransfers

type TxTransfers struct {
	Hash          string           `json:"hash"`
	Rejected      bool             `json:"rejected"`
	ErrMsg        string           `json:"errMsg"`
	Transfers     []*Transfer      `json:"transfers"`
	BalanceChange []*BalanceChange `json:"balanceChange"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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