-
Notifications
You must be signed in to change notification settings - Fork 74
Add Flow CLI "Get System TX" Reference Docs #1473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1869522
Add system transaction reference docs
jribbink 287da0a
fix announcement
jribbink 16854df
change linking style
jribbink 4ea760b
docs(flow-cli): document with usage, flags, scheduled callbacks cont…
jribbink 61492a4
docs(flow-cli): update get-system docs to link Flow Testnet and use r…
jribbink 5c4ba9f
Update docs/build/tools/flow-cli/transactions/get-system-transactions.md
briandoyle81 ef3c198
Update docs/build/tools/flow-cli/transactions/get-system-transactions.md
briandoyle81 bec2f8e
Add keywords to doc
jribbink File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
197 changes: 197 additions & 0 deletions
197
docs/build/tools/flow-cli/transactions/get-system-transactions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
--- | ||
title: Get a System Transaction | ||
description: How to get a Flow system transaction from the command line | ||
sidebar_position: 8 | ||
keywords: | ||
- flow cli | ||
- transactions | ||
- system transaction | ||
- system chunk | ||
- scheduled callbacks | ||
- forte upgrade | ||
- blocks | ||
- block id | ||
- tx_id | ||
- fee-events | ||
- access api | ||
- emulator | ||
- testnet | ||
--- | ||
|
||
The Flow CLI provides a command to fetch the system transaction for a given block reference. You can optionally provide a transaction ID to target a specific system transaction within that block. | ||
|
||
```shell | ||
flow transactions get-system <block_id|latest|block_height> [tx_id] | ||
``` | ||
|
||
::::warning | ||
|
||
Querying with a system transaction ID (`[tx_id]`) is part of the Forte network upgrade and is currently available on Flow Emulator (CLI v2.7.0+) and [Flow Testnet]. See the announcement for context: [Forte: Introducing Actions & Agents]. | ||
|
||
:::: | ||
|
||
## Use Cases | ||
|
||
- System chunk transaction for protocol operations: see [Epoch Scripts and Events] and [Staking rewards via system chunk]. | ||
- Transactions related to scheduled callbacks: see [Introduction to Scheduled Callbacks]. Consider `--include fee-events` for callback fee details. | ||
|
||
## Example Usage | ||
|
||
```shell | ||
> flow transactions get-system latest --network mainnet | ||
|
||
Status ✅ SEALED | ||
ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa | ||
Payer — | ||
Authorizers [] | ||
|
||
Proposal Key: — | ||
|
||
No Payload Signatures | ||
No Envelope Signatures | ||
|
||
Events: | ||
Index 0 | ||
Type A.1654653399040a61.FlowToken.TokensDeposited | ||
Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa | ||
Values | ||
- amount (UFix64): 0.00100000 | ||
- to ({}?): 5068e27f275c546c | ||
|
||
Code (hidden, use --include code) | ||
|
||
Payload (hidden, use --include payload) | ||
``` | ||
|
||
Select a specific system transaction within the block by ID: | ||
|
||
```shell | ||
> flow transactions get-system latest 07a8...b433 --network mainnet | ||
``` | ||
|
||
## Arguments | ||
|
||
### Block Reference | ||
|
||
- Name: `<block_id|latest|block_height>` | ||
- Valid Input: a block ID (hex), the keyword `latest`, or a block height (number). | ||
|
||
The first argument is a reference to the block whose system transaction you want to fetch. | ||
|
||
### Transaction ID (optional) | ||
|
||
- Name: `[tx_id]` | ||
- Valid Input: a transaction ID (hex). | ||
|
||
Optionally narrow the result to a specific system transaction within the referenced block. | ||
|
||
## Flags | ||
|
||
### Include Fields | ||
|
||
- Flag: `--include` | ||
- Valid inputs: `code`, `payload`, `signatures`, `fee-events` | ||
|
||
Specify fields to include in the result output. Applies only to the text output. | ||
|
||
### Exclude Fields | ||
|
||
- Flag: `--exclude` | ||
- Valid inputs: `events` | ||
|
||
Specify fields to exclude from the result output. Applies only to the text output. | ||
|
||
### Host | ||
|
||
- Flag: `--host` | ||
- Valid inputs: an IP address or host address. | ||
- Default: `127.0.0.1:3569` (Flow Emulator) | ||
|
||
Specify the host address 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 secure client connections 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 file system. | ||
|
||
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 file system. | ||
- 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. | ||
|
||
## Notes | ||
|
||
System transactions currently cover: | ||
- System chunk transactions used by protocol operations. See an overview of system chunks and service events: [Epoch Scripts and Events]. | ||
- Scheduled callbacks execution. Learn more: [Introduction to Scheduled Callbacks]. | ||
|
||
More resources: | ||
- [Staking rewards via system chunk] | ||
- [Epoch schedule and system chunk transactions] | ||
|
||
[Forte: Introducing Actions & Agents]: https://flow.com/post/forte-introducing-actions-agents-supercharging-composability-and-automation | ||
[Flow Testnet]: ../../../../protocol/flow-networks/accessing-testnet.md | ||
[Epoch Scripts and Events]: ../../../../protocol/staking/05-epoch-scripts-events.md | ||
[Staking rewards via system chunk]: ../../../../protocol/staking/08-staking-rewards.md | ||
[Introduction to Scheduled Callbacks]: https://developers.flow.com/blockchain-development-tutorials/flow-actions/scheduled-callbacks-introduction | ||
[Epoch schedule and system chunk transactions]: ../../../../protocol/staking/03-schedule.md |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ask cursor to add frontmatter keywords in the same style as: https://raw.githubusercontent.com/onflow/docs/refs/heads/main/docs/blockchain-development-tutorials/cross-vm-apps/introduction.md