Stellar PHP SDK API Documentation

EventFilter

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
see
EventFilters
see
https://soroban.stellar.org/api/methods/getEvents

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

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>|null

getRequestParams()

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

getType()

public getType() : string|null
Return values
string|null

        
On this page

Search results