RPCFilter
in package
RPCFilter is class that represents installed filter on RPC. It's meant for filtering logs.
Table of Contents
Properties
- $address : Address|array<string|int, mixed>
- $filterId : OOGmp
- $firstPass : bool
- $fromBlock : null|int|BlockParam
- $lastSeenBlockNumber : int
- $rpc : AbstractRPC
- $toBlock : null|int|BlockParam
- $topic0 : string|bool|HashSerializable|array<string|int, mixed>
- $topic1 : null|string|bool|HashSerializable|array<string|int, mixed>
- $topic2 : null|string|bool|HashSerializable|array<string|int, mixed>
- $topic3 : null|string|bool|HashSerializable|array<string|int, mixed>
Methods
- __construct() : mixed
- Instantiates new RPC filter. Uses same parameters as AbstractRPC::ethNewFilter and RPC instance.
- fetchNew() : array<string|int, Log>
- Fetches new logs from the filter
- isDone() : bool
- If toBlock was defined to concrete block number, will return false if the last seen block number is greater than provided toBlock in constructor.
- doFetchNew() : array<string|int, mixed>
- loadFilterID() : void
Properties
$address
protected
Address|array<string|int, mixed>
$address
$filterId
protected
OOGmp
$filterId
$firstPass
protected
bool
$firstPass
= true
$fromBlock
protected
null|int|BlockParam
$fromBlock
$lastSeenBlockNumber
protected
int
$lastSeenBlockNumber
= 0
$rpc
protected
AbstractRPC
$rpc
$toBlock
protected
null|int|BlockParam
$toBlock
$topic0
protected
string|bool|HashSerializable|array<string|int, mixed>
$topic0
$topic1
protected
null|string|bool|HashSerializable|array<string|int, mixed>
$topic1
= null
$topic2
protected
null|string|bool|HashSerializable|array<string|int, mixed>
$topic2
= null
$topic3
protected
null|string|bool|HashSerializable|array<string|int, mixed>
$topic3
= null
Methods
__construct()
Instantiates new RPC filter. Uses same parameters as AbstractRPC::ethNewFilter and RPC instance.
public
__construct(AbstractRPC $rpc, Address|array<string|int, mixed> $address, int|BlockParam|null $fromBlock, int|BlockParam|null $toBlock, string|bool|HashSerializable|array<string|int, mixed> $topic0[, string|bool|HashSerializable|array<string|int, mixed>|null $topic1 = null ][, string|bool|HashSerializable|array<string|int, mixed>|null $topic2 = null ][, string|bool|HashSerializable|array<string|int, mixed>|null $topic3 = null ]) : mixed
Parameters
- $rpc : AbstractRPC
- $address : Address|array<string|int, mixed>
- $fromBlock : int|BlockParam|null
- $toBlock : int|BlockParam|null
- $topic0 : string|bool|HashSerializable|array<string|int, mixed>
- $topic1 : string|bool|HashSerializable|array<string|int, mixed>|null = null
- $topic2 : string|bool|HashSerializable|array<string|int, mixed>|null = null
- $topic3 : string|bool|HashSerializable|array<string|int, mixed>|null = null
Tags
fetchNew()
Fetches new logs from the filter
public
fetchNew() : array<string|int, Log>
Tags
Return values
array<string|int, Log>isDone()
If toBlock was defined to concrete block number, will return false if the last seen block number is greater than provided toBlock in constructor.
public
isDone() : bool
Return values
booldoFetchNew()
protected
doFetchNew() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>loadFilterID()
protected
loadFilterID([bool $useInternalCounter = true ]) : void
Parameters
- $useInternalCounter : bool = true