EventFilter
in package
Event filter for the getEvents request.
Example usage:
$topicFilters = new TopicFilters(
new TopicFilter(["*", XdrSCVal::forSymbol("transfer")->toBase64Xdr()])
);
$eventFilter = new EventFilter(
type: "contract",
contractIds: ["CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABSC4"],
topics: $topicFilters
);
Tags
Table of Contents
Properties
- $contractIds : array<string|int, mixed>|null
- $topics : TopicFilters|null
- $type : string|null
Methods
- __construct() : mixed
- Constructor.
- getContractIds() : array<string|int, string>|null
- getRequestParams() : array<string, mixed>
- Builds and returns the request parameters array for the RPC API call.
- getTopics() : TopicFilters|null
- getType() : string|null
Properties
$contractIds
public
array<string|int, mixed>|null
$contractIds
= null
$topics
public
TopicFilters|null
$topics
= null
$type
public
string|null
$type
= null
Methods
__construct()
Constructor.
public
__construct([string|null $type = null ][, array<string|int, string>|null $contractIds = null ][, TopicFilters|null $topics = null ]) : mixed
Parameters
- $type : string|null = null
-
A comma separated list of event types (system, contract, or diagnostic) used to filter events. If omitted, all event types are included.
- $contractIds : array<string|int, string>|null = null
-
List of contract ids to query for events. If omitted, return events for all contracts. Maximum 5 contract IDs are allowed per request.
- $topics : TopicFilters|null = null
-
List of topic filters. If omitted, query for all events. If multiple filters are specified, events will be included if they match any of the filters. Maximum 5 filters are allowed per request.
getContractIds()
public
getContractIds() : array<string|int, string>|null
Return values
array<string|int, string>|nullgetRequestParams()
Builds and returns the request parameters array for the RPC API call.
public
getRequestParams() : array<string, mixed>
Return values
array<string, mixed> —The request parameters formatted for Soroban RPC
getTopics()
public
getTopics() : TopicFilters|null
Return values
TopicFilters|nullgetType()
public
getType() : string|null