rpc

package
v2.0.0-...-547a3fa Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SwaNamespace is the extension RPC namespace of swa module.
	SwaNamespace = "swa"

	ExceedBlockGasLimitError = "out of gas in location: block gas meter; gasWanted:"
)

Variables

This section is empty.

Functions

func CreateSwaRPCAPIs

func CreateSwaRPCAPIs(ctx *server.Context, clientCtx client.Context, _ *stream.RPCStream, allowUnprotectedTxs bool, indexer ethermint.EVMTxIndexer) []rpc.API

CreateSwaRPCAPIs creates extension json-rpc apis

Types

type SwaAPI

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

SwaAPI is the extension jsonrpc apis prefixed with swa_.

func NewSwaAPI

func NewSwaAPI(
	logger log.Logger,
	clientCtx client.Context,
	backend backend.Backend,
) *SwaAPI

NewSwaAPI creates an instance of the swa web3 extension apis.

func (*SwaAPI) GetTransactionReceiptsByBlock

func (api *SwaAPI) GetTransactionReceiptsByBlock(blockNrOrHash rpctypes.BlockNumberOrHash) ([]map[string]interface{}, error)

GetTransactionReceiptsByBlock returns all the transaction receipts included in the block.

func (*SwaAPI) ReplayBlock

func (api *SwaAPI) ReplayBlock(blockNrOrHash rpctypes.BlockNumberOrHash, postUpgrade bool) ([]map[string]interface{}, error)

ReplayBlock return tx receipts by replay all the eth transactions, if postUpgrade is true, the tx that exceeded block gas limit is treated as reverted, otherwise as committed.

Jump to

Keyboard shortcuts

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