eth

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPCTxFeeCap = 1 // olt
)

TODO: Move to the config

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(ctx rpctypes.Web3Context) *Service

func (*Service) Accounts

func (svc *Service) Accounts() ([]common.Address, error)

Accounts returns the list of accounts available to this node.

func (*Service) BlockNumber

func (svc *Service) BlockNumber() hexutil.Big

BlockNumber returns the current block number.

func (*Service) Call

func (svc *Service) Call(call rpctypes.CallArgs, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)

func (*Service) ChainId

func (svc *Service) ChainId() (hexutil.Big, error)

ChainId returns the chain's identifier in hex format

func (*Service) Coinbase

func (svc *Service) Coinbase() (common.Address, error)

Coinbase is the address that staking rewards will be send to (alias for Etherbase).

func (*Service) EstimateGas

func (svc *Service) EstimateGas(call rpctypes.CallArgs) (hexutil.Uint64, error)

func (*Service) GasPrice

func (svc *Service) GasPrice() *hexutil.Big

GasPrice returns the current gas price

func (*Service) GetBalance

func (svc *Service) GetBalance(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error)

GetBalance returns the provided account's balance up to the provided block number.

func (*Service) GetBlockByHash

func (svc *Service) GetBlockByHash(hash common.Hash, fullTx bool) (*rpctypes.Block, error)

GetBlockByHash returns the block identified by hash.

func (*Service) GetBlockByNumber

func (svc *Service) GetBlockByNumber(blockNrOrHash rpc.BlockNumberOrHash, fullTx bool) (*rpctypes.Block, error)

GetBlockByNumber returns the block identified by number.

func (*Service) GetBlockStore

func (svc *Service) GetBlockStore() *store.BlockStore

func (*Service) GetBlockTransactionCountByHash

func (svc *Service) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint

GetBlockTransactionCountByHash returns the number of transactions in the block identified by hash.

func (*Service) GetBlockTransactionCountByNumber

func (svc *Service) GetBlockTransactionCountByNumber(blockNrOrHash rpc.BlockNumberOrHash) *hexutil.Uint

GetBlockTransactionCountByNumber returns the number of transactions in the block identified by its height.

func (*Service) GetCode

func (svc *Service) GetCode(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)

func (*Service) GetFilterChanges

func (svc *Service) GetFilterChanges(id rpc.ID) (interface{}, error)

func (*Service) GetFilterLogs

func (svc *Service) GetFilterLogs(id rpc.ID) ([]*ethtypes.Log, error)

func (*Service) GetLogs

func (svc *Service) GetLogs(crit ethfilters.FilterCriteria) ([]*ethtypes.Log, error)

func (*Service) GetMempool

func (svc *Service) GetMempool() mempool.Mempool

func (*Service) GetStateDB

func (svc *Service) GetStateDB() *vm.CommitStateDB

func (*Service) GetStorageAt

func (svc *Service) GetStorageAt(address common.Address, key string, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)

func (*Service) GetTransactionByBlockHashAndIndex

func (svc *Service) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint64) (*rpctypes.Transaction, error)

GetTransactionByBlockHashAndIndex returns the transaction identified by block hash and index.

func (*Service) GetTransactionByBlockNumberAndIndex

func (svc *Service) GetTransactionByBlockNumberAndIndex(blockNrOrHash rpc.BlockNumberOrHash, idx hexutil.Uint64) (*rpctypes.Transaction, error)

GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index.

func (*Service) GetTransactionByHash

func (svc *Service) GetTransactionByHash(hash common.Hash) (*rpctypes.Transaction, error)

GetTransactionByHash returns the transaction identified by hash.

func (*Service) GetTransactionCount

func (svc *Service) GetTransactionCount(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error)

GetTransactionCount returns the number of transactions at the given address up to the given block number.

func (*Service) GetTransactionReceipt

func (svc *Service) GetTransactionReceipt(hash common.Hash) (*rpctypes.TransactionReceipt, error)

GetTransactionReceipt returns the transaction receipt identified by hash.

func (*Service) GetUncleByBlockHashAndIndex

func (svc *Service) GetUncleByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) *rpctypes.Block

GetUncleByBlockHashAndIndex returns the uncle identified by hash and index. Always returns nil.

func (*Service) GetUncleByBlockNumberAndIndex

func (svc *Service) GetUncleByBlockNumberAndIndex(number hexutil.Uint, idx hexutil.Uint) *rpctypes.Block

GetUncleByBlockNumberAndIndex returns the uncle identified by number and index. Always returns nil.

func (*Service) GetUncleCountByBlockHash

func (svc *Service) GetUncleCountByBlockHash(_ common.Hash) hexutil.Uint

GetUncleCountByBlockHash returns the number of uncles in the block idenfied by hash. Always zero.

func (*Service) GetUncleCountByBlockNumber

func (svc *Service) GetUncleCountByBlockNumber(_ rpc.BlockNumberOrHash) hexutil.Uint

GetUncleCountByBlockNumber returns the number of uncles in the block idenfied by number. Always zero.

func (*Service) Hashrate

func (svc *Service) Hashrate() hexutil.Uint64

Hashrate returns the current node's hashrate. Always 0.

func (*Service) Logs

func (*Service) Mining

func (svc *Service) Mining() bool

Mining returns whether or not this node is currently mining. Always false.

func (*Service) NewBlockFilter

func (svc *Service) NewBlockFilter() rpc.ID

func (*Service) NewFilter

func (svc *Service) NewFilter(crit ethfilters.FilterCriteria) (rpc.ID, error)

func (*Service) NewHeads

func (svc *Service) NewHeads(ctx context.Context) (*rpc.Subscription, error)

func (*Service) NewPendingTransactionFilter

func (svc *Service) NewPendingTransactionFilter() rpc.ID

func (*Service) NewPendingTransactions

func (svc *Service) NewPendingTransactions(ctx context.Context) (*rpc.Subscription, error)

func (*Service) ProtocolVersion

func (svc *Service) ProtocolVersion() string

ProtocolVersion returns the supported Ethereum protocol version.

func (*Service) SendRawTransaction

func (svc *Service) SendRawTransaction(input hexutil.Bytes) (common.Hash, error)

SendRawTransaction will add the signed transaction to the transaction pool. The sender is responsible for signing the transaction and using the correct nonce.

func (*Service) Syncing

func (svc *Service) Syncing() (interface{}, error)

Syncing returns whether or not the current node is syncing with other peers. Returns false if not, or a struct outlining the state of the sync if it is.

func (*Service) UninstallFilter

func (svc *Service) UninstallFilter(id rpc.ID) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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