eth

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: LGPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

* Copyright (C) 2018 The ontology Authors * This file is part of The ontology library. * * The ontology is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The ontology is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with The ontology. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	ProtocolVersion = eth65
	RPCGasCap       = config.DEFAULT_ETH_TX_MAX_GAS_LIMIT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EthereumAPI

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

func NewEthereumAPI

func NewEthereumAPI(txpool TxPoolService) *EthereumAPI

func (*EthereumAPI) Accounts

func (api *EthereumAPI) Accounts() ([]common.Address, error)

func (*EthereumAPI) BlockNumber

func (api *EthereumAPI) BlockNumber() (hexutil.Uint64, error)

func (*EthereumAPI) Call

func (api *EthereumAPI) Call(args types2.CallArgs, blockNumber types2.BlockNumber, _ *map[common.Address]types2.Account) (hexutil.Bytes, error)

func (*EthereumAPI) ChainId

func (api *EthereumAPI) ChainId() hexutil.Uint64

func (*EthereumAPI) Coinbase

func (api *EthereumAPI) Coinbase() (common.Address, error)

func (*EthereumAPI) EstimateGas

func (api *EthereumAPI) EstimateGas(args types2.CallArgs) (hexutil.Uint64, error)

func (*EthereumAPI) GasPrice

func (api *EthereumAPI) GasPrice() *hexutil.Big

func (*EthereumAPI) GetBalance

func (api *EthereumAPI) GetBalance(address common.Address, _ rpc.BlockNumberOrHash) (*hexutil.Big, error)

func (*EthereumAPI) GetBlockByHash

func (api *EthereumAPI) GetBlockByHash(hash common.Hash, fullTx bool) (interface{}, error)

func (*EthereumAPI) GetBlockByNumber

func (api *EthereumAPI) GetBlockByNumber(blockNum types2.BlockNumber, fullTx bool) (interface{}, error)

func (*EthereumAPI) GetBlockTransactionCountByHash

func (api *EthereumAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint

func (*EthereumAPI) GetBlockTransactionCountByNumber

func (api *EthereumAPI) GetBlockTransactionCountByNumber(number int64) *hexutil.Uint

func (*EthereumAPI) GetCode

func (api *EthereumAPI) GetCode(address common.Address, blockNumber types2.BlockNumber) (hexutil.Bytes, error)

func (*EthereumAPI) GetProof

func (api *EthereumAPI) GetProof(address common.Address, storageKeys []string, block types2.BlockNumber) (*types2.AccountResult, error)

func (*EthereumAPI) GetStorageAt

func (api *EthereumAPI) GetStorageAt(address common.Address, key string, blockNum types2.BlockNumber) (hexutil.Bytes, error)

func (*EthereumAPI) GetTransactionByBlockHashAndIndex

func (api *EthereumAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*types2.Transaction, error)

func (*EthereumAPI) GetTransactionByBlockNumberAndIndex

func (api *EthereumAPI) GetTransactionByBlockNumberAndIndex(blockNum types2.BlockNumber, idx hexutil.Uint) (*types2.Transaction, error)

func (*EthereumAPI) GetTransactionByHash

func (api *EthereumAPI) GetTransactionByHash(hash common.Hash) (*types2.Transaction, error)

func (*EthereumAPI) GetTransactionCount

func (api *EthereumAPI) GetTransactionCount(address common.Address, blockNum types2.BlockNumber) (*hexutil.Uint64, error)

func (*EthereumAPI) GetTransactionLogs

func (api *EthereumAPI) GetTransactionLogs(txHash common.Hash) ([]*types.Log, error)

func (*EthereumAPI) GetTransactionReceipt

func (api *EthereumAPI) GetTransactionReceipt(hash common.Hash) (interface{}, error)

func (*EthereumAPI) GetUncleByBlockHashAndIndex

func (api *EthereumAPI) GetUncleByBlockHashAndIndex(_ common.Hash, _ hexutil.Uint) map[string]interface{}

func (*EthereumAPI) GetUncleByBlockNumberAndIndex

func (api *EthereumAPI) GetUncleByBlockNumberAndIndex(_ hexutil.Uint, _ hexutil.Uint) map[string]interface{}

func (*EthereumAPI) GetUncleCountByBlockHash

func (api *EthereumAPI) GetUncleCountByBlockHash(hash common.Hash) hexutil.Uint

func (*EthereumAPI) GetUncleCountByBlockNumber

func (api *EthereumAPI) GetUncleCountByBlockNumber(number int64) hexutil.Uint

func (*EthereumAPI) Hashrate

func (api *EthereumAPI) Hashrate() hexutil.Uint64

func (*EthereumAPI) Mining

func (api *EthereumAPI) Mining() bool

func (*EthereumAPI) PendingTransactions

func (api *EthereumAPI) PendingTransactions() ([]*types2.Transaction, error)

func (*EthereumAPI) PendingTransactionsByHash

func (api *EthereumAPI) PendingTransactionsByHash(target common.Hash) (*types2.Transaction, error)

func (*EthereumAPI) ProtocolVersion

func (api *EthereumAPI) ProtocolVersion() hexutil.Uint

func (*EthereumAPI) SendRawTransaction

func (api *EthereumAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, error)

func (*EthereumAPI) SendTransaction

func (api *EthereumAPI) SendTransaction(args types2.SendTxArgs) (common.Hash, error)

func (*EthereumAPI) Sign

func (api *EthereumAPI) Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error)

func (*EthereumAPI) Syncing

func (api *EthereumAPI) Syncing() (interface{}, error)

type TxPoolService

type TxPoolService interface {
	Nonce(addr oComm.Address) uint64
	PendingEIPTransactions() []*types.Transaction
	PendingTransactionsByHash(target common.Hash) *types.Transaction
	GetGasPrice() uint64
}

Jump to

Keyboard shortcuts

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