How to get a Flow transaction from the command line
The Flow CLI provides a command to fetch a transaction that was previously submitted to an Access API.
1flow transactions get <tx_id>
1> flow transactions get 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa --network mainnet23Status ✅ SEALED4ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa5Payer 18eb4ee6b3c026d26Authorizers [18eb4ee6b3c026d2]78Proposal Key:9Address 18eb4ee6b3c026d210Index 1111Sequence 179301213Payload Signature 0: 18eb4ee6b3c026d214Payload Signature 1: 18eb4ee6b3c026d215Envelope Signature 0: 18eb4ee6b3c026d216Signatures (minimized, use --include signatures)1718Events:19Index 020Type A.1654653399040a61.FlowToken.TokensWithdrawn21Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa22Values23- amount (UFix64): 0.0010000024- from ({}?): 18eb4ee6b3c026d22526Index 127Type A.1654653399040a61.FlowToken.TokensDeposited28Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa29Values30- amount (UFix64): 0.0010000031- to ({}?): 5068e27f275c546c3233Index 234Type A.18eb4ee6b3c026d2.PrivateReceiverForwarder.PrivateDeposit35Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa36Values37- amount (UFix64): 0.0010000038- to ({}?): 5068e27f275c546c39404142Code (hidden, use --include code)4344Payload (hidden, use --include payload)
- Name:
<tx_id>
- Valid Input: transaction ID.
The first argument is the ID (hash) of the transaction.
- Flag:
--include
- Valid inputs:
code
,payload
,signatures
Specify fields to include in the result output. Applies only to the text output.
- Flag:
--sealed
- Default:
false
Indicate whether to wait for the transaction to be sealed before displaying the result.
- Flag:
--exclude
- Valid inputs:
events
Specify fields to exclude from the result output. Applies only to the text output.
- 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.
- 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.
- 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.
- 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.
- Flag:
--output
- Short Flag:
-o
- Valid inputs:
json
,inline
Specify the format of the command results.
- Flag:
--save
- Short Flag:
-s
- Valid inputs: a path in the current filesystem.
Specify the filename where you want the result to be saved
- 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.
- 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.
- Flag:
--skip-version-check
- Default:
false
Skip version check during start up to speed up process for slow connections.