service

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS = 0
	FAIL    = 1
)

Variables

This section is empty.

Functions

func NewApi

func NewApi(blockchain int64, cluster []*config.NodeCluster, xlog *xlog.XLog) blockchain.API

func NewApis

func NewApis(clusters map[int64][]*config.NodeCluster, xlog *xlog.XLog) map[int64]blockchain.API

func NewExApi added in v0.5.3

func NewExApi(clusters map[int64][]*config.NodeCluster, xlog *xlog.XLog) map[int64]blockchain.ExApi

func NewNftApi added in v0.5.1

func NewNftApi(blockchain int64, cluster []*config.NodeCluster, xlog *xlog.XLog) blockchain.NftApi

func NewNftApis added in v0.5.1

func NewNftApis(clusters map[int64][]*config.NodeCluster, xlog *xlog.XLog) map[int64]blockchain.NftApi

Types

type HttpHandler

type HttpHandler struct {
	// contains filtered or unexported fields
}

func NewHttpHandler

func NewHttpHandler(cluster map[int64][]*config.NodeCluster, kafkaCfg *config.Kafka, xlog *xlog.XLog) *HttpHandler

func (*HttpHandler) BalanceOf added in v0.5.1

func (h *HttpHandler) BalanceOf(ctx *gin.Context)

func (*HttpHandler) Error

func (h *HttpHandler) Error(c *gin.Context, req string, path string, err string)

func (*HttpHandler) EstimateGas added in v0.5.2

func (h *HttpHandler) EstimateGas(ctx *gin.Context)

EstimateGas Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.

func (*HttpHandler) EstimateGas1 added in v0.5.2

func (h *HttpHandler) EstimateGas1(ctx *gin.Context)

EstimateGas1 Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.

func (*HttpHandler) EstimateGasForTron added in v0.5.3

func (h *HttpHandler) EstimateGasForTron(ctx *gin.Context)

EstimateGasForTron ,for only tron

func (*HttpHandler) GasPrice added in v0.5.2

func (h *HttpHandler) GasPrice(ctx *gin.Context)

GasPrice Returns the current price per gas in wei.

func (*HttpHandler) GasPrice1 added in v0.5.2

func (h *HttpHandler) GasPrice1(ctx *gin.Context)

GasPrice1 Returns the current price per gas in wei.

func (*HttpHandler) GetAccountResource added in v0.5.3

func (h *HttpHandler) GetAccountResource(ctx *gin.Context)

GetAccountResource ,for only tron

func (*HttpHandler) GetBalance

func (h *HttpHandler) GetBalance(ctx *gin.Context)

func (*HttpHandler) GetBalance1 added in v0.5.2

func (h *HttpHandler) GetBalance1(ctx *gin.Context)

func (*HttpHandler) GetBlockByHash

func (h *HttpHandler) GetBlockByHash(ctx *gin.Context)

func (*HttpHandler) GetBlockByHash1 added in v0.5.2

func (h *HttpHandler) GetBlockByHash1(ctx *gin.Context)

func (*HttpHandler) GetBlockByNumber

func (h *HttpHandler) GetBlockByNumber(ctx *gin.Context)

func (*HttpHandler) GetBlockByNumber1 added in v0.5.2

func (h *HttpHandler) GetBlockByNumber1(ctx *gin.Context)

func (*HttpHandler) GetLatestBlock

func (h *HttpHandler) GetLatestBlock(ctx *gin.Context)

func (*HttpHandler) GetLatestBlock1 added in v0.5.2

func (h *HttpHandler) GetLatestBlock1(ctx *gin.Context)

func (*HttpHandler) GetNonce

func (h *HttpHandler) GetNonce(ctx *gin.Context)

GetNonce todo 仅适用于 ether,tron 暂不支持

func (*HttpHandler) GetNonce1 added in v0.5.2

func (h *HttpHandler) GetNonce1(ctx *gin.Context)

GetNonce1 todo 仅适用于 ether,tron 暂不支持

func (*HttpHandler) GetTokenBalance

func (h *HttpHandler) GetTokenBalance(ctx *gin.Context)

GetTokenBalance ERC20协议代币余额,后期补充

func (*HttpHandler) GetTokenBalance1 added in v0.5.2

func (h *HttpHandler) GetTokenBalance1(ctx *gin.Context)

GetTokenBalance1 ERC20协议代币余额,后期补充

func (*HttpHandler) GetTraceTransaction added in v0.5.3

func (h *HttpHandler) GetTraceTransaction(ctx *gin.Context)

func (*HttpHandler) GetTxByHash

func (h *HttpHandler) GetTxByHash(ctx *gin.Context)

func (*HttpHandler) GetTxByHash1 added in v0.5.2

func (h *HttpHandler) GetTxByHash1(ctx *gin.Context)

func (*HttpHandler) GetTxReceiptByHash

func (h *HttpHandler) GetTxReceiptByHash(ctx *gin.Context)

func (*HttpHandler) HandlerReq

func (h *HttpHandler) HandlerReq(ctx *gin.Context)

HandlerReq 有用户自定义请求内容,然后直接发送到节点 ,和eth_call 函数无关

func (*HttpHandler) OwnerOf added in v0.5.1

func (h *HttpHandler) OwnerOf(ctx *gin.Context)

func (*HttpHandler) SendRawTx

func (h *HttpHandler) SendRawTx(ctx *gin.Context)

func (*HttpHandler) SendRawTx1 added in v0.5.3

func (h *HttpHandler) SendRawTx1(ctx *gin.Context)

func (*HttpHandler) StartKafka added in v0.5.1

func (h *HttpHandler) StartKafka(ctx context.Context)

func (*HttpHandler) Success

func (h *HttpHandler) Success(c *gin.Context, req string, resp interface{}, path string)

func (*HttpHandler) TokenUri added in v0.5.1

func (h *HttpHandler) TokenUri(ctx *gin.Context)

func (*HttpHandler) TotalSupply added in v0.5.1

func (h *HttpHandler) TotalSupply(ctx *gin.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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