Documentation ¶
Index ¶
- Constants
- func APIList(db ethdb.Database, eth ethdb.Backend, filters *filters.Filters, cfg cli.Flags, ...) []rpc.API
- type APIImpl
- func (api *APIImpl) Accounts(ctx context.Context) ([]common.Address, error)
- func (api *APIImpl) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
- func (api *APIImpl) BlockNumber(_ context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) Call(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) (hexutil.Bytes, error)
- func (api *APIImpl) ChainConfig() *params.ChainConfig
- func (api *APIImpl) ChainId(ctx context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) Coinbase(_ context.Context) (common.Address, error)
- func (api *APIImpl) CompileLLL(_ context.Context, _ string) (hexutil.Bytes, error)
- func (api *APIImpl) CompileSerpent(ctx context.Context, _ string) (hexutil.Bytes, error)
- func (api *APIImpl) CompileSolidity(ctx context.Context, _ string) (hexutil.Bytes, error)
- func (api *APIImpl) EstimateGas(ctx context.Context, args ethapi.CallArgs) (hexutil.Uint64, error)
- func (api *APIImpl) GasPrice(ctx context.Context) (*hexutil.Big, error)
- func (api *APIImpl) GetBalance(ctx context.Context, address common.Address, ...) (*hexutil.Big, error)
- func (api *APIImpl) GetBlockByHash(ctx context.Context, numberOrHash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error)
- func (api *APIImpl) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
- func (api *APIImpl) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
- func (api *APIImpl) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
- func (api *APIImpl) GetCode(ctx context.Context, address common.Address, ...) (hexutil.Bytes, error)
- func (api *APIImpl) GetCompilers(_ context.Context) ([]string, error)
- func (api *APIImpl) GetFilterChanges(_ context.Context, index hexutil.Uint64) ([]interface{}, error)
- func (api *APIImpl) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*types.Log, error)
- func (api *APIImpl) GetProof(ctx context.Context, address common.Address, storageKeys []string, ...) (*interface{}, error)
- func (api *APIImpl) GetStorageAt(ctx context.Context, address common.Address, index string, ...) (string, error)
- func (api *APIImpl) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error)
- func (api *APIImpl) GetTransactionCount(ctx context.Context, address common.Address, ...) (*hexutil.Uint64, error)
- func (api *APIImpl) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleByBlockNumberAndIndex(ctx context.Context, number rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error)
- func (api *APIImpl) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error)
- func (api *APIImpl) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error)
- func (api *APIImpl) GetWork(_ context.Context) ([]interface{}, error)
- func (api *APIImpl) Hashrate(_ context.Context) (uint64, error)
- func (api *APIImpl) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
- func (api *APIImpl) Mining(_ context.Context) (bool, error)
- func (api *APIImpl) NewBlockFilter(_ context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) NewFilter(_ context.Context, filter interface{}) (hexutil.Uint64, error)
- func (api *APIImpl) NewHeads(ctx context.Context) (*rpc.Subscription, error)
- func (api *APIImpl) NewPendingTransactionFilter(_ context.Context) (hexutil.Uint64, error)
- func (api *APIImpl) ProtocolVersion(_ context.Context) (hexutil.Uint, error)
- func (api *APIImpl) SendRawTransaction(_ context.Context, encodedTx hexutil.Bytes) (common.Hash, error)
- func (api *APIImpl) SendTransaction(_ context.Context, txObject interface{}) (common.Hash, error)
- func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutil.Bytes) (hexutil.Bytes, error)
- func (api *APIImpl) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error)
- func (api *APIImpl) SubmitHashrate(_ context.Context, hashRate common.Hash, id string) (bool, error)
- func (api *APIImpl) SubmitWork(_ context.Context, nonce rpc.BlockNumber, powHash, digest common.Hash) (bool, error)
- func (api *APIImpl) Syncing(ctx context.Context) (interface{}, error)
- func (api *APIImpl) UninstallFilter(_ context.Context, index hexutil.Uint64) (bool, error)
- type AccountResult
- type BaseAPI
- type CallTraceAction
- type CreateTraceAction
- type CreateTraceResult
- type DBAPI
- type DBAPIImpl
- func (api *DBAPIImpl) GetHex(_ context.Context, _ string, _ string) (hexutil.Bytes, error)
- func (api *DBAPIImpl) GetString(_ context.Context, _ string, _ string) (string, error)
- func (api *DBAPIImpl) PutHex(_ context.Context, _ string, _ string, _ hexutil.Bytes) (bool, error)
- func (api *DBAPIImpl) PutString(_ context.Context, _ string, _ string, _ string) (bool, error)
- type EthAPI
- type Forks
- type GethTrace
- type GethTraces
- type Issuance
- type NetAPI
- type NetAPIImpl
- type OeTracer
- func (ot *OeTracer) CaptureAccountRead(account common.Address) error
- func (ot *OeTracer) CaptureAccountWrite(account common.Address) error
- func (ot *OeTracer) CaptureEnd(depth int, output []byte, gasUsed uint64, t time.Duration, err error) error
- func (ot *OeTracer) CaptureFault(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, ...) error
- func (ot *OeTracer) CaptureSelfDestruct(from common.Address, to common.Address, value *big.Int)
- func (ot *OeTracer) CaptureStart(depth int, from common.Address, to common.Address, precompile bool, ...) error
- func (ot *OeTracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost uint64, memory *vm.Memory, ...) error
- type ParityTrace
- type ParityTraces
- type PrivateDebugAPI
- type PrivateDebugAPIImpl
- func (api *PrivateDebugAPIImpl) AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, ...) (*AccountResult, error)
- func (api *PrivateDebugAPIImpl) AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, startKey []byte, ...) (state.IteratorDump, error)
- func (api *PrivateDebugAPIImpl) GetModifiedAccountsByHash(ctx context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
- func (api *PrivateDebugAPIImpl) GetModifiedAccountsByNumber(ctx context.Context, startNumber rpc.BlockNumber, endNumber *rpc.BlockNumber) ([]common.Address, error)
- func (api *PrivateDebugAPIImpl) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, ...) (StorageRangeResult, error)
- func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, ...) (interface{}, error)
- func (api *PrivateDebugAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash, config *tracers.TraceConfig) (interface{}, error)
- type RPCTransaction
- type SHHAPI
- type SHHAPIImpl
- func (api *SHHAPIImpl) AddToGroup(_ context.Context, _ string) (bool, error)
- func (api *SHHAPIImpl) GetFilterChanges(_ context.Context, _ hexutil.Uint) ([]string, error)
- func (api *SHHAPIImpl) GetMessages(_ context.Context, _ hexutil.Uint) ([]string, error)
- func (api *SHHAPIImpl) HasIdentity(_ context.Context, _ string) (bool, error)
- func (api *SHHAPIImpl) NewFilter(_ context.Context, _ SHHFilter) (hexutil.Uint, error)
- func (api *SHHAPIImpl) NewGroup(_ context.Context) (string, error)
- func (api *SHHAPIImpl) NewIdentity(_ context.Context) (string, error)
- func (api *SHHAPIImpl) Post(_ context.Context, _ SHHPost) (bool, error)
- func (api *SHHAPIImpl) UninstallFilter(_ context.Context, _ hexutil.Uint) (bool, error)
- func (api *SHHAPIImpl) Version(_ context.Context) (string, error)
- type SHHFilter
- type SHHPost
- type StateDiff
- func (sd *StateDiff) CompareStates(initialIbs, ibs *state.IntraBlockState)
- func (sd *StateDiff) CreateContract(address common.Address) error
- func (sd *StateDiff) DeleteAccount(ctx context.Context, address common.Address, original *accounts.Account) error
- func (sd *StateDiff) UpdateAccountCode(address common.Address, incarnation uint64, codeHash common.Hash, code []byte) error
- func (sd *StateDiff) UpdateAccountData(ctx context.Context, address common.Address, ...) error
- func (sd *StateDiff) WriteAccountStorage(ctx context.Context, address common.Address, incarnation uint64, ...) error
- type StateDiffAccount
- type StateDiffBalance
- type StateDiffCode
- type StateDiffNonce
- type StateDiffStorage
- type StorageEntry
- type StorageMap
- type StorageRangeResult
- type SuicideTraceAction
- type TgAPI
- type TgImpl
- func (api *TgImpl) Forks(ctx context.Context) (Forks, error)
- func (api *TgImpl) GetHeaderByHash(ctx context.Context, hash common.Hash) (*types.Header, error)
- func (api *TgImpl) GetHeaderByNumber(ctx context.Context, blockNumber rpc.BlockNumber) (*types.Header, error)
- func (api *TgImpl) GetLogsByHash(ctx context.Context, hash common.Hash) ([][]*types.Log, error)
- func (api *TgImpl) Issuance(ctx context.Context, blockNr rpc.BlockNumber) (Issuance, error)
- type TraceAPI
- type TraceAPIImpl
- func (api *TraceAPIImpl) Block(ctx context.Context, blockNr rpc.BlockNumber) (ParityTraces, error)
- func (api *TraceAPIImpl) Call(ctx context.Context, args TraceCallParam, traceTypes []string, ...) (*TraceCallResult, error)
- func (api *TraceAPIImpl) CallMany(ctx context.Context, calls json.RawMessage, ...) ([]*TraceCallResult, error)
- func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest) (ParityTraces, error)
- func (api *TraceAPIImpl) Get(ctx context.Context, txHash common.Hash, indicies []hexutil.Uint64) (*ParityTrace, error)
- func (api *TraceAPIImpl) RawTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)
- func (api *TraceAPIImpl) ReplayBlockTransactions(ctx context.Context, blockNr rpc.BlockNumber, traceTypes []string) ([]interface{}, error)
- func (api *TraceAPIImpl) ReplayTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)
- func (api *TraceAPIImpl) Transaction(ctx context.Context, txHash common.Hash) (ParityTraces, error)
- type TraceAction
- type TraceCallParam
- type TraceCallResult
- type TraceCallVmTrace
- type TraceFilterRequest
- type TraceResult
- type Web3API
- type Web3APIImpl
Constants ¶
const ( CALL = "call" CALLCODE = "callcode" DELEGATECALL = "delegatecall" STATICCALL = "staticcall" CREATE = "create" SUICIDE = "suicide" TraceTypeTrace = "trace" TraceTypeStateDiff = "stateDiff" TraceTypeVmTrace = "vmTrace" )
const NotAvailableChainData = "the function %s is not available, please use --private.api.addr option instead of --chaindata option"
NotAvailableChainData x
const NotAvailableDeprecated = "the method has been deprecated: %s"
NotAvailableDeprecated x
const NotImplemented = "the method is currently not implemented: %s"
NotImplemented is the URI prefix for smartcard wallets.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIImpl ¶
APIImpl is implementation of the EthAPI interface based on remote Db access
func NewEthAPI ¶
func NewEthAPI(db ethdb.Database, eth ethdb.Backend, gascap uint64, filters *rpcfilters.Filters) *APIImpl
NewEthAPI returns APIImpl instance
func (*APIImpl) Accounts ¶
Accounts implements eth_accounts. Returns a list of addresses owned by the client. Deprecated: This function will be removed in the future.
func (*APIImpl) BlockByNumber ¶
func (api *APIImpl) BlockByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Block, error)
BlockByNumber is necessary for gasprice.OracleBackend implementation
func (*APIImpl) BlockNumber ¶
BlockNumber implements eth_blockNumber. Returns the block number of most recent block.
func (*APIImpl) Call ¶
func (api *APIImpl) Call(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *map[common.Address]ethapi.Account) (hexutil.Bytes, error)
Call implements eth_call. Executes a new message call immediately without creating a transaction on the block chain.
func (*APIImpl) ChainConfig ¶
func (api *APIImpl) ChainConfig() *params.ChainConfig
ChainConfig is necessary for gasprice.OracleBackend implementation
func (*APIImpl) Coinbase ¶
Coinbase implements eth_coinbase. Returns the current client coinbase address.
func (*APIImpl) CompileLLL ¶
CompileLLL implements eth_compileLLL. Returns compiled LLL code. Deprecated: This function will be removed in the future.
func (*APIImpl) CompileSerpent ¶
CompileSerpent implements eth_compileSerpent. Returns compiled serpent code. Deprecated: This function will be removed in the future.
func (*APIImpl) CompileSolidity ¶
CompileSolidity implements eth_compileSolidity. Returns compiled solidity code. Deprecated: This function will be removed in the future.
func (*APIImpl) EstimateGas ¶
EstimateGas implements eth_estimateGas. Returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.
func (*APIImpl) GasPrice ¶
GasPrice implements eth_gasPrice. Returns the current price per gas in wei.
func (*APIImpl) GetBalance ¶
func (api *APIImpl) GetBalance(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error)
GetBalance implements eth_getBalance. Returns the balance of an account for a given address.
func (*APIImpl) GetBlockByHash ¶
func (api *APIImpl) GetBlockByHash(ctx context.Context, numberOrHash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error)
GetBlockByHash implements eth_getBlockByHash. Returns information about a block given the block's hash.
func (*APIImpl) GetBlockByNumber ¶
func (api *APIImpl) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error)
GetBlockByNumber implements eth_getBlockByNumber. Returns information about a block given the block's number.
func (*APIImpl) GetBlockTransactionCountByHash ¶
func (api *APIImpl) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error)
GetBlockTransactionCountByHash implements eth_getBlockTransactionCountByHash. Returns the number of transactions in a block given the block's block hash.
func (*APIImpl) GetBlockTransactionCountByNumber ¶
func (api *APIImpl) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error)
GetBlockTransactionCountByNumber implements eth_getBlockTransactionCountByNumber. Returns the number of transactions in a block given the block's block number.
func (*APIImpl) GetCode ¶
func (api *APIImpl) GetCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error)
GetCode implements eth_getCode. Returns the byte code at a given address (if it's a smart contract).
func (*APIImpl) GetCompilers ¶
GetCompilers implements eth_getCompilers. Returns a list of available compilers in the client. Deprecated: This function will be removed in the future.
func (*APIImpl) GetFilterChanges ¶
func (api *APIImpl) GetFilterChanges(_ context.Context, index hexutil.Uint64) ([]interface{}, error)
GetFilterChanges implements eth_getFilterChanges. Polling method for a previously-created filter, which returns an array of logs which occurred since last poll.
func (*APIImpl) GetLogs ¶
GetLogs implements eth_getLogs. Returns an array of logs matching a given filter object.
func (*APIImpl) GetProof ¶
func (api *APIImpl) GetProof(ctx context.Context, address common.Address, storageKeys []string, blockNr rpc.BlockNumber) (*interface{}, error)
GetProof not implemented
func (*APIImpl) GetStorageAt ¶
func (api *APIImpl) GetStorageAt(ctx context.Context, address common.Address, index string, blockNrOrHash rpc.BlockNumberOrHash) (string, error)
GetStorageAt implements eth_getStorageAt. Returns the value from a storage position at a given address.
func (*APIImpl) GetTransactionByBlockHashAndIndex ¶
func (api *APIImpl) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error)
GetTransactionByBlockHashAndIndex implements eth_getTransactionByBlockHashAndIndex. Returns information about a transaction given the block's hash and a transaction index.
func (*APIImpl) GetTransactionByBlockNumberAndIndex ¶
func (api *APIImpl) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error)
GetTransactionByBlockNumberAndIndex implements eth_getTransactionByBlockNumberAndIndex. Returns information about a transaction given a block number and transaction index.
func (*APIImpl) GetTransactionByHash ¶
func (api *APIImpl) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error)
GetTransactionByHash implements eth_getTransactionByHash. Returns information about a transaction given the transaction's hash.
func (*APIImpl) GetTransactionCount ¶
func (api *APIImpl) GetTransactionCount(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error)
GetTransactionCount implements eth_getTransactionCount. Returns the number of transactions sent from an address (the nonce).
func (*APIImpl) GetTransactionReceipt ¶
func (api *APIImpl) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error)
GetTransactionReceipt implements eth_getTransactionReceipt. Returns the receipt of a transaction given the transaction's hash.
func (*APIImpl) GetUncleByBlockHashAndIndex ¶
func (api *APIImpl) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error)
GetUncleByBlockHashAndIndex implements eth_getUncleByBlockHashAndIndex. Returns information about an uncle given a block's hash and the index of the uncle.
func (*APIImpl) GetUncleByBlockNumberAndIndex ¶
func (api *APIImpl) GetUncleByBlockNumberAndIndex(ctx context.Context, number rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error)
GetUncleByBlockNumberAndIndex implements eth_getUncleByBlockNumberAndIndex. Returns information about an uncle given a block's number and the index of the uncle.
func (*APIImpl) GetUncleCountByBlockHash ¶
func (api *APIImpl) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error)
GetUncleCountByBlockHash implements eth_getUncleCountByBlockHash. Returns the number of uncles in the block, if any.
func (*APIImpl) GetUncleCountByBlockNumber ¶
func (api *APIImpl) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error)
GetUncleCountByBlockNumber implements eth_getUncleCountByBlockNumber. Returns the number of uncles in the block, if any.
func (*APIImpl) GetWork ¶
GetWork implements eth_getWork. Returns the hash of the current block, the seedHash, and the boundary condition to be met ('target').
func (*APIImpl) Hashrate ¶
Hashrate implements eth_hashrate. Returns the number of hashes per second that the node is mining with.
func (*APIImpl) HeaderByNumber ¶
func (api *APIImpl) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error)
HeaderByNumber is necessary for gasprice.OracleBackend implementation
func (*APIImpl) Mining ¶
Mining implements eth_mining. Returns true if client is actively mining new blocks.
func (*APIImpl) NewBlockFilter ¶
NewBlockFilter new transaction filter
func (*APIImpl) NewFilter ¶
NewFilter implements eth_newFilter. Creates an arbitrary filter object, based on filter options, to notify when the state changes (logs).
func (*APIImpl) NewHeads ¶
NewHeads send a notification each time a new (header) block is appended to the chain.
func (*APIImpl) NewPendingTransactionFilter ¶
NewPendingTransactionFilter new transaction filter
func (*APIImpl) ProtocolVersion ¶
ProtocolVersion implements eth_protocolVersion. Returns the current ethereum protocol version.
func (*APIImpl) SendRawTransaction ¶
func (api *APIImpl) SendRawTransaction(_ context.Context, encodedTx hexutil.Bytes) (common.Hash, error)
SendRawTransaction implements eth_sendRawTransaction. Creates new message call transaction or a contract creation for previously-signed transactions.
func (*APIImpl) SendTransaction ¶
SendTransaction implements eth_sendTransaction. Creates new message call transaction or a contract creation if the data field contains code.
func (*APIImpl) Sign ¶
func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutil.Bytes) (hexutil.Bytes, error)
Sign implements eth_sign. Calculates an Ethereum specific signature with: sign(keccak256('\\x19Ethereum Signed Message:\\n' + len(message) + message))). Deprecated: This function will be removed in the future.
func (*APIImpl) SignTransaction ¶
SignTransaction deprecated
func (*APIImpl) SubmitHashrate ¶
func (api *APIImpl) SubmitHashrate(_ context.Context, hashRate common.Hash, id string) (bool, error)
SubmitHashrate implements eth_submitHashrate. Submit the mining hashrate to the blockchain.
func (*APIImpl) SubmitWork ¶
func (api *APIImpl) SubmitWork(_ context.Context, nonce rpc.BlockNumber, powHash, digest common.Hash) (bool, error)
SubmitWork implements eth_submitWork. Submits a proof-of-work solution to the blockchain.
type AccountResult ¶
type CallTraceAction ¶
type CreateTraceAction ¶
type CreateTraceResult ¶
type DBAPI ¶
type DBAPI interface { GetString(_ context.Context, _ string, _ string) (string, error) PutString(_ context.Context, _ string, _ string, _ string) (bool, error) GetHex(_ context.Context, _ string, _ string) (hexutil.Bytes, error) PutHex(_ context.Context, _ string, _ string, _ hexutil.Bytes) (bool, error) }
DBAPI the interface for the db_ RPC commands (deprecated)
type DBAPIImpl ¶
type DBAPIImpl struct {
// contains filtered or unexported fields
}
DBAPIImpl data structure to store things needed for db_ commands
func (*DBAPIImpl) GetHex ¶
GetHex implements db_getHex. Returns binary data from the local database. Deprecated: This function will be removed in the future.
func (*DBAPIImpl) GetString ¶
GetString implements db_getString. Returns string from the local database. Deprecated: This function will be removed in the future.
type EthAPI ¶
type EthAPI interface { // Block related (proposed file: ./eth_blocks.go) GetBlockByNumber(ctx context.Context, number rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) GetBlockByHash(ctx context.Context, hash rpc.BlockNumberOrHash, fullTx bool) (map[string]interface{}, error) GetBlockTransactionCountByNumber(ctx context.Context, blockNr rpc.BlockNumber) (*hexutil.Uint, error) GetBlockTransactionCountByHash(ctx context.Context, blockHash common.Hash) (*hexutil.Uint, error) // Transaction related (see ./eth_txs.go) GetTransactionByHash(ctx context.Context, hash common.Hash) (*RPCTransaction, error) GetTransactionByBlockHashAndIndex(ctx context.Context, blockHash common.Hash, txIndex hexutil.Uint64) (*RPCTransaction, error) GetTransactionByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, txIndex hexutil.Uint) (*RPCTransaction, error) // Receipt related (see ./eth_receipts.go) GetTransactionReceipt(ctx context.Context, hash common.Hash) (map[string]interface{}, error) GetLogs(ctx context.Context, crit filters.FilterCriteria) ([]*types.Log, error) // Uncle related (see ./eth_uncles.go) GetUncleByBlockNumberAndIndex(ctx context.Context, blockNr rpc.BlockNumber, index hexutil.Uint) (map[string]interface{}, error) GetUncleByBlockHashAndIndex(ctx context.Context, hash common.Hash, index hexutil.Uint) (map[string]interface{}, error) GetUncleCountByBlockNumber(ctx context.Context, number rpc.BlockNumber) (*hexutil.Uint, error) GetUncleCountByBlockHash(ctx context.Context, hash common.Hash) (*hexutil.Uint, error) // Filter related (see ./eth_filters.go) NewPendingTransactionFilter(_ context.Context) (hexutil.Uint64, error) NewBlockFilter(_ context.Context) (hexutil.Uint64, error) NewFilter(_ context.Context, filter interface{}) (hexutil.Uint64, error) UninstallFilter(_ context.Context, index hexutil.Uint64) (bool, error) GetFilterChanges(_ context.Context, index hexutil.Uint64) ([]interface{}, error) // Account related (see ./eth_accounts.go) Accounts(ctx context.Context) ([]common.Address, error) GetBalance(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Big, error) GetTransactionCount(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (*hexutil.Uint64, error) GetStorageAt(ctx context.Context, address common.Address, index string, blockNrOrHash rpc.BlockNumberOrHash) (string, error) GetCode(ctx context.Context, address common.Address, blockNrOrHash rpc.BlockNumberOrHash) (hexutil.Bytes, error) // System related (see ./eth_system.go) BlockNumber(ctx context.Context) (hexutil.Uint64, error) Syncing(ctx context.Context) (interface{}, error) ChainId(ctx context.Context) (hexutil.Uint64, error) /* called eth_protocolVersion elsewhere */ ProtocolVersion(_ context.Context) (hexutil.Uint, error) GasPrice(_ context.Context) (*hexutil.Big, error) // Sending related (see ./eth_call.go) Call(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, overrides *map[common.Address]ethapi.Account) (hexutil.Bytes, error) EstimateGas(ctx context.Context, args ethapi.CallArgs) (hexutil.Uint64, error) SendRawTransaction(ctx context.Context, encodedTx hexutil.Bytes) (common.Hash, error) SendTransaction(_ context.Context, txObject interface{}) (common.Hash, error) Sign(ctx context.Context, _ common.Address, _ hexutil.Bytes) (hexutil.Bytes, error) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error) GetProof(ctx context.Context, address common.Address, storageKeys []string, blockNr rpc.BlockNumber) (*interface{}, error) // Mining related (see ./eth_mining.go) Coinbase(_ context.Context) (common.Address, error) Hashrate(_ context.Context) (uint64, error) Mining(_ context.Context) (bool, error) GetWork(_ context.Context) ([]interface{}, error) SubmitWork(_ context.Context, nonce rpc.BlockNumber, powHash, digest common.Hash) (bool, error) SubmitHashrate(_ context.Context, hashRate common.Hash, id string) (bool, error) // Deprecated commands in eth_ (proposed file: ./eth_deprecated.go) GetCompilers(_ context.Context) ([]string, error) CompileLLL(_ context.Context, _ string) (hexutil.Bytes, error) CompileSolidity(ctx context.Context, _ string) (hexutil.Bytes, error) CompileSerpent(ctx context.Context, _ string) (hexutil.Bytes, error) }
EthAPI is a collection of functions that are exposed in the
type GethTrace ¶
type GethTrace struct { Type string `json:"type"` Error string `json:"error"` From string `json:"from"` To string `json:"to"` Value string `json:"value"` Gas string `json:"gas"` GasUsed string `json:"gasUsed"` Input string `json:"input"` Output string `json:"output"` Time string `json:"time"` Calls GethTraces `json:"calls"` }
GethTrace The trace as received from the existing Geth javascript tracer 'callTracer'
type Issuance ¶
type Issuance struct { BlockReward string `json:"blockReward,omitempty"` UncleReward string `json:"uncleReward,omitempty"` Issuance string `json:"issuance,omitempty"` }
Issuance structure to return information about issuance
type NetAPI ¶
type NetAPI interface { Listening(_ context.Context) (bool, error) Version(_ context.Context) (string, error) PeerCount(_ context.Context) (hexutil.Uint, error) }
NetAPI the interface for the net_ RPC commands
type NetAPIImpl ¶
type NetAPIImpl struct {
// contains filtered or unexported fields
}
NetAPIImpl data structure to store things needed for net_ commands
func NewNetAPIImpl ¶
func NewNetAPIImpl(eth ethdb.Backend) *NetAPIImpl
NewNetAPIImpl returns NetAPIImplImpl instance
func (*NetAPIImpl) Listening ¶
func (api *NetAPIImpl) Listening(_ context.Context) (bool, error)
Listening implements net_listening. Returns true if client is actively listening for network connections. TODO: Remove hard coded value
type OeTracer ¶
type OeTracer struct {
// contains filtered or unexported fields
}
OpenEthereum-style tracer
func (*OeTracer) CaptureAccountRead ¶
func (*OeTracer) CaptureAccountWrite ¶
func (*OeTracer) CaptureEnd ¶
func (*OeTracer) CaptureFault ¶
func (*OeTracer) CaptureSelfDestruct ¶
func (*OeTracer) CaptureStart ¶
type ParityTrace ¶
type ParityTrace struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients Action interface{} `json:"action"` // Can be either CallTraceAction or CreateTraceAction BlockHash *common.Hash `json:"blockHash,omitempty"` BlockNumber *uint64 `json:"blockNumber,omitempty"` Error string `json:"error,omitempty"` Result interface{} `json:"result,omitempty"` Subtraces int `json:"subtraces"` TraceAddress []int `json:"traceAddress"` TransactionHash *common.Hash `json:"transactionHash,omitempty"` TransactionPosition *uint64 `json:"transactionPosition,omitempty"` Type string `json:"type"` }
ParityTrace A trace in the desired format (Parity/OpenEtherum) See: https://openethereum.github.io/wiki/JSONRPC-trace-module
func (ParityTrace) String ¶
func (t ParityTrace) String() string
Allows for easy printing of a parity trace for debugging
type PrivateDebugAPI ¶
type PrivateDebugAPI interface { StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, contractAddress common.Address, keyStart hexutil.Bytes, maxResult int) (StorageRangeResult, error) TraceTransaction(ctx context.Context, hash common.Hash, config *tracers.TraceConfig) (interface{}, error) AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, start []byte, maxResults int, nocode, nostorage, incompletes bool) (state.IteratorDump, error) GetModifiedAccountsByNumber(ctx context.Context, startNum rpc.BlockNumber, endNum *rpc.BlockNumber) ([]common.Address, error) GetModifiedAccountsByHash(_ context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *tracers.TraceConfig) (interface{}, error) AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, account common.Address) (*AccountResult, error) }
PrivateDebugAPI Exposed RPC endpoints for debugging use
type PrivateDebugAPIImpl ¶
type PrivateDebugAPIImpl struct { *BaseAPI GasCap uint64 // contains filtered or unexported fields }
PrivateDebugAPIImpl is implementation of the PrivateDebugAPI interface based on remote Db access
func NewPrivateDebugAPI ¶
func NewPrivateDebugAPI(dbReader ethdb.Database, gascap uint64) *PrivateDebugAPIImpl
NewPrivateDebugAPI returns PrivateDebugAPIImpl instance
func (*PrivateDebugAPIImpl) AccountAt ¶
func (api *PrivateDebugAPIImpl) AccountAt(ctx context.Context, blockHash common.Hash, txIndex uint64, address common.Address) (*AccountResult, error)
func (*PrivateDebugAPIImpl) AccountRange ¶
func (api *PrivateDebugAPIImpl) AccountRange(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash, startKey []byte, maxResults int, excludeCode, excludeStorage, excludeMissingPreimages bool) (state.IteratorDump, error)
AccountRange implements debug_accountRange. Returns a range of accounts involved in the given block range
func (*PrivateDebugAPIImpl) GetModifiedAccountsByHash ¶
func (api *PrivateDebugAPIImpl) GetModifiedAccountsByHash(ctx context.Context, startHash common.Hash, endHash *common.Hash) ([]common.Address, error)
GetModifiedAccountsByHash implements debug_getModifiedAccountsByHash. Returns a list of accounts modified in the given block.
func (*PrivateDebugAPIImpl) GetModifiedAccountsByNumber ¶
func (api *PrivateDebugAPIImpl) GetModifiedAccountsByNumber(ctx context.Context, startNumber rpc.BlockNumber, endNumber *rpc.BlockNumber) ([]common.Address, error)
GetModifiedAccountsByNumber implements debug_getModifiedAccountsByNumber. Returns a list of accounts modified in the given block.
func (*PrivateDebugAPIImpl) StorageRangeAt ¶
func (api *PrivateDebugAPIImpl) StorageRangeAt(ctx context.Context, blockHash common.Hash, txIndex uint64, contractAddress common.Address, keyStart hexutil.Bytes, maxResult int) (StorageRangeResult, error)
StorageRangeAt implements debug_storageRangeAt. Returns information about a range of storage locations (if any) for the given address.
func (*PrivateDebugAPIImpl) TraceCall ¶
func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *tracers.TraceConfig) (interface{}, error)
func (*PrivateDebugAPIImpl) TraceTransaction ¶
func (api *PrivateDebugAPIImpl) TraceTransaction(ctx context.Context, hash common.Hash, config *tracers.TraceConfig) (interface{}, error)
TraceTransaction implements debug_traceTransaction. Returns Geth style transaction traces.
type RPCTransaction ¶
type RPCTransaction struct { BlockHash *common.Hash `json:"blockHash"` BlockNumber *hexutil.Big `json:"blockNumber"` From common.Address `json:"from"` Gas hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Hash common.Hash `json:"hash"` Input hexutil.Bytes `json:"input"` Nonce hexutil.Uint64 `json:"nonce"` R *hexutil.Big `json:"r"` S *hexutil.Big `json:"s"` To *common.Address `json:"to"` TransactionIndex *hexutil.Uint64 `json:"transactionIndex"` V *hexutil.Big `json:"v"` Value *hexutil.Big `json:"value"` }
RPCTransaction represents a transaction that will serialize to the RPC representation of a transaction
type SHHAPI ¶
type SHHAPI interface { Post(_ context.Context, _ SHHPost) (bool, error) Version(_ context.Context) (string, error) NewIdentity(_ context.Context) (string, error) HasIdentity(_ context.Context, _ string) (bool, error) NewGroup(_ context.Context) (string, error) AddToGroup(_ context.Context, _ string) (bool, error) NewFilter(_ context.Context, _ SHHFilter) (hexutil.Uint, error) UninstallFilter(_ context.Context, _ hexutil.Uint) (bool, error) GetFilterChanges(_ context.Context, _ hexutil.Uint) ([]string, error) GetMessages(_ context.Context, _ hexutil.Uint) ([]string, error) }
SHHAPI the interface for the shh_ RPC commands (deprecated)
type SHHAPIImpl ¶
type SHHAPIImpl struct {
// contains filtered or unexported fields
}
SHHAPIImpl data structure to store things needed for shh_ commands
func (*SHHAPIImpl) AddToGroup ¶
AddToGroup implements shh_addToGroup. Add to a group. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) GetFilterChanges ¶
GetFilterChanges implements shh_getFilterChanges. Polling method for whisper filters. Returns new messages since the last call of this method. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) GetMessages ¶
GetMessages implements shh_getMessages. Get all messages matching a filter. Unlike shh_getFilterChanges this returns all messages. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) HasIdentity ¶
HasIdentity implements shh_hasIdentity. Checks if the client hold the private keys for a given identity. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) NewFilter ¶
NewFilter implements shh_newFilter. Creates filter to notify, when client receives whisper message matching the filter options. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) NewGroup ¶
func (api *SHHAPIImpl) NewGroup(_ context.Context) (string, error)
NewGroup implements shh_newGroup. Create a new group. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) NewIdentity ¶
func (api *SHHAPIImpl) NewIdentity(_ context.Context) (string, error)
NewIdentity implements shh_newIdentity. Creates new whisper identity in the client. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) Post ¶
Post implements shh_post. Sends a whisper message. Deprecated: This function will be removed in the future.
func (*SHHAPIImpl) UninstallFilter ¶
UninstallFilter implements shh_uninstallFilter. Uninstalls a filter with given id. Deprecated: This function will be removed in the future.
type SHHFilter ¶
type SHHFilter struct {
// contains filtered or unexported fields
}
SHHFilter type for shh_newFilter command
type SHHPost ¶
type SHHPost struct {
// contains filtered or unexported fields
}
SHHPost type for shh_post command (deprecated)
type StateDiff ¶
type StateDiff struct {
// contains filtered or unexported fields
}
Implements core/state/StateWriter to provide state diffs
func (*StateDiff) CompareStates ¶
func (sd *StateDiff) CompareStates(initialIbs, ibs *state.IntraBlockState)
CompareStates uses the addresses accumulated in the sdMap and compares balances, nonces, and codes of the accounts, and fills the rest of the sdMap
func (*StateDiff) CreateContract ¶
func (*StateDiff) DeleteAccount ¶
func (*StateDiff) UpdateAccountCode ¶
func (*StateDiff) UpdateAccountData ¶
type StateDiffAccount ¶
type StateDiffAccount struct { Balance interface{} `json:"balance"` // Can be either string "=" or mapping "*" => {"from": "hex", "to": "hex"} Code interface{} `json:"code"` Nonce interface{} `json:"nonce"` Storage map[common.Hash]map[string]interface{} `json:"storage"` }
StateDiffAccount is the part of `trace_call` response that is under "stateDiff" tag
type StateDiffBalance ¶
type StateDiffCode ¶
type StateDiffNonce ¶
type StateDiffStorage ¶
type StorageEntry ¶
StorageEntry an entry in storage of the account
type StorageMap ¶
type StorageMap map[common.Hash]StorageEntry
StorageMap a map from storage locations to StorageEntry items
type StorageRangeResult ¶
type StorageRangeResult struct { Storage StorageMap `json:"storage"` NextKey *common.Hash `json:"nextKey"` // nil if Storage includes the last key in the trie. }
StorageRangeResult is the result of a debug_storageRangeAt API call.
func StorageRangeAt ¶
func StorageRangeAt(stateReader *adapter.StateReader, contractAddress common.Address, start []byte, maxResult int) (StorageRangeResult, error)
type SuicideTraceAction ¶
type TgAPI ¶
type TgAPI interface { // System related (see ./tg_system.go) Forks(ctx context.Context) (Forks, error) // Blocks related (see ./tg_blocks.go) GetHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) GetHeaderByHash(_ context.Context, hash common.Hash) (*types.Header, error) // Receipt related (see ./tg_receipts.go) GetLogsByHash(ctx context.Context, hash common.Hash) ([][]*types.Log, error) // Issuance / reward related (see ./tg_issuance.go) // BlockReward(ctx context.Context, blockNr rpc.BlockNumber) (Issuance, error) // UncleReward(ctx context.Context, blockNr rpc.BlockNumber) (Issuance, error) Issuance(ctx context.Context, blockNr rpc.BlockNumber) (Issuance, error) }
TgAPI TurboGeth specific routines
type TgImpl ¶
type TgImpl struct { *BaseAPI // contains filtered or unexported fields }
TgImpl is implementation of the TgAPI interface
func (*TgImpl) Forks ¶
Forks implements tg_forks. Returns the genesis block hash and a sorted list of all forks block numbers
func (*TgImpl) GetHeaderByHash ¶
GetHeaderByHash implements tg_getHeaderByHash. Returns a block's header given a block's hash.
func (*TgImpl) GetHeaderByNumber ¶
func (api *TgImpl) GetHeaderByNumber(ctx context.Context, blockNumber rpc.BlockNumber) (*types.Header, error)
GetHeaderByNumber implements tg_getHeaderByNumber. Returns a block's header given a block number ignoring the block's transaction and uncle list (may be faster).
func (*TgImpl) GetLogsByHash ¶
GetLogsByHash implements tg_getLogsByHash. Returns an array of arrays of logs generated by the transactions in the block given by the block's hash.
type TraceAPI ¶
type TraceAPI interface { // Ad-hoc (see ./trace_adhoc.go) ReplayBlockTransactions(ctx context.Context, blockNr rpc.BlockNumber, traceTypes []string) ([]interface{}, error) ReplayTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error) Call(ctx context.Context, call TraceCallParam, types []string, blockNr *rpc.BlockNumberOrHash) (*TraceCallResult, error) CallMany(ctx context.Context, calls json.RawMessage, blockNr *rpc.BlockNumberOrHash) ([]*TraceCallResult, error) RawTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error) // Filtering (see ./trace_filtering.go) Transaction(ctx context.Context, txHash common.Hash) (ParityTraces, error) Get(ctx context.Context, txHash common.Hash, txIndicies []hexutil.Uint64) (*ParityTrace, error) Block(ctx context.Context, blockNr rpc.BlockNumber) (ParityTraces, error) Filter(ctx context.Context, req TraceFilterRequest) (ParityTraces, error) }
TraceAPI RPC interface into tracing API
type TraceAPIImpl ¶
type TraceAPIImpl struct { *BaseAPI // contains filtered or unexported fields }
TraceAPIImpl is implementation of the TraceAPI interface based on remote Db access
func NewTraceAPI ¶
func NewTraceAPI(dbReader ethdb.Database, cfg *cli.Flags) *TraceAPIImpl
NewTraceAPI returns NewTraceAPI instance
func (*TraceAPIImpl) Block ¶
func (api *TraceAPIImpl) Block(ctx context.Context, blockNr rpc.BlockNumber) (ParityTraces, error)
Block implements trace_block
func (*TraceAPIImpl) Call ¶
func (api *TraceAPIImpl) Call(ctx context.Context, args TraceCallParam, traceTypes []string, blockNrOrHash *rpc.BlockNumberOrHash) (*TraceCallResult, error)
Call implements trace_call.
func (*TraceAPIImpl) CallMany ¶
func (api *TraceAPIImpl) CallMany(ctx context.Context, calls json.RawMessage, blockNrOrHash *rpc.BlockNumberOrHash) ([]*TraceCallResult, error)
CallMany implements trace_callMany.
func (*TraceAPIImpl) Filter ¶
func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest) (ParityTraces, error)
Filter implements trace_filter TODO(tjayrush): Eventually, we will need to protect ourselves from 'large' queries. Parity crashes when a range query of a very large size is sent. We need to protect ourselves with maxTraces. It may already be done
func (*TraceAPIImpl) Get ¶
func (api *TraceAPIImpl) Get(ctx context.Context, txHash common.Hash, indicies []hexutil.Uint64) (*ParityTrace, error)
Get implements trace_get TODO(tjayrush): This command should take an rpc.BlockNumber .This would allow blockNumbers and 'latest', TODO(tjayrush): 'pending', etc. Parity only accepts block hash. TODO(tjayrush): Also, for some reason, Parity definesthe second parameter as an array of indexes, but TODO(tjayrush): only accepts a single one TODO(tjayrush): I think this should return an interface{}, so we can return both Parity and Geth traces
func (*TraceAPIImpl) RawTransaction ¶
func (api *TraceAPIImpl) RawTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)
RawTransaction implements trace_rawTransaction.
func (*TraceAPIImpl) ReplayBlockTransactions ¶
func (api *TraceAPIImpl) ReplayBlockTransactions(ctx context.Context, blockNr rpc.BlockNumber, traceTypes []string) ([]interface{}, error)
ReplayBlockTransactions implements trace_replayBlockTransactions.
func (*TraceAPIImpl) ReplayTransaction ¶
func (api *TraceAPIImpl) ReplayTransaction(ctx context.Context, txHash common.Hash, traceTypes []string) ([]interface{}, error)
ReplayTransaction implements trace_replayTransaction.
func (*TraceAPIImpl) Transaction ¶
func (api *TraceAPIImpl) Transaction(ctx context.Context, txHash common.Hash) (ParityTraces, error)
Transaction implements trace_transaction TODO(tjayrush): I think this should return an []interface{}, so we can return both Parity and Geth traces
type TraceAction ¶
type TraceAction struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients Author string `json:"author,omitempty"` RewardType string `json:"rewardType,omitempty"` SelfDestructed string `json:"address,omitempty"` Balance string `json:"balance,omitempty"` CallType string `json:"callType,omitempty"` From common.Address `json:"from"` Gas hexutil.Big `json:"gas"` Init hexutil.Bytes `json:"init,omitempty"` Input hexutil.Bytes `json:"input,omitempty"` RefundAddress string `json:"refundAddress,omitempty"` To string `json:"to,omitempty"` Value string `json:"value,omitempty"` }
TraceAction A parity formatted trace action
type TraceCallParam ¶
type TraceCallParam struct { From *common.Address `json:"from"` To *common.Address `json:"to"` Gas *hexutil.Uint64 `json:"gas"` GasPrice *hexutil.Big `json:"gasPrice"` Value *hexutil.Big `json:"value"` Data hexutil.Bytes `json:"data"` }
TraceCallParam (see SendTxArgs -- this allows optional prams plus don't use MixedcaseAddress
type TraceCallResult ¶
type TraceCallResult struct { Output hexutil.Bytes `json:"output"` StateDiff map[common.Address]*StateDiffAccount `json:"stateDiff"` Trace []*ParityTrace `json:"trace"` VmTrace *TraceCallVmTrace `json:"vmTrace"` }
TraceCallResult is the response to `trace_call` method
type TraceCallVmTrace ¶
type TraceCallVmTrace struct { }
TraceCallVmTrace is the part of `trace_call` response that is under "vmTrace" tag
type TraceFilterRequest ¶
type TraceFilterRequest struct { FromBlock *hexutil.Uint64 `json:"fromBlock"` ToBlock *hexutil.Uint64 `json:"toBlock"` FromAddress []*common.Address `json:"fromAddress"` ToAddress []*common.Address `json:"toAddress"` After *uint64 `json:"after"` Count *uint64 `json:"count"` }
TraceFilterRequest represents the arguments for trace_filter
type TraceResult ¶
type TraceResult struct { // Do not change the ordering of these fields -- allows for easier comparison with other clients GasUsed *hexutil.Big `json:"gasUsed"` Output hexutil.Bytes `json:"output"` }
TraceResult A parity formatted trace result
type Web3API ¶
type Web3API interface { ClientVersion(_ context.Context) (string, error) Sha3(_ context.Context, input hexutil.Bytes) hexutil.Bytes }
Web3API provides interfaces for the web3_ RPC commands
type Web3APIImpl ¶
type Web3APIImpl struct {
*BaseAPI
}
func NewWeb3APIImpl ¶
func NewWeb3APIImpl() *Web3APIImpl
NewWeb3APIImpl returns Web3APIImpl instance
func (*Web3APIImpl) ClientVersion ¶
func (api *Web3APIImpl) ClientVersion(_ context.Context) (string, error)
ClientVersion implements web3_clientVersion. Returns the current client version.
Source Files ¶
- daemon.go
- db_api_deprecated.go
- debug_api.go
- error_messages.go
- eth_accounts.go
- eth_api.go
- eth_block.go
- eth_call.go
- eth_deprecated.go
- eth_filters.go
- eth_mining.go
- eth_receipts.go
- eth_system.go
- eth_txs.go
- eth_uncles.go
- net_api.go
- rpc_block.go
- send_transaction.go
- shh_api_deprecated.go
- storage_range.go
- test_util.go
- tg_api.go
- tg_block.go
- tg_issuance.go
- tg_receipts.go
- tg_system.go
- trace_adhoc.go
- trace_api.go
- trace_filtering.go
- trace_types.go
- tracing.go
- web3_api.go