Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
|
Protected Member Functions | |
parseFilterInput (Address|array $address, null|int|BlockParam $fromBlock, null|int|BlockParam $toBlock, null|Hash $blockHash, string|bool|HashSerializable|array $topic0, null|string|bool|HashSerializable|array $topic1=null, null|string|bool|HashSerializable|array $topic2=null, null|string|bool|HashSerializable|array $topic3=null) | |
blockParam (int|BlockParam $blockNumber) | |
blockHash (Hash|Block $block) | |
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.
Hash | Block | $block | the block object or a Hash object |
|
protectedinherited |
Normalizes a block number parameter for RPC calls.
int | BlockParam | $blockNumber | the block number or a BlockParam object |
|
inherited |
EthBinderLogicException | |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
inherited |
EthBinderLogicException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
EthBinderLogicException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
Hash | $h |
BadAddressChecksumException | |
EthBinderLogicException | |
InvalidHexException | |
InvalidHexLengthException | |
NotSupportedException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethAccounts | ( | ) |
EthBinderLogicException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethBlockNumber | ( | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethCall | ( | Transaction | $message, |
?Address | $from = null, | ||
int|BlockParam | $blockParam = BlockParam::LATEST ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethChainID | ( | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethCoinbase | ( | ) |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
EthBinderLogicException |
M8B\EtherBinder\RPC\Modules\Eth::ethEstimateGas | ( | Transaction | $txn, |
?Address | $from ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGasPrice | ( | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetBalance | ( | Address | $address, |
int|BlockParam | $blockParam = BlockParam::LATEST ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetBlockByHash | ( | Hash | $hash, |
bool | $fullBlock = false ) |
Hash | $hash | |
bool | $fullBlock |
EthBinderLogicException | |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetBlockByNumber | ( | int|BlockParam | $blockParam = BlockParam::LATEST, |
bool | $fullBlock = false ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetBlockTransactionCountByNumber | ( | int|BlockParam | $blockParam = BlockParam::LATEST | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetCode | ( | Address | $address, |
int|BlockParam | $blockParam = BlockParam::LATEST ) |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetFilterChanges | ( | OOGmp | $filterId | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetFilterLogs | ( | OOGmp | $filterId | ) |
OOGmp | $filterId |
BadAddressChecksumException | |
EthBinderLogicException | |
InvalidHexException | |
InvalidHexLengthException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetLogs | ( | Address|array | $address, |
null|int|BlockParam | $fromBlock, | ||
null|int|BlockParam | $toBlock, | ||
null|Hash | $blockHash, | ||
string|bool|HashSerializable|array | $topic0, | ||
null|string|bool|HashSerializable|array | $topic1 = null, | ||
null|string|bool|HashSerializable|array | $topic2 = null, | ||
null|string|bool|HashSerializable|array | $topic3 = null ) |
Address | array | $address | |
int | BlockParam | null | $fromBlock | if $blockHash not null, it MUST be null |
int | BlockParam | null | $toBlock | if $blockHash not null, it MUST be null |
Hash | null | $blockHash | if $fromBlock and/or $toBlock is not null, it MUST be null |
string | bool | HashSerializable | array | $topic0 | |
string | bool | HashSerializable | array | null | $topic1 | |
string | bool | HashSerializable | array | null | $topic2 | |
string | bool | HashSerializable | array | null | $topic3 |
BadAddressChecksumException | |
EthBinderArgumentException | |
EthBinderLogicException | |
InvalidHexException | |
InvalidHexLengthException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetStorageAt | ( | Address | $address, |
OOGmp | $position, | ||
int|BlockParam | $blockParam = BlockParam::LATEST ) |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetTransactionByBlockHashAndIndex | ( | Hash | $hash, |
int | $index ) |
NotSupportedException | |
EthBinderLogicException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetTransactionByBlockNumberAndIndex | ( | int|BlockParam | $blockParam, |
int | $index ) |
NotSupportedException | |
EthBinderLogicException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetTransactionByHash | ( | Hash | $hash | ) |
EthBinderLogicException | |
NotSupportedException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetTransactionCount | ( | Address | $address, |
int|BlockParam | $blockParam = BlockParam::PENDING ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetTransactionReceipt | ( | Hash | $hash | ) |
NotSupportedException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetUncleByBlockHashAndIndex | ( | Hash | $hash, |
int | $unclePos ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetUncleByBlockNumberAndIndex | ( | int|BlockParam | $blockParam, |
int | $unclePos ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethGetUncleCountByBlockNumber | ( | int|BlockParam | $blockParam = BlockParam::LATEST | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
M8B\EtherBinder\RPC\Modules\Eth::ethHashrate | ( | ) |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
M8B\EtherBinder\RPC\Modules\Eth::ethMaxPriorityFeePerGas | ( | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethMining | ( | ) |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
M8B\EtherBinder\RPC\Modules\Eth::ethNewFilter | ( | Address|array | $address, |
null|int|BlockParam | $fromBlock, | ||
null|int|BlockParam | $toBlock, | ||
string|bool|HashSerializable|array | $topic0, | ||
null|string|bool|HashSerializable|array | $topic1 = null, | ||
null|string|bool|HashSerializable|array | $topic2 = null, | ||
null|string|bool|HashSerializable|array | $topic3 = null ) |
Installs event filterer on rpc node and returns ID of the filter. Accepts few types, but bear in mind that string type is always considered to be binary blob.
int | BlockParam | null | $fromBlock | |
int | BlockParam | null | $toBlock | |
Address | Address[] | $address | |
string | bool | HashSerializable | string[] | bool[] | HashSerializable[] | $topic0 | |
null | string | bool | HashSerializable | string[] | bool[] | HashSerializable[] | $topic1 | |
null | string | bool | HashSerializable | string[] | bool[] | HashSerializable[] | $topic2 | |
null | string | bool | HashSerializable | string[] | bool[] | HashSerializable[] | $topic3 |
EthBinderArgumentException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
EthBinderLogicException |
M8B\EtherBinder\RPC\Modules\Eth::ethProtocolVersion | ( | ) |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethSendRawTransaction | ( | Transaction | $signedTransaction | ) |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
UnexpectedUnsignedException | |
EthBinderArgumentException |
M8B\EtherBinder\RPC\Modules\Eth::ethSendRawTransactionHex | ( | string | $rawTransactionHex | ) |
string | $rawTransactionHex |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethSendTransaction | ( | Transaction | $txn, |
Address | $from ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethSign | ( | Address | $address, |
string | $dataHex ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Modules\Eth::ethSignTransaction | ( | Transaction | $txn, |
Address | $from ) |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
M8B\EtherBinder\RPC\Modules\Eth::ethSyncing | ( | ) |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
protected |
EthBinderLogicException | |
EthBinderArgumentException |
EthBinderArgumentException |
|
abstractinherited |
Executes an RPC call with the given method and parameters.
string | $method | the RPC method name |
array | null | $params | optional array of parameters for the RPC call |
RPCGeneralException | if any unexpected error is present in RPC response |
RPCInvalidResponseParamException | if the 'result' field is missing in the response |
RPCNotFoundException | if the method is not found |
Reimplemented in M8B\EtherBinder\RPC\AbstractRPC.