Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
Loading...
Searching...
No Matches
M8B\EtherBinder\RPC\Modules\Debug Class Reference
Inheritance diagram for M8B\EtherBinder\RPC\Modules\Debug:
M8B\EtherBinder\RPC\Modules\AbstractModule M8B\EtherBinder\RPC\Modules\Eth M8B\EtherBinder\RPC\Modules\Net M8B\EtherBinder\RPC\Modules\Web3 M8B\EtherBinder\RPC\Compound M8B\EtherBinder\RPC\AbstractRPC M8B\EtherBinder\RPC\HttpRPC

Public Member Functions

 debugGetRawBlock (int|BlockParam $blockParam=BlockParam::LATEST)
 
 debugGetRawHeader (int|BlockParam $blockParam=BlockParam::LATEST)
 
 debugGetRawReceipts (int|BlockParam $blockParam=BlockParam::LATEST)
 
 debugGetRawTransaction (Hash $h)
 
 runRpc (string $method, ?array $params=null)
 

Protected Member Functions

 blockParam (int|BlockParam $blockNumber)
 
 blockHash (Hash|Block $block)
 

Member Function Documentation

◆ blockHash()

M8B\EtherBinder\RPC\Modules\AbstractModule::blockHash ( Hash|Block $block)
protectedinherited

Either extracts block hash from block and returns it as hex string, or returns hash hex string. Used for parameter normalization in RPC calls, for convenience of API.

Parameters
Hash | Block$blockthe block object or a Hash object
Returns
string hexadecimal representation of the block hash

◆ blockParam()

M8B\EtherBinder\RPC\Modules\AbstractModule::blockParam ( int|BlockParam $blockNumber)
protectedinherited

Normalizes a block number parameter for RPC calls.

Parameters
int | BlockParam$blockNumberthe block number or a BlockParam object
Returns
string hexadecimal representation of the block number or RPC alias string, such as "latest"

◆ debugGetRawBlock()

M8B\EtherBinder\RPC\Modules\Debug::debugGetRawBlock ( int|BlockParam $blockParam = BlockParam::LATEST)
Exceptions
EthBinderLogicException
RPCInvalidResponseParamException
RPCGeneralException
RPCNotFoundException

◆ debugGetRawHeader()

M8B\EtherBinder\RPC\Modules\Debug::debugGetRawHeader ( int|BlockParam $blockParam = BlockParam::LATEST)
Exceptions
EthBinderLogicException
RPCGeneralException
RPCInvalidResponseParamException
RPCNotFoundException

◆ debugGetRawReceipts()

M8B\EtherBinder\RPC\Modules\Debug::debugGetRawReceipts ( int|BlockParam $blockParam = BlockParam::LATEST)
Exceptions
EthBinderLogicException
RPCGeneralException
RPCInvalidResponseParamException
RPCNotFoundException

◆ debugGetRawTransaction()

M8B\EtherBinder\RPC\Modules\Debug::debugGetRawTransaction ( Hash $h)
Parameters
Hash$h
Returns
Transaction
Exceptions
BadAddressChecksumException
EthBinderLogicException
InvalidHexException
InvalidHexLengthException
NotSupportedException
RPCGeneralException
RPCInvalidResponseParamException
RPCNotFoundException
EthBinderRuntimeException

◆ runRpc()

M8B\EtherBinder\RPC\Modules\AbstractModule::runRpc ( string $method,
?array $params = null )
abstractinherited

Executes an RPC call with the given method and parameters.

Parameters
string$methodthe RPC method name
array | null$paramsoptional array of parameters for the RPC call
Returns
array result of the RPC call
array 'result' field of the RPC response. If the result is not an array, it's wrapped in an array under key 0.
Exceptions
RPCGeneralExceptionif any unexpected error is present in RPC response
RPCInvalidResponseParamExceptionif the 'result' field is missing in the response
RPCNotFoundExceptionif the method is not found

Reimplemented in M8B\EtherBinder\RPC\AbstractRPC.


The documentation for this class was generated from the following file: