Subscribe to events generated by vechain smart contracts. Events are created using the LOG
opcode in the Ethereum Virtual Machine (EVM).
Example:
// Filter the events by 'Transfer(address,address,uint256)'
const ws = new WebSocket('ws://localhost:8669/subscriptions/event?t0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef')
ws.onmessage = (event) => {
console.log(event.data)
}
OK
The address of the contract that produces the event (bytes20).
"0x0000000000000000000000000000456e65726779"
^0x[0-9a-f]{40}$
Topics are indexed parameters to an event. The first topic is always the event signature.
The data associated with the event.
"0x4de71f2d588aa8a1ea00fe8312d92966da424d9939a511fc0be81e65fad52af8"
^0x[0-9a-f]*$
Indicates whether the block containing this data has become obsolete (true) or not (false).
false
The event or transfer log metadata such as block number, block timestamp, etc.