Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5426455
fix argsJSON flag in docs
May 12, 2021
75649f2
Update CONTRIBUTING.md
devbugging May 12, 2021
a670914
avoid warning in local dev
May 13, 2021
8096f21
Update CONTRIBUTING.md
devbugging May 13, 2021
d8510b9
contains field exclude/include methods
May 17, 2021
00ad67b
transactions exclude include
May 17, 2021
be91bcd
refactor name
May 17, 2021
76ed0e7
add exclude include flags to tx
May 17, 2021
1921d7e
accounts add include flag support
May 17, 2021
5f932ee
blocks include flag support
May 17, 2021
3fda5a7
add exclude flag to tx
May 17, 2021
cafb454
release root commit
May 17, 2021
6a0bc27
Merge pull request #250 from onflow/qa/guideline-output
devbugging May 17, 2021
11d92f8
Merge pull request #248 from onflow/qa/docs-fix
devbugging May 17, 2021
3b1c862
fix detection of imports
May 17, 2021
caae4a1
put back decode keys
May 17, 2021
9802751
added docs
May 17, 2021
6f3239c
fixed naming
May 17, 2021
6f3ab84
todo refactor
May 18, 2021
5959692
add banner logo
May 19, 2021
de9858d
add logs to account
May 20, 2021
1db85d0
refactor and extract emoji
May 20, 2021
f564765
refactor status for colors and emoji
May 20, 2021
99f6098
implement own color
May 20, 2021
1e9a114
refactor color use and remove dependency
May 20, 2021
4dec96b
version check fix
May 20, 2021
ef19ca7
emoji test os
May 20, 2021
78b1ba2
enable config command and remove project init
May 20, 2021
37f6da9
shortctus workaround
May 20, 2021
110cbb3
enable quick commands
May 20, 2021
dc5e1e0
Merge branch 'feature/config-manage-enable' into improvement/config-m…
May 20, 2021
28d225b
command fix import
May 20, 2021
bb9b3f5
refactor include exclude function
May 21, 2021
4f4459b
add test for resolving imports with bugfix
May 21, 2021
d1136df
Merge pull request #253 from onflow/improvement/results-optimization
devbugging May 21, 2021
5139adc
Merge pull request #257 from onflow/feature/decode-keys
devbugging May 21, 2021
ab2bbf5
Merge pull request #261 from onflow/improvement/config-manage-reeanble
devbugging May 21, 2021
e67f192
Merge pull request #256 from onflow/bugfix/import-internal-contracts
devbugging May 21, 2021
ebee9fe
add test for resolving imports with bugfix
May 21, 2021
da2b911
Merge remote-tracking branch 'origin/bugfix/import-internal-contracts…
May 21, 2021
96ddb11
Merge branch 'bugfix/import-internal-contracts' into release/v21
May 21, 2021
c1967a0
Merge pull request #258 from onflow/improvement/aesthetics
devbugging May 21, 2021
13d56d1
logo fix
May 21, 2021
61d6ff1
logo fix
May 21, 2021
4f862f3
Merge remote-tracking branch 'origin/improvement/aesthetics' into imp…
May 21, 2021
cca4e50
Merge branch 'improvement/aesthetics' into release/v21
May 21, 2021
582e96a
add missing headers
May 21, 2021
23ecedb
Merge branch 'release/v21' of github.com:onflow/flow-cli into release…
May 21, 2021
f19525f
check for nil on result
May 21, 2021
a45e75a
Merge pull request #263 from onflow/bugfix/check-nil
devbugging May 21, 2021
c004eb1
Merge pull request #255 from onflow/improvement/version-check-dev
devbugging May 21, 2021
87e7431
remove to lower case due to multi word keys
May 21, 2021
a632107
Merge pull request #264 from onflow/qa/remove-case-insensitive
devbugging May 21, 2021
f248260
try both normal and lowercase key
May 21, 2021
ecfd27e
Merge branch 'qa/remove-case-insensitive' into release/v21
May 21, 2021
faaabe9
update to Cadence v0.16.0 and Emulator v0.20.1
turbolent May 21, 2021
4a265e4
Merge pull request #265 from onflow/bastian/update-dependencies
devbugging May 24, 2021
c92c378
Revert "Update to Cadence v0.16.0 and Emulator v0.20.1"
devbugging May 24, 2021
4fdb869
Merge pull request #266 from onflow/revert-265-bastian/update-depende…
devbugging May 24, 2021
76f380b
add tests for decode
May 24, 2021
4952300
Merge branch 'feature/decode-keys' into release/v21
May 24, 2021
ae92e7c
updated docs
May 24, 2021
54c81e8
default build include values to all
May 24, 2021
e25549e
release notes
May 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ Default command response should be to the stdout and not saved to a file. Anytim
the output to be saved to a file we should explicitly specify so by using `--save filename.txt`
flag and providing the path.

Result output should include only information that is commonly used and relevant,
don't use too much of user screen drowning what’s truly important,
instead provide a way to include that data when the user requests by having include, exclude flags.

```
Address 179b6b1cb6755e31
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![](./logo-cli.svg)

# Flow CLI

The Flow CLI is a command-line interface that provides useful utilities for building Flow applications.
Expand Down
6 changes: 4 additions & 2 deletions cmd/flow/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/onflow/flow-cli/internal/events"
"github.com/onflow/flow-cli/internal/keys"
"github.com/onflow/flow-cli/internal/project"
"github.com/onflow/flow-cli/internal/quick"
"github.com/onflow/flow-cli/internal/scripts"
"github.com/onflow/flow-cli/internal/status"
"github.com/onflow/flow-cli/internal/transactions"
Expand All @@ -45,8 +46,8 @@ func main() {
TraverseChildren: true,
}

// hot commands
config.InitCommand.AddToParent(cmd)
// quick commands
quick.InitCommand.AddToParent(cmd)
status.Command.AddToParent(cmd)

// structured commands
Expand All @@ -61,6 +62,7 @@ func main() {
cmd.AddCommand(blocks.Cmd)
cmd.AddCommand(collections.Cmd)
cmd.AddCommand(project.Cmd)
cmd.AddCommand(config.Cmd)

command.InitFlags(cmd)

Expand Down
2 changes: 1 addition & 1 deletion docs/build-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The `Type` must be the same as type in the transaction source code for that argu

### Arguments JSON

- Flag: `--argsJSON`
- Flag: `--args-json`
- Valid inputs: arguments in JSON-Cadence form.

Arguments passed to the Cadence transaction in Cadence JSON format.
Expand Down
7 changes: 7 additions & 0 deletions docs/create-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ and pay the account creation fee.

Specify one or more contracts to be deployed during account creation.

### Include Fields

- Flag: `--include`
- Valid inputs: `contracts`

Specify fields to include in the result output. Applies only to the text output.

### Host

- Flag: `--host`
Expand Down
49 changes: 49 additions & 0 deletions docs/decode-keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Decode Account Key with the Flow CLI
sidebar_title: Decode Account Keys
description: How to decode rlp encoded key pair from the command line
---

The Flow CLI provides a command to decode RLP encoded account key.

```shell
flow keys decode <rlp encoded account key>
```

## Example Usage

```shell
> flow keys decode f847b84084d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db2402038203e8

Public Key 84d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db24
Signature algorithm ECDSA_P256
Hash algorithm SHA3_256
Weight 1000
Revoked false
```

## Flags

### 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
72 changes: 72 additions & 0 deletions docs/developer-updates/release-notes-v21.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
## ⬆️ Install or Upgrade

Follow the [Flow CLI installation guide](https://docs.onflow.org/flow-cli/install/) for instructions on how to install or upgrade the CLI.


## 💥 Breaking Changes

### Flow Go SDK Update
Update Flow Go SDK version from v0.19.0 to v0.20.0.
Read more about new version in the [release notes](https://github.com/onflow/flow-go-sdk/releases/tag/v0.20.0).

## ⭐ Features

### New Command To Manage Configuration
Add or remove resources from the configuration using the new `flow config` command.
Usage is possible via interactive prompt or by using flags. Command syntax is as follows:
```js
flow config <add|remove> <account|contract|deployment|network>
```

Example for adding an account to the config via interactive prompt:

```bash
Name: Foo
Address: f8d6e0586b0a20c7
✔ ECDSA_P256
✔ SHA3_256
Private key: 1286...01afc
Key index (Default: 0): 0

Account Foo added to the configuration
```

Example for adding an account to the config without interactive prompt:

```bash
./main config add account --address f8d6e0586b0a20c7 --name Foo --private-key 1286...01afc

Account Foo added to the configuration
```

We recommend using manage command to do any changes in the configuration as it will also
validate input values for you and will abstract any changes in the configuration format.

### Decode Keys
Command for decoding public keys in the RLP encoded format.

Example of using the command:

```bash
> flow keys decode f847b84084d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db2402038203e8

Public Key 84d716c14b051ad6b001624f738f5d302636e6b07cc75e4530af7776a4368a2b586dbefc0564ee28384c2696f178cbed52e62811bcc9ecb59568c996d342db24
Signature algorithm ECDSA_P256
Hash algorithm SHA3_256
Weight 1000
Revoked false
```

## 🎉 Improvements

### Include And Exclude Flags
Include and Exclude flags were added to the transaction and account resource thus
allowing you to further specify verbosity of the output.

### Documentation Changes
Multiple reported documentation fixes.

## 🐞 Bug Fixes

### Import Detection Fix
Fix for a reported bug: An error occurs when executing a script that imports a built-in contract (Crypto contract) with Flow CLI command.
2 changes: 1 addition & 1 deletion docs/execute-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The `Type` must be the same as type in the script source code for that argument.

### Arguments JSON

- Flag: `--argsJSON`
- Flag: `--args-json`
- Valid inputs: arguments in JSON-Cadence form.

Arguments passed to the Cadence script in `Type:Value` format.
Expand Down
9 changes: 8 additions & 1 deletion docs/get-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ Flow [account address](https://docs.onflow.org/concepts/accounts-and-keys/) (pre

## Flags

### Include Fields

- Flag: `--include`
- Valid inputs: `contracts`

Specify fields to include in the result output. Applies only to the text output.

### Contracts

- Flag: `--contracts`

Display contracts deployed to the account.
⚠️ Deprecated: use include flag.

### Code
⚠️ No longer supported: use contracts flag instead.
Expand Down
81 changes: 60 additions & 21 deletions docs/get-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,50 @@ flow transactions get <tx_id>
## Example Usage

```shell
> flow transactions get ff35821007322405608c0d3da79312617f8d16e118afe63e764b5e68edc96dd5 --host access.mainnet.nodes.onflow.org:9000

ID ff35821007322405608c0d3da79312617f8d16e118afe63e764b5e68edc96dd5
Status SEALED
Payer 12e354a23e4f791d
Events
Index 0
Type flow.AccountCreated
Tx ID ff35821007322405608c0d3da79312617f8d16e118afe63e764b5e68edc96dd5
Values
address (Address) 18c4931b5f3c7151

Index 1
Type flow.AccountKeyAdded
Tx ID ff35821007322405608c0d3da79312617f8d16e118afe63e764b5e68edc96dd5
Values
address (Address) 18c4931b5f3c7151
publicKey (Unknown) f847b8404c296679364d2...7b168678cc762bc08f342d8d92e0a36e6ecfdcf15850721821823e8
> flow transactions get 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa --network mainnet

Status ✅ SEALED
ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa
Payer 18eb4ee6b3c026d2
Authorizers [18eb4ee6b3c026d2]

Proposal Key:
Address 18eb4ee6b3c026d2
Index 11
Sequence 17930

Payload Signature 0: 18eb4ee6b3c026d2
Payload Signature 1: 18eb4ee6b3c026d2
Envelope Signature 0: 18eb4ee6b3c026d2
Signatures (minimized, use --include signatures)

Events:
Index 0
Type A.1654653399040a61.FlowToken.TokensWithdrawn
Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa
Values
- amount (UFix64): 0.00100000
- from ({}?): 18eb4ee6b3c026d2

Index 1
Type A.1654653399040a61.FlowToken.TokensDeposited
Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa
Values
- amount (UFix64): 0.00100000
- to ({}?): 5068e27f275c546c

Index 2
Type A.18eb4ee6b3c026d2.PrivateReceiverForwarder.PrivateDeposit
Tx ID 40bc4b100c1930c61381c22e0f4c10a7f5827975ee25715527c1061b8d71e5aa
Values
- amount (UFix64): 0.00100000
- to ({}?): 5068e27f275c546c



Code (hidden, use --include code)

Payload (hidden, use --include payload)
```

## Arguments
Expand All @@ -45,12 +71,18 @@ The first argument is the ID (hash) of the transaction.

## Flags

### Display Transaction Code
### Include Fields

- Flag: `--include`
- Valid inputs: `code`, `payload`, `signatures`

Specify fields to include in the result output. Applies only to the text output.

### Code

- Flag: `--code`
- Default: `false`

Indicate whether to print the transaction Cadence code.
⚠️ Deprecated: use include flag.

### Wait for Seal

Expand All @@ -60,6 +92,13 @@ Indicate whether to print the transaction Cadence code.
Indicate whether to wait for the transaction to be sealed
before displaying the result.

### Exclude Fields

- Flag: `--exclude`
- Valid inputs: `events`

Specify fields to exclude from the result output. Applies only to the text output.

### Host

- Flag: `--host`
Expand Down
Loading