Documentation ¶
Index ¶
- type PublicAPI
- func (e *PublicAPI) Accounts() ([]common.Address, error)
- func (e *PublicAPI) BlockNumber() (hexutil.Uint64, error)
- func (e *PublicAPI) Call(args evmtypes.CallArgs, blockNrOrHash rpctypes.BlockNumberOrHash, ...) (hexutil.Bytes, error)
- func (e *PublicAPI) ChainId() (hexutil.Uint, error)
- func (e *PublicAPI) ClientCtx() client.Context
- func (e *PublicAPI) Coinbase() (string, error)
- func (e *PublicAPI) Ctx() context.Context
- func (e *PublicAPI) EstimateGas(args evmtypes.CallArgs, blockNrOptional *rpctypes.BlockNumber) (hexutil.Uint64, error)
- func (e *PublicAPI) GasPrice() *hexutil.Big
- func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error)
- func (e *PublicAPI) GetBlockByHash(hash common.Hash, fullTx bool) (map[string]interface{}, error)
- func (e *PublicAPI) GetBlockByNumber(ethBlockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (e *PublicAPI) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
- func (e *PublicAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint
- func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
- func (e *PublicAPI) GetProof(address common.Address, storageKeys []string, ...) (*rpctypes.AccountResult, error)
- func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
- func (e *PublicAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
- func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
- func (e *PublicAPI) GetTransactionByHash(hash common.Hash) (*rpctypes.RPCTransaction, error)
- func (e *PublicAPI) GetTransactionCount(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Uint64, error)
- func (e *PublicAPI) GetTransactionLogs(txHash common.Hash) ([]*ethtypes.Log, error)
- func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (map[string]interface{}, error)
- func (e *PublicAPI) GetUncleByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) map[string]interface{}
- func (e *PublicAPI) GetUncleByBlockNumberAndIndex(number, idx hexutil.Uint) map[string]interface{}
- func (e *PublicAPI) GetUncleCountByBlockHash(hash common.Hash) hexutil.Uint
- func (e *PublicAPI) GetUncleCountByBlockNumber(blockNum rpctypes.BlockNumber) hexutil.Uint
- func (e *PublicAPI) Hashrate() hexutil.Uint64
- func (e *PublicAPI) Mining() bool
- func (e *PublicAPI) PendingTransactions() ([]*rpctypes.RPCTransaction, error)
- func (e *PublicAPI) ProtocolVersion() hexutil.Uint
- func (e *PublicAPI) QueryClient() *rpctypes.QueryClient
- func (e *PublicAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, error)
- func (e *PublicAPI) SendTransaction(args rpctypes.SendTxArgs) (common.Hash, error)
- func (e *PublicAPI) Sign(address common.Address, data hexutil.Bytes) (hexutil.Bytes, error)
- func (e *PublicAPI) Syncing() (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicAPI ¶
type PublicAPI struct {
// contains filtered or unexported fields
}
PublicAPI is the eth_ prefixed set of APIs in the Web3 JSON-RPC spec.
func NewPublicAPI ¶
func NewPublicAPI( logger log.Logger, clientCtx client.Context, backend backend.Backend, nonceLock *rpctypes.AddrLocker, ) *PublicAPI
NewPublicAPI creates an instance of the public ETH Web3 API.
func (*PublicAPI) BlockNumber ¶
BlockNumber returns the current block number.
func (*PublicAPI) Call ¶
func (e *PublicAPI) Call(args evmtypes.CallArgs, blockNrOrHash rpctypes.BlockNumberOrHash, _ *rpctypes.StateOverride) (hexutil.Bytes, error)
Call performs a raw contract call.
func (*PublicAPI) Coinbase ¶
Coinbase is the address that staking rewards will be send to (alias for Etherbase).
func (*PublicAPI) EstimateGas ¶
func (e *PublicAPI) EstimateGas(args evmtypes.CallArgs, blockNrOptional *rpctypes.BlockNumber) (hexutil.Uint64, error)
EstimateGas returns an estimate of gas usage for the given smart contract call.
func (*PublicAPI) GasPrice ¶
GasPrice returns the current gas price based on Ethermint's gas price oracle.
func (*PublicAPI) GetBalance ¶
func (e *PublicAPI) GetBalance(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Big, error)
GetBalance returns the provided account's balance up to the provided block number.
func (*PublicAPI) GetBlockByHash ¶
GetBlockByHash returns the block identified by hash.
func (*PublicAPI) GetBlockByNumber ¶
func (e *PublicAPI) GetBlockByNumber(ethBlockNum rpctypes.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber returns the block identified by number.
func (*PublicAPI) GetBlockTransactionCountByHash ¶
GetBlockTransactionCountByHash returns the number of transactions in the block identified by hash.
func (*PublicAPI) GetBlockTransactionCountByNumber ¶
func (e *PublicAPI) GetBlockTransactionCountByNumber(blockNum rpctypes.BlockNumber) *hexutil.Uint
GetBlockTransactionCountByNumber returns the number of transactions in the block identified by number.
func (*PublicAPI) GetCode ¶
func (e *PublicAPI) GetCode(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
GetCode returns the contract code at the given address and block number.
func (*PublicAPI) GetProof ¶
func (e *PublicAPI) GetProof(address common.Address, storageKeys []string, blockNrOrHash rpctypes.BlockNumberOrHash) (*rpctypes.AccountResult, error)
GetProof returns an account object with proof and any storage proofs
func (*PublicAPI) GetStorageAt ¶
func (e *PublicAPI) GetStorageAt(address common.Address, key string, blockNrOrHash rpctypes.BlockNumberOrHash) (hexutil.Bytes, error)
GetStorageAt returns the contract storage at the given address, block number, and key.
func (*PublicAPI) GetTransactionByBlockHashAndIndex ¶
func (e *PublicAPI) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
GetTransactionByBlockHashAndIndex returns the transaction identified by hash and index.
func (*PublicAPI) GetTransactionByBlockNumberAndIndex ¶
func (e *PublicAPI) GetTransactionByBlockNumberAndIndex(blockNum rpctypes.BlockNumber, idx hexutil.Uint) (*rpctypes.RPCTransaction, error)
GetTransactionByBlockNumberAndIndex returns the transaction identified by number and index.
func (*PublicAPI) GetTransactionByHash ¶
GetTransactionByHash returns the transaction identified by hash.
func (*PublicAPI) GetTransactionCount ¶
func (e *PublicAPI) GetTransactionCount(address common.Address, blockNrOrHash rpctypes.BlockNumberOrHash) (*hexutil.Uint64, error)
GetTransactionCount returns the number of transactions at the given address up to the given block number.
func (*PublicAPI) GetTransactionLogs ¶
GetTransactionLogs returns the logs given a transaction hash.
func (*PublicAPI) GetTransactionReceipt ¶
GetTransactionReceipt returns the transaction receipt identified by hash.
func (*PublicAPI) GetUncleByBlockHashAndIndex ¶
func (e *PublicAPI) GetUncleByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) map[string]interface{}
GetUncleByBlockHashAndIndex returns the uncle identified by hash and index. Always returns nil.
func (*PublicAPI) GetUncleByBlockNumberAndIndex ¶
GetUncleByBlockNumberAndIndex returns the uncle identified by number and index. Always returns nil.
func (*PublicAPI) GetUncleCountByBlockHash ¶
GetUncleCountByBlockHash returns the number of uncles in the block identified by hash. Always zero.
func (*PublicAPI) GetUncleCountByBlockNumber ¶
func (e *PublicAPI) GetUncleCountByBlockNumber(blockNum rpctypes.BlockNumber) hexutil.Uint
GetUncleCountByBlockNumber returns the number of uncles in the block identified by number. Always zero.
func (*PublicAPI) Mining ¶
Mining returns whether or not this node is currently mining. Always false.
func (*PublicAPI) PendingTransactions ¶
func (e *PublicAPI) PendingTransactions() ([]*rpctypes.RPCTransaction, error)
PendingTransactions returns the transactions that are in the transaction pool and have a from address that is one of the accounts this node manages.
func (*PublicAPI) ProtocolVersion ¶
ProtocolVersion returns the supported Ethereum protocol version.
func (*PublicAPI) QueryClient ¶
func (e *PublicAPI) QueryClient() *rpctypes.QueryClient
func (*PublicAPI) SendRawTransaction ¶
SendRawTransaction send a raw Ethereum transaction.
func (*PublicAPI) SendTransaction ¶
SendTransaction sends an Ethereum transaction.