mirror of
https://github.com/status-im/subspace-docs.git
synced 2025-02-08 02:43:25 +00:00
feat: docs for trackLogs() (#6)
This commit is contained in:
parent
5a3b3039bf
commit
5a5f79f161
13
api.md
13
api.md
@ -109,3 +109,16 @@ Track balance changes for an address on each block mined, or depending on the `c
|
||||
|
||||
**Returns**
|
||||
`RxJS Observable` which will stream a string containing the address balance.
|
||||
|
||||
### `trackLogs(options [, abi])`
|
||||
Tracks incoming logs, filtered by the given options.
|
||||
|
||||
**Parameters**
|
||||
1. `options` - `Object` (optional): web3 filter options object to limit the number of logs
|
||||
- `address` - `String|Array` (optional): An address or a list of addresses to only get logs from particular account(s).
|
||||
- `fromBlock` - `Number` (optional): The block number from which to get events on.
|
||||
- `topics` - `Array` (optional): An array of values which must each appear in the log entries. The order is important, if you want to leave topics out use null, e.g. [null, '0x00...']. You can also pass another array for each topic with options for that topic e.g. [null, ['option1', 'option2']].
|
||||
2. `abi` - `Array` (optional): Array containing the ABI for the inputs of the logs received. It will automatically decode the logs using this ABI instead of returning the hexadecimal data.
|
||||
|
||||
**Returns**
|
||||
`RxJS Observable` which will stream the logs. If the inputs ABI is included in the call, the logs will be automatically decoded.
|
Loading…
x
Reference in New Issue
Block a user