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
- type EthereumAPI
- func (api *EthereumAPI) Accounts() ([]common.Address, error)
- func (api *EthereumAPI) BlockNumber() (hexutil.Uint64, error)
- func (api *EthereumAPI) Call(args types2.CallArgs, blockNumber types2.BlockNumber, ...) (hexutil.Bytes, error)
- func (api *EthereumAPI) ChainId() hexutil.Uint64
- func (api *EthereumAPI) Coinbase() (common.Address, error)
- func (api *EthereumAPI) EstimateGas(args types2.CallArgs, _ *rpc.BlockNumberOrHash) (hexutil.Uint64, error)
- func (api *EthereumAPI) GasPrice() *hexutil.Big
- func (api *EthereumAPI) GetBalance(address common.Address, _ rpc.BlockNumberOrHash) (*hexutil.Big, error)
- func (api *EthereumAPI) GetBlockByHash(hash common.Hash, fullTx bool) (interface{}, error)
- func (api *EthereumAPI) GetBlockByNumber(blockNum types2.BlockNumber, fullTx bool) (interface{}, error)
- func (api *EthereumAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
- func (api *EthereumAPI) GetBlockTransactionCountByNumber(number int64) *hexutil.Uint
- func (api *EthereumAPI) GetCode(address common.Address, blockNumber types2.BlockNumber) (hexutil.Bytes, error)
- func (api *EthereumAPI) GetProof(address common.Address, storageKeys []string, block types2.BlockNumber) (*types2.AccountResult, error)
- func (api *EthereumAPI) GetStorageAt(address common.Address, key string, blockNum types2.BlockNumber) (hexutil.Bytes, error)
- func (api *EthereumAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*types2.Transaction, error)
- func (api *EthereumAPI) GetTransactionByBlockNumberAndIndex(blockNum types2.BlockNumber, idx hexutil.Uint) (*types2.Transaction, error)
- func (api *EthereumAPI) GetTransactionByHash(hash common.Hash) (*types2.Transaction, error)
- func (api *EthereumAPI) GetTransactionCount(address common.Address, blockNum types2.BlockNumber) (*hexutil.Uint64, error)
- func (api *EthereumAPI) GetTransactionLogs(txHash common.Hash) ([]*types.Log, error)
- func (api *EthereumAPI) GetTransactionReceipt(hash common.Hash) (interface{}, error)
- func (api *EthereumAPI) GetUncleByBlockHashAndIndex(_ common.Hash, _ hexutil.Uint) map[string]interface{}
- func (api *EthereumAPI) GetUncleByBlockNumberAndIndex(_ hexutil.Uint, _ hexutil.Uint) map[string]interface{}
- func (api *EthereumAPI) GetUncleCountByBlockHash(hash common.Hash) hexutil.Uint
- func (api *EthereumAPI) GetUncleCountByBlockNumber(number int64) hexutil.Uint
- func (api *EthereumAPI) Hashrate() hexutil.Uint64
- func (api *EthereumAPI) Mining() bool
- func (api *EthereumAPI) PendingTransactions() ([]*types2.Transaction, error)
- func (api *EthereumAPI) PendingTransactionsByHash(target common.Hash) (*types2.Transaction, error)
- func (api *EthereumAPI) ProtocolVersion() hexutil.Uint
- func (api *EthereumAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, error)
- func (api *EthereumAPI) SendTransaction(args types2.SendTxArgs) (common.Hash, error)
- func (api *EthereumAPI) Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error)
- func (api *EthereumAPI) Syncing() (interface{}, error)
- type TxPoolService
Constants ¶
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) BlockNumber ¶
func (api *EthereumAPI) BlockNumber() (hexutil.Uint64, error)
func (*EthereumAPI) ChainId ¶
func (api *EthereumAPI) ChainId() hexutil.Uint64
func (*EthereumAPI) EstimateGas ¶
func (api *EthereumAPI) EstimateGas(args types2.CallArgs, _ *rpc.BlockNumberOrHash) (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 (*EthereumAPI) GetTransactionReceipt ¶
func (api *EthereumAPI) GetTransactionReceipt(hash common.Hash) (interface{}, error)
func (*EthereumAPI) GetUncleByBlockHashAndIndex ¶
func (*EthereumAPI) GetUncleByBlockNumberAndIndex ¶
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 (*EthereumAPI) SendTransaction ¶
func (api *EthereumAPI) SendTransaction(args types2.SendTxArgs) (common.Hash, 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 }