callapi

package
v3.0.0-...-e8b7a4c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArbGetBlockConfirmations

func ArbGetBlockConfirmations(b EvmBridge, receipt *types.RPCTxReceipt) (uint64, error)

ArbGetBlockConfirmations get block confirmations call getL1Confirmations to 0x00000000000000000000000000000000000000C8

func CfxGetBlockConfirmations

func CfxGetBlockConfirmations(b EvmBridge, receipt *types.RPCTxReceipt) (uint64, error)

CfxGetBlockConfirmations get block confirmations

func CfxGetFinalizedBlockNumber

func CfxGetFinalizedBlockNumber(b EvmBridge) (latest uint64, err error)

CfxGetFinalizedBlockNumber call cfx_getBlockByEpochNumber

func KsmGetBlockConfirmations

func KsmGetBlockConfirmations(b EvmBridge, receipt *types.RPCTxReceipt) (uint64, error)

KsmGetBlockConfirmations get block confirmations

func KsmGetFinalizedBlockNumber

func KsmGetFinalizedBlockNumber(b EvmBridge) (latest uint64, err error)

KsmGetFinalizedBlockNumber call chain_getFinalizedHead and chain_getHeader

func KsmGetFinalizedHead

func KsmGetFinalizedHead(urls []string) (result *common.Hash, err error)

KsmGetFinalizedHead call chain_getFinalizedHead

Types

type CfxBlock

type CfxBlock struct {
	Hash        *common.Hash `json:"hash"`
	ParentHash  *common.Hash `json:"parentHash"`
	EpochNumber *hexutil.Big `json:"epochNumber"`
	BlockNumber *hexutil.Big `json:"blockNumber"`
}

CfxBlock struct

type EvmBridge

type EvmBridge interface {
	tokens.IBridge

	CallContract(contract string, data hexutil.Bytes, blockNumber string) (string, error)
}

EvmBridge evm bridge interface import and use eth.Bridge will cause import cycle so define a new interface here

type KsmHeader

type KsmHeader struct {
	ParentHash *common.Hash `json:"parentHash"`
	Number     *hexutil.Big `json:"number"`
}

KsmHeader struct

func KsmGetHeader

func KsmGetHeader(urls []string, blockHash string) (result *KsmHeader, err error)

KsmGetHeader call chain_getHeader

Jump to

Keyboard shortcuts

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