Get Events
Use the event command to fetch a single or multiple events in a specific range of blocks. You can provide start and end block height range, but also specify number of the latest blocks to be used to search for specified event. Events are fetched concurrently by using multiple workers which optionally you can also control by specifying the flags.
Example Usage​
Get the event by name A.0b2a3299cc857e29.TopShot.Deposit
from the last 20 blocks on mainnet.
Get two events A.1654653399040a61.FlowToken.TokensDeposited
and A.1654653399040a61.FlowToken.TokensWithdrawn
in the block height range on mainnet.
Arguments​
Event Name​
- Name:
event_name
- Valid Input: String
Fully-qualified identifier for the events. You can provide multiple event names separated by a space.
Flags​
Start​
- Flag:
--start
- Valid inputs: valid block height
Specify the start block height used alongside the end flag. This will define the lower boundary of the block range.
End​
- Flag:
--end
- Valid inputs: valid block height
Specify the end block height used alongside the start flag. This will define the upper boundary of the block range.
Last​
- Flag:
--last
- Valid inputs: number
- Default:
10
Specify the number of blocks relative to the last block. Ignored if the start flag is set. Used as a default if no flags are provided.
Batch​
- Flag:
--batch
- Valid inputs: number
- Default:
25
Number of blocks each worker will fetch.
Workers​
- Flag:
--workers
- Valid inputs: number
- Default:
10
Number of workers to use when fetching events concurrently.
Host​
- Flag:
--host
- Valid inputs: an IP address or hostname.
- Default:
127.0.0.1:3569
(Flow Emulator)
Specify the hostname of the Access API that will be
used to execute the command. This flag overrides
any host defined by the --network
flag.
Network Key​
- Flag:
--network-key
- Valid inputs: A valid network public key of the host in hex string format
Specify the network public key of the Access API that will be used to create a secure GRPC client when executing the command.
Network​
- Flag:
--network
- Short Flag:
-n
- Valid inputs: the name of a network defined in the configuration (
flow.json
) - Default:
emulator
Specify which network you want the command to use for execution.
Filter​
- Flag:
--filter
- Short Flag:
-x
- Valid inputs: a case-sensitive name of the result property.
Specify any property name from the result you want to return as the only value.
Output​
- Flag:
--output
- Short Flag:
-o
- Valid inputs:
json
,inline
Specify the format of the command results.
Save​
- Flag:
--save
- Short Flag:
-s
- Valid inputs: a path in the current filesystem.
Specify the filename where you want the result to be saved
Log​
- Flag:
--log
- Short Flag:
-l
- Valid inputs:
none
,error
,debug
- Default:
info
Specify the log level. Control how much output you want to see during command execution.
Configuration​
- Flag:
--config-path
- Short Flag:
-f
- Valid inputs: a path in the current filesystem.
- Default:
flow.json
Specify the path to the flow.json
configuration file.
You can use the -f
flag multiple times to merge
several configuration files.
Version Check​
- Flag:
--skip-version-check
- Default:
false
Skip version check during start up to speed up process for slow connections.