Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
|
Public Member Functions | |
calcAvgTip (int $blockNumbers=3) | |
isLookingLikeLondon () | |
web3ClientVersion () | |
web3Sha3Keccak (string $inputHex) | |
web3Sha3KeccakBin (string $inputBin) | |
netVersion () | |
netListening () | |
netPeerCount () | |
ethProtocolVersion () | |
ethSyncing () | |
ethCoinbase () | |
ethChainID () | |
ethMining () | |
ethHashrate () | |
ethGasPrice () | |
ethAccounts () | |
ethBlockNumber () | |
ethGetBalance (Address $address, int|BlockParam $blockParam=BlockParam::LATEST) | |
ethGetStorageAt (Address $address, OOGmp $position, int|BlockParam $blockParam=BlockParam::LATEST) | |
ethGetTransactionCount (Address $address, int|BlockParam $blockParam=BlockParam::PENDING) | |
ethGetBlockTransactionCountByHash (Hash|Block $block) | |
ethGetBlockTransactionCountByNumber (int|BlockParam $blockParam=BlockParam::LATEST) | |
ethGetUncleCountByBlockHash (Hash|Block $block) | |
ethGetUncleCountByBlockNumber (int|BlockParam $blockParam=BlockParam::LATEST) | |
ethGetCode (Address $address, int|BlockParam $blockParam=BlockParam::LATEST) | |
ethSign (Address $address, string $dataHex) | |
ethSignTransaction (Transaction $txn, Address $from) | |
ethSendTransaction (Transaction $txn, Address $from) | |
ethSendRawTransaction (Transaction $signedTransaction) | |
ethSendRawTransactionHex (string $rawTransactionHex) | |
ethCall (Transaction $message, ?Address $from=null, int|BlockParam $blockParam=BlockParam::LATEST) | |
ethEstimateGas (Transaction $txn, ?Address $from) | |
ethGetBlockByHash (Hash $hash, bool $fullBlock=false) | |
ethGetBlockByNumber (int|BlockParam $blockParam=BlockParam::LATEST, bool $fullBlock=false) | |
ethGetTransactionByHash (Hash $hash) | |
ethGetTransactionByBlockHashAndIndex (Hash $hash, int $index) | |
ethGetTransactionByBlockNumberAndIndex (int|BlockParam $blockParam, int $index) | |
ethGetTransactionReceipt (Hash $hash) | |
ethGetUncleByBlockHashAndIndex (Hash $hash, int $unclePos) | |
ethGetUncleByBlockNumberAndIndex (int|BlockParam $blockParam, int $unclePos) | |
ethMaxPriorityFeePerGas () | |
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) | |
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) | |
ethGetFilterChanges (OOGmp $filterId) | |
ethGetFilterLogs (OOGmp $filterId) | |
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 | |
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) | |
Compound adds elements for useful queries done to RPC with some processing - for example getting avarage of fee tip in blocks range
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 |
M8B\EtherBinder\RPC\Compound::calcAvgTip | ( | int | $blockNumbers = 3 | ) |
Calculates the average EIP1559 tip over a range of blocks. If the underlying chain doesn't look like EIP1559 chain, it returns fallback of 1 GWEI.
int | $blockNumbers | number of recent blocks to consider |
EthBinderLogicException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
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 |
|
inherited |
EthBinderLogicException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
EthBinderLogicException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
Hash | $hash | |
bool | $fullBlock |
EthBinderLogicException | |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
inherited |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
OOGmp | $filterId |
BadAddressChecksumException | |
EthBinderLogicException | |
InvalidHexException | |
InvalidHexLengthException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
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 |
|
inherited |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
inherited |
NotSupportedException | |
EthBinderLogicException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
NotSupportedException | |
EthBinderLogicException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
EthBinderLogicException | |
NotSupportedException | |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
NotSupportedException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderLogicException |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
EthBinderRuntimeException |
|
inherited |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
|
inherited |
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 |
|
inherited |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException | |
UnexpectedUnsignedException | |
EthBinderArgumentException |
|
inherited |
string | $rawTransactionHex |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
M8B\EtherBinder\RPC\Compound::isLookingLikeLondon | ( | ) |
Checks whether the network seems to be like London (EIP-1559) by checking block data fields that are EIP1559 specific
EthBinderLogicException | |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException |
|
inherited |
RPCNotFoundException | |
RPCInvalidResponseParamException | |
RPCGeneralException | |
EthBinderRuntimeException |
|
inherited |
RPCInvalidResponseParamException | |
RPCGeneralException | |
RPCNotFoundException |
|
protectedinherited |
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.
|
inherited |
RPCGeneralException | |
RPCNotFoundException | |
RPCInvalidResponseParamException |
|
inherited |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |
|
inherited |
RPCGeneralException | |
RPCInvalidResponseParamException | |
RPCNotFoundException |