EventInfo
in package
Part of the getEvents request.
Tags
Table of Contents
Properties
- $contractId : string
- $id : string
- $inSuccessfulContractCall : bool|null
- $ledger : int
- $ledgerClosedAt : string
- $opIndex : int|null
- $topic : array<string|int, mixed>
- $txHash : string
- $txIndex : int|null
- $type : string
- $value : string
Methods
- __construct() : mixed
- fromJson() : static
- Creates an instance from JSON-RPC response data
- getContractId() : string
- getId() : string
- getInSuccessfulContractCall() : bool|null
- getLedger() : int
- getLedgerClosedAt() : string
- getOpIndex() : int|null
- getTopic() : array<string|int, string>
- getTxHash() : string
- getTxIndex() : int|null
- getType() : string
- getValue() : string
- setContractId() : void
- setId() : void
- setInSuccessfulContractCall() : void
- setLedger() : void
- setLedgerClosedAt() : void
- setOpIndex() : void
- setTopic() : void
- setTxHash() : void
- setTxIndex() : void
- setType() : void
- setValue() : void
Properties
$contractId
public
string
$contractId
$id
public
string
$id
$inSuccessfulContractCall
public
bool|null
$inSuccessfulContractCall
$ledger
public
int
$ledger
$ledgerClosedAt
public
string
$ledgerClosedAt
$opIndex
public
int|null
$opIndex
= null
$topic
public
array<string|int, mixed>
$topic
$txHash
public
string
$txHash
$txIndex
public
int|null
$txIndex
= null
$type
public
string
$type
$value
public
string
$value
Methods
__construct()
public
__construct(string $type, int $ledger, string $ledgerClosedAt, string $contractId, string $id, array<string|int, string> $topic, string $value, bool|null $inSuccessfulContractCall, string $txHash[, int|null $opIndex = null ][, int|null $txIndex = null ]) : mixed
Parameters
- $type : string
-
The type of event emission (contract, diagnostic, or system)
- $ledger : int
-
Sequence number of the ledger in which this event was emitted
- $ledgerClosedAt : string
-
ISO-8601 timestamp of the ledger closing time
- $contractId : string
-
StrKey representation of the contract address that emitted this event
- $id : string
-
Unique identifier for this event
- $topic : array<string|int, string>
-
List of topic values this event was emitted with (1-4 items)
- $value : string
-
The emitted body value of the event (base64-encoded XDR string)
- $inSuccessfulContractCall : bool|null
-
Deprecated indicator if the event was emitted during successful contract call
- $txHash : string
-
The transaction hash which triggered this event
- $opIndex : int|null = null
-
Operation index within the transaction (protocol >= 23)
- $txIndex : int|null = null
-
Transaction index within the ledger (protocol >= 23)
fromJson()
Creates an instance from JSON-RPC response data
public
static fromJson(array<string, mixed> $json) : static
Parameters
- $json : array<string, mixed>
-
The JSON response data
Return values
static —The created instance
getContractId()
public
getContractId() : string
Return values
string —StrKey representation of the contract address that emitted this event
getId()
public
getId() : string
Return values
string —Unique identifier for this event
getInSuccessfulContractCall()
public
getInSuccessfulContractCall() : bool|null
Return values
bool|null —Deprecated indicator if the event was emitted during successful contract call
getLedger()
public
getLedger() : int
Return values
int —Sequence number of the ledger in which this event was emitted
getLedgerClosedAt()
public
getLedgerClosedAt() : string
Return values
string —ISO-8601 timestamp of the ledger closing time
getOpIndex()
public
getOpIndex() : int|null
Return values
int|null —Operation index within the transaction (protocol >= 23)
getTopic()
public
getTopic() : array<string|int, string>
Return values
array<string|int, string> —List of topic values this event was emitted with
getTxHash()
public
getTxHash() : string
Return values
string —The transaction hash which triggered this event
getTxIndex()
public
getTxIndex() : int|null
Return values
int|null —Transaction index within the ledger (protocol >= 23)
getType()
public
getType() : string
Return values
string —The type of event emission (contract, diagnostic, or system)
getValue()
public
getValue() : string
Return values
string —The emitted body value of the event (base64-encoded XDR string)
setContractId()
public
setContractId(string $contractId) : void
Parameters
- $contractId : string
-
StrKey representation of the contract address
setId()
public
setId(string $id) : void
Parameters
- $id : string
-
Unique identifier for this event
setInSuccessfulContractCall()
public
setInSuccessfulContractCall(bool|null $inSuccessfulContractCall) : void
Parameters
- $inSuccessfulContractCall : bool|null
-
Deprecated success indicator
setLedger()
public
setLedger(int $ledger) : void
Parameters
- $ledger : int
-
Sequence number of the ledger
setLedgerClosedAt()
public
setLedgerClosedAt(string $ledgerClosedAt) : void
Parameters
- $ledgerClosedAt : string
-
ISO-8601 timestamp of the ledger closing time
setOpIndex()
public
setOpIndex(int|null $opIndex) : void
Parameters
- $opIndex : int|null
-
Operation index
setTopic()
public
setTopic(array<string|int, string> $topic) : void
Parameters
- $topic : array<string|int, string>
-
List of topic values
setTxHash()
public
setTxHash(string $txHash) : void
Parameters
- $txHash : string
-
The transaction hash
setTxIndex()
public
setTxIndex(int|null $txIndex) : void
Parameters
- $txIndex : int|null
-
Transaction index
setType()
public
setType(string $type) : void
Parameters
- $type : string
-
The type of event emission
setValue()
public
setValue(string $value) : void
Parameters
- $value : string
-
The emitted body value of the event