Documentation ¶
Index ¶
- Constants
- type Service
- func (svc *Service) Accounts() ([]common.Address, error)
- func (svc *Service) BlockNumber() hexutil.Big
- func (svc *Service) Call(call rpctypes.CallArgs, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
- func (svc *Service) ChainId() (hexutil.Big, error)
- func (svc *Service) Coinbase() (common.Address, error)
- func (svc *Service) EstimateGas(call rpctypes.CallArgs) (hexutil.Uint64, error)
- func (svc *Service) GasPrice() *hexutil.Big
- func (svc *Service) GetBalance(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error)
- func (svc *Service) GetBlockByHash(hash common.Hash, fullTx bool) (*rpctypes.Block, error)
- func (svc *Service) GetBlockByNumber(blockNrOrHash rpc.BlockNumberOrHash, fullTx bool) (*rpctypes.Block, error)
- func (svc *Service) GetBlockStore() *store.BlockStore
- func (svc *Service) GetBlockTransactionCountByHash(hash common.Hash) *hexutil.Uint
- func (svc *Service) GetBlockTransactionCountByNumber(blockNrOrHash rpc.BlockNumberOrHash) *hexutil.Uint
- func (svc *Service) GetCode(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
- func (svc *Service) GetFilterChanges(id rpc.ID) (interface{}, error)
- func (svc *Service) GetFilterLogs(id rpc.ID) ([]*ethtypes.Log, error)
- func (svc *Service) GetLogs(crit ethfilters.FilterCriteria) ([]*ethtypes.Log, error)
- func (svc *Service) GetMempool() mempool.Mempool
- func (svc *Service) GetStateDB() *vm.CommitStateDB
- func (svc *Service) GetStorageAt(address common.Address, key string, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
- func (svc *Service) GetTransactionByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint64) (*rpctypes.Transaction, error)
- func (svc *Service) GetTransactionByBlockNumberAndIndex(blockNrOrHash rpc.BlockNumberOrHash, idx hexutil.Uint64) (*rpctypes.Transaction, error)
- func (svc *Service) GetTransactionByHash(hash common.Hash) (*rpctypes.Transaction, error)
- func (svc *Service) GetTransactionCount(address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error)
- func (svc *Service) GetTransactionReceipt(hash common.Hash) (*rpctypes.TransactionReceipt, error)
- func (svc *Service) GetUncleByBlockHashAndIndex(hash common.Hash, idx hexutil.Uint) *rpctypes.Block
- func (svc *Service) GetUncleByBlockNumberAndIndex(number hexutil.Uint, idx hexutil.Uint) *rpctypes.Block
- func (svc *Service) GetUncleCountByBlockHash(_ common.Hash) hexutil.Uint
- func (svc *Service) GetUncleCountByBlockNumber(_ rpc.BlockNumberOrHash) hexutil.Uint
- func (svc *Service) Hashrate() hexutil.Uint64
- func (svc *Service) Logs(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
- func (svc *Service) Mining() bool
- func (svc *Service) NewBlockFilter() rpc.ID
- func (svc *Service) NewFilter(crit ethfilters.FilterCriteria) (rpc.ID, error)
- func (svc *Service) NewHeads(ctx context.Context) (*rpc.Subscription, error)
- func (svc *Service) NewPendingTransactionFilter() rpc.ID
- func (svc *Service) NewPendingTransactions(ctx context.Context) (*rpc.Subscription, error)
- func (svc *Service) ProtocolVersion() string
- func (svc *Service) SendRawTransaction(input hexutil.Bytes) (common.Hash, error)
- func (svc *Service) Syncing() (interface{}, error)
- func (svc *Service) UninstallFilter(id rpc.ID) bool
Constants ¶
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) BlockNumber ¶
BlockNumber returns the current block number.
func (*Service) Coinbase ¶
Coinbase is the address that staking rewards will be send to (alias for Etherbase).
func (*Service) EstimateGas ¶
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 ¶
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 ¶
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) GetFilterChanges ¶
func (*Service) GetFilterLogs ¶
func (*Service) GetLogs ¶
func (svc *Service) GetLogs(crit ethfilters.FilterCriteria) ([]*ethtypes.Log, error)
func (*Service) GetMempool ¶
func (*Service) GetStateDB ¶
func (svc *Service) GetStateDB() *vm.CommitStateDB
func (*Service) GetStorageAt ¶
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 ¶
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 ¶
GetTransactionReceipt returns the transaction receipt identified by hash.
func (*Service) GetUncleByBlockHashAndIndex ¶
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 ¶
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) Logs ¶
func (svc *Service) Logs(ctx context.Context, crit filters.FilterCriteria) (*rpc.Subscription, error)
func (*Service) NewBlockFilter ¶
func (*Service) NewFilter ¶
func (svc *Service) NewFilter(crit ethfilters.FilterCriteria) (rpc.ID, error)
func (*Service) NewPendingTransactionFilter ¶
func (*Service) NewPendingTransactions ¶
func (*Service) ProtocolVersion ¶
ProtocolVersion returns the supported Ethereum protocol version.
func (*Service) SendRawTransaction ¶
SendRawTransaction will add the signed transaction to the transaction pool. The sender is responsible for signing the transaction and using the correct nonce.