Skip to content

Commit 980465a

Browse files
authored
Merge pull request #188 from onflow/release/v18
Release v18
2 parents 1a52ea1 + a4d880c commit 980465a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2624
-649
lines changed

docs/account-add-contract.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ flow accounts add-contract <name> <filename>
1717
Contract 'FungibleToken' deployed to the account 0xf8d6e0586b0a20c7
1818
1919
Address 0xf8d6e0586b0a20c7
20-
Balance 9999999999970000000
20+
Balance 99999999999.70000000
2121
Keys 1
2222
2323
Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
2424
Weight 1000
2525
Signature Algorithm ECDSA_P256
2626
Hash Algorithm SHA3_256
27+
Revoked false
28+
Sequence Number 6
29+
Index 0
2730
2831
Contracts Deployed: 1
2932
Contract: 'FungibleToken'
@@ -69,6 +72,7 @@ any host defined by the `--network` flag.
6972
- Flag: `--network`
7073
- Short Flag: `-n`
7174
- Valid inputs: the name of a network defined in the configuration (`flow.json`).
75+
- Default: `emulator`
7276

7377
Specify which network you want the command to use for execution.
7478

docs/account-remove-contract.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ flow accounts remove-contract <name>
1717
Contract 'FungibleToken' removed from account '0xf8d6e0586b0a20c7'
1818

1919
Address 0xf8d6e0586b0a20c7
20-
Balance 0
20+
Balance 99999999999.70000000
2121
Keys 1
2222

2323
Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
24-
Weight 1000
25-
Signature Algorithm ECDSA_P256
26-
Hash Algorithm SHA3_256
24+
Weight 1000
25+
Signature Algorithm ECDSA_P256
26+
Hash Algorithm SHA3_256
27+
Revoked false
28+
Sequence Number 6
29+
Index 0
2730

2831
Contracts Deployed: 0
2932
```
@@ -61,6 +64,7 @@ any host defined by the `--network` flag.
6164
- Flag: `--network`
6265
- Short Flag: `-n`
6366
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
67+
- Default: `emulator`
6468

6569
Specify which network you want the command to use for execution.
6670

docs/account-staking-info.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Tokens Unstaking: 0.00000000
4747
### Address
4848

4949
- Name: `address`
50-
- Valid Input: Flow account address
50+
- Valid Input: Flow account address.
5151

5252
Flow [account address](https://docs.onflow.org/concepts/accounts-and-keys/) (prefixed with `0x` or not).
5353

@@ -68,6 +68,7 @@ any host defined by the `--network` flag.
6868
- Flag: `--network`
6969
- Short Flag: `-n`
7070
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
71+
- Default: `emulator`
7172

7273
Specify which network you want the command to use for execution.
7374

docs/account-update-contract.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,16 @@ flow accounts update-contract <name> <filename>
1717
Contract 'FungibleToken' updated on account '0xf8d6e0586b0a20c7'
1818

1919
Address 0xf8d6e0586b0a20c7
20-
Balance 9999999999970000000
20+
Balance 99999999999.70000000
2121
Keys 1
2222

2323
Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c37b4be12548d3526933c2cda9b0b9c69412f45ffb6b85b6840d8569d969fe84e5b7
2424
Weight 1000
2525
Signature Algorithm ECDSA_P256
2626
Hash Algorithm SHA3_256
27+
Revoked false
28+
Sequence Number 6
29+
Index 0
2730

2831
Contracts Deployed: 1
2932
Contract: 'FungibleToken'
@@ -67,6 +70,7 @@ any host defined by the `--network` flag.
6770
- Flag: `--network`
6871
- Short Flag: `-n`
6972
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
73+
- Default: `emulator`
7074

7175
Specify which network you want the command to use for execution.
7276

docs/build-transactions.md

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
title: Build a Transaction with the Flow CLI
3+
sidebar_title: Build a Transaction
4+
description: How to build a Flow transaction from the command line
5+
---
6+
7+
The Flow CLI provides a command to build a transactions with options to specify
8+
authorizer accounts, payer account and proposer account.
9+
10+
The `build` command doesn't produce any signatures and instead
11+
is designed to be used with the `sign` and `send-signed` commands.
12+
13+
Use this functionality in the following order:
14+
1. Use this command (`build`) to build the transaction.
15+
2. Use the `sign` command to sign with all accounts specified in the build process.
16+
3. Use `send-signed` command to submit the signed transaction to the Flow network.
17+
18+
```shell
19+
flow transactions build <code filename>
20+
```
21+
22+
## Example Usage
23+
24+
```shell
25+
> flow transactions build ./transaction.cdc \
26+
--signer alice \
27+
--proposer bob \
28+
--payer charlie \
29+
--arg "String:Meow" \
30+
--filter payload --save built.rlp
31+
32+
ID e8c0a69952fbe50a66703985e220307c8d44b8fa36c76cbca03f8c43d0167847
33+
Payer e03daebed8ca0615
34+
Authorizers [f3fcd2c1a78f5eee]
35+
36+
Proposal Key:
37+
Address 179b6b1cb6755e31
38+
Index 0
39+
Sequence 1
40+
41+
No Payload Signatures
42+
43+
No Envelope Signatures
44+
45+
46+
Arguments (1):
47+
- Argument 0: {"type":"String","value":"Meow"}
48+
49+
50+
Code
51+
52+
transaction(greeting: String) {
53+
let guest: Address
54+
55+
prepare(authorizer: AuthAccount) {
56+
self.guest = authorizer.address
57+
}
58+
59+
execute {
60+
log(greeting.concat(",").concat(self.guest.toString()))
61+
}
62+
}
63+
64+
65+
Payload:
66+
f9013df90138b8d17472616e...73616374696f6e286eeec0c0
67+
```
68+
69+
## Arguments
70+
71+
### Code Filename
72+
73+
- Name: `filename`
74+
- Valid inputs: Any filename and path valid on the system.
75+
76+
The first argument is a path to a Cadence file containing the
77+
transaction to be executed.
78+
79+
80+
## Flags
81+
82+
83+
### Payer
84+
85+
- Flag: `--payer`
86+
- Valid Inputs: Flow address or account name from configuration.
87+
- Default: service account
88+
89+
Specify account address that will be paying for the transaction.
90+
Read more about payers [here](https://docs.onflow.org/concepts/accounts-and-keys/).
91+
92+
### Proposer
93+
94+
- Flag: `--proposer`
95+
- Valid inputs: Flow address or account name from configuration.
96+
- Default: service account
97+
98+
Specify a name of the account that is proposing the transaction.
99+
Account must be defined in flow configuration.
100+
101+
### Proposer Key Index
102+
103+
- Flag: `--proposer-key-index`
104+
- Valid inputs: number of existing key index
105+
- Default: 0
106+
107+
Specify key index for the proposer account.
108+
109+
### Authorizer
110+
111+
- Flag: `--authorizer`
112+
- Valid Inputs: Flow address or account name from configuration.
113+
- Default: service account
114+
115+
Additional authorizer addresses to add to the transaction.
116+
Read more about authorizers [here](https://docs.onflow.org/concepts/accounts-and-keys/).
117+
118+
### Host
119+
120+
- Flag: `--host`
121+
- Valid inputs: an IP address or hostname.
122+
- Default: `127.0.0.1:3569` (Flow Emulator)
123+
124+
Specify the hostname of the Access API that will be
125+
used to execute the commands.
126+
127+
### Network
128+
129+
- Flag: `--network`
130+
- Short Flag: `-n`
131+
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
132+
- Default: `emulator`
133+
134+
Specify which network you want the command to use for execution.
135+
136+
### Filter
137+
138+
- Flag: `--filter`
139+
- Short Flag: `-x`
140+
- Valid inputs: case-sensitive name of the result property.
141+
142+
Specify any property name from the result you want to return as the only value.
143+
144+
### Output
145+
146+
- Flag: `--output`
147+
- Short Flag: `-o`
148+
- Valid inputs: `json`, `inline`
149+
150+
Specify in which format you want to display the result.
151+
152+
### Save
153+
154+
- Flag: `--save`
155+
- Short Flag: `-s`
156+
- Valid inputs: valid filename
157+
158+
Specify the filename where you want the result to be saved.
159+
160+
### Log
161+
162+
- Flag: `--log`
163+
- Short Flag: `-l`
164+
- Valid inputs: `none`, `error`, `debug`
165+
- Default: `info`
166+
167+
Specify the log level. Control how much output you want to see while command execution.
168+
169+
### Configuration
170+
171+
- Flag: `--config-path`
172+
- Short Flag: `-f`
173+
- Valid inputs: valid filename
174+
175+
Specify a filename for the configuration files, you can provide multiple configuration
176+
files by using `-f` flag multiple times.
177+
178+
179+

docs/create-accounts.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In the above example, the `flow.json` file would look something like this:
4747
}
4848
```
4949

50-
## Options
50+
## Flags
5151

5252
### Public Key
5353

@@ -57,6 +57,16 @@ In the above example, the `flow.json` file would look something like this:
5757
Specify the public key that will be added to the new account
5858
upon creation.
5959

60+
### Key Weight
61+
62+
- Flag: `--key-weight`
63+
- Valid inputs: number between 0 and 1000
64+
- Default: 1000
65+
66+
Specify the weight of the public key being added to the new account.
67+
68+
When opting to use this flag, you must specify a `--key-weight` flag for each public `--key` flag provided.
69+
6070
### Public Key Signature Algorithm
6171

6272
- Flag: `--sig-algo`
@@ -109,6 +119,7 @@ any host defined by the `--network` flag.
109119
- Flag: `--network`
110120
- Short Flag: `-n`
111121
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
122+
- Default: `emulator`
112123

113124
Specify which network you want the command to use for execution.
114125

docs/deploy-project-contracts.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ any host defined by the `--network` flag.
121121
- Flag: `--network`
122122
- Short Flag: `-n`
123123
- Valid inputs: the name of a network defined in the configuration (`flow.json`)
124+
- Default: `emulator`
124125

125126
Specify which network you want the command to use for execution.
126127

0 commit comments

Comments
 (0)