Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { BlockNumber(ctx context.Context) (uint64, error) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error) Close() }
Client provides calls to EVM JSON-RPC endpoints
type Eth2Client ¶
Eth2Client provides calls to Ethereum JSON-RPC endpoints post the merge
type Eth2ClientImpl ¶
Eth2ClientImpl implements Eth2Client
func (Eth2ClientImpl) FinalizedHeader ¶
FinalizedHeader returns the header of the most recent finalized block
type MoonbeamClient ¶
type MoonbeamClient interface { Client ChainGetFinalizedHead(ctx context.Context) (common.Hash, error) ChainGetHeader(ctx context.Context, hash common.Hash) (*MoonbeamHeader, error) }
MoonbeamClient provides calls to Moonbeam JSON-RPC endpoints
type MoonbeamClientImpl ¶
MoonbeamClientImpl implements MoonbeamClient
func (MoonbeamClientImpl) ChainGetFinalizedHead ¶
ChainGetFinalizedHead returns the hash of the latest finalized block
func (MoonbeamClientImpl) ChainGetHeader ¶
func (c MoonbeamClientImpl) ChainGetHeader(ctx context.Context, hash common.Hash) (*MoonbeamHeader, error)
ChainGetHeader returns the moonbeam block header of the given hash
type MoonbeamHeader ¶
type MoonbeamHeader struct { ParentHash common.Hash `json:"parentHash" gencodec:"required"` ExtrinsicsRoot common.Hash `json:"extrinsicsRoot" gencodec:"required"` StateRoot common.Hash `json:"stateRoot" gencodec:"required"` Number *hexutil.Big `json:"number" gencodec:"required"` }
MoonbeamHeader represents a block header in the Moonbeam blockchain
Click to show internal directories.
Click to hide internal directories.