Skip to content

Commit f0daebb

Browse files
authored
Merge pull request #1614 from onflow/fcl_js_subdoc_edits_cws
flow-cli doc changes
2 parents 7667ae0 + 810ca39 commit f0daebb

File tree

11 files changed

+259
-229
lines changed

11 files changed

+259
-229
lines changed

docs/build/tools/clients/fcl-js/cross-vm/index.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,45 @@ description: FCL packages for cross-VM (Flow + EVM) applications.
55

66
# FCL Cross-VM Packages
77

8-
These packages enable you to leverage Flow’s Cadence-Owned Account (COA) within Ethereum tooling (e.g., Wagmi, RainbowKit). They provide a unified approach for cross-VM apps on Flow and EVM, letting you perform EVM-like operations using Cadence accounts.
8+
These packages allow you to leverage Flow’s Cadence-Owned Account (COA) within Ethereum tooling (for example, Wagmi, RainbowKit). They provide a unified approach for cross-VM apps on Flow and EVM, which lets you perform EVM-like operations will Cadence accounts.
99

10-
For background and motivation, see the [FCL Ethereum Provider for Cross-VM Apps FLIP #316](https://github.com/onflow/flips/blob/c0fe9b71a9afb85fe70a69cf7c0870b5d327e679/application/20241223-fcl-ethereum-provider.md).
10+
For background and motivation, see the [FCL Ethereum Provider for Cross-VM Apps FLIP #316].
1111

1212
| Package | Purpose |
1313
|-----------------------------------------------|-------------------------------------------------------------------------------------------------|
14-
| [@onflow/fcl-ethereum-provider](#onflowfcl-ethereum-provider) | Provides an EIP-1193-compliant Ethereum provider backed by an FCL-authenticated COA. |
15-
| [@onflow/fcl-wagmi-adapter](#onflowfcl-wagmi-adapter) | Integrates Flow-based COAs with Wagmi, exposing them as Ethereum accounts in your dApp. |
16-
| [@onflow/fcl-rainbowkit-adapter](#onflowfcl-rainbowkit-adapter)| Enables a Flow-based wallet option in your RainbowKit wallet selection modal. |
14+
| [@onflow/fcl-ethereum-provider] | Provides an EIP-1193-compliant Ethereum provider backed by an FCL-authenticated COA. |
15+
| [@onflow/fcl-wagmi-adapter] | Integrates Flow-based COAs with Wagmi, and exposes them as Ethereum accounts in your dApp. |
16+
| [@onflow/fcl-rainbowkit-adapter]| Allows a Flow-based wallet option in your RainbowKit wallet selection modal. |
1717

1818
## `@onflow/fcl-ethereum-provider`
1919

20-
- **Description**: A drop-in EIP-1193 provider that authenticates users via [FCL](https://developers.flow.com/) and lets them sign transactions/messages with their COA.
20+
- **Description**: A drop-in EIP-1193 provider that authenticates users via [Flow Client Library (FCL)] and lets them sign transactions and messages with their COA.
2121
- **Use Cases**:
2222
- Integrate Flow EVM with any generic EVM library or framework.
23-
- Direct control over JSON-RPC calls (e.g., `provider.request({ method: 'eth_sendTransaction' })`).
24-
- **Link to Docs**: [Read the @onflow/fcl-ethereum-provider Reference »](ethereum-provider.mdx)
23+
- Direct control over JSON-RPC calls (for example, `provider.request({ method: 'eth_sendTransaction' })`).
24+
- **Link to Docs**: [Read the @onflow/fcl-ethereum-provider Reference »]
2525

2626
## `@onflow/fcl-wagmi-adapter`
2727

2828
- **Description**: A Wagmi connector that uses `@onflow/fcl-ethereum-provider` under the hood so you can sign in with your COA through standard Wagmi flows.
2929
- **Use Cases**:
30-
- Add Flow-based COAs to an existing Wagmi-powered dApp as if they were Ethereum wallets.
31-
- **Link to Docs**: [Read the @onflow/fcl-wagmi-adapter Reference »](wagmi-adapter.mdx)
30+
- Add Flow-based COAs to a current Wagmi-powered dApp as if they were Ethereum wallets.
31+
- **Link to Docs**: [Read the @onflow/fcl-wagmi-adapter Reference »]
3232

3333
## `@onflow/fcl-rainbowkit-adapter`
3434

35-
- **Description**: A RainbowKit adapter that surfaces a Flow-based wallet in the wallet selection modal, making it easy to sign transactions via COAs in a RainbowKit environment.
35+
- **Description**: A RainbowKit adapter that surfaces a Flow-based wallet in the wallet selection modal, wheich makes it easy to sign transactions via COAs in a RainbowKit environment.
3636
- **Use Cases**:
37-
- Offer Flow-based wallets (e.g., Flow Wallet) alongside popular Ethereum wallets in RainbowKit.
38-
- **Link to Docs**: [Read the @onflow/fcl-rainbowkit-adapter Reference »](rainbowkit-adapter.mdx)
37+
- Offer Flow-based wallets (such as Flow Wallet) alongside popular Ethereum wallets in RainbowKit.
38+
- **Link to Docs**: [Read the @onflow/fcl-rainbowkit-adapter Reference »]
39+
40+
<!-- Relative links, will not render on page -->
41+
42+
[FCL Ethereum Provider for Cross-VM Apps FLIP #316]: https://github.com/onflow/flips/blob/c0fe9b71a9afb85fe70a69cf7c0870b5d327e679/application/20241223-fcl-ethereum-provider.md
43+
[@onflow/fcl-ethereum-provider]: #onflowfcl-ethereum-provider
44+
[@onflow/fcl-wagmi-adapter]: #onflowfcl-wagmi-adapter
45+
[@onflow/fcl-rainbowkit-adapter]: #onflowfcl-rainbowkit-adapter
46+
[Flow Client Library (FCL)]: https://developers.flow.com/
47+
[Read the @onflow/fcl-ethereum-provider Reference »]: ethereum-provider.mdx
48+
[Read the @onflow/fcl-wagmi-adapter Reference »]: wagmi-adapter.mdx
49+
[Read the @onflow/fcl-rainbowkit-adapter Reference »]: rainbowkit-adapter.mdx

docs/build/tools/emulator/index.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,23 @@ This starts a local Flow network with:
6262
- REST API on `http://localhost:8888`
6363
- Admin API on port `8080`
6464

65-
## Available Commands
65+
## Available commands
6666

6767
- `snapshot`: Create/Load/List emulator snapshots. See: [Create Emulator Snapshot]
6868

69-
## Key Flags
69+
## Key flags
7070

7171
- **Networking**
72-
- `--host <string>`: Host to listen on for gRPC/REST/Admin (default: all interfaces)
72+
- `--host <string>`: Host to listen on for gRPC, REST, and Admin (default: all interfaces)
7373
- `--port, -p <int>`: gRPC port (default `3569`)
7474
- `--rest-port <int>`: REST API port (default `8888`)
7575
- `--admin-port <int>`: Admin API port (default `8080`)
7676
- `--debugger-port <int>`: Debug Adapter Protocol port (default `2345`)
77-
- `--grpc-debug`: Enable gRPC server reflection
78-
- `--rest-debug`: Enable REST API debug output
77+
- `--grpc-debug`: Turn on gRPC server reflection
78+
- `--rest-debug`: Turn on REST API debug output
7979

80-
- **State & Persistence**
81-
- `--persist`: Enable persistent storage (default disabled)
80+
- **State and Persistence**
81+
- `--persist`: Turn on persistent storage (default disabled)
8282
- `--dbpath <path>`: Directory for on-disk state (default `./flowdb`)
8383
- `--sqlite-url <url>`: Use SQLite storage backend
8484
- `--redis-url <url>`: Use Redis storage backend
@@ -87,15 +87,15 @@ This starts a local Flow network with:
8787

8888
- **Forking**
8989
- `--fork <string>`: Start the emulator in fork mode using a network from `flow.json`. If provided without a value, defaults to `mainnet`.
90-
- `--fork-host <host>`: Access node to query when forking Mainnet/Testnet
91-
- `--fork-height <uint>`: Starting block height when forking
92-
93-
- **Cadence & VM**
94-
- `--block-time, -b <duration>`: Time between sealed blocks (e.g. `1s`, `300ms`)
95-
- `--coverage-reporting`: Enable code coverage reporting
96-
- `--computation-reporting`: Enable computation reporting
97-
- `--legacy-upgrade`: Enable legacy contract upgrade behavior
98-
- `--scheduled-transactions`: Enable scheduled transactions (default true)
90+
- `--fork-host <host>`: Access node to query when you fork Mainnet or Testnet
91+
- `--fork-height <uint>`: Starting block height when you fork
92+
93+
- **Cadence and VM**
94+
- `--block-time, -b <duration>`: Time between sealed blocks (for exxample, `1s`, `300ms`)
95+
- `--coverage-reporting`: Turn on code coverage reporting
96+
- `--computation-reporting`: Turn on computation reporting
97+
- `--legacy-upgrade`: Turn on legacy contract upgrade behavior
98+
- `--scheduled-transactions`: Turn on scheduled transactions (default true)
9999
- `--script-compute-limit <int>`: Compute unit limit for scripts (default `100000`)
100100
- `--transaction-max-compute-limit <int>`: Max transaction compute unit limit (default `9999`)
101101
- `--transaction-expiry <int>`: Transaction expiry in blocks (default `10`)
@@ -104,21 +104,21 @@ This starts a local Flow network with:
104104
- `--storage-limit`: Enforce account storage limit (default true)
105105
- `--storage-per-flow <decimal>`: MB of storage per 1 FLOW token
106106
- `--token-supply <decimal>`: Initial FLOW token supply (default `1000000000.0`)
107-
- `--transaction-fees`: Enable transaction fees
107+
- `--transaction-fees`: Turn on transaction fees
108108
- `--setup-evm`: Deploy EVM contracts (default true)
109109
- `--setup-vm-bridge`: Deploy VM Bridge contracts (default true)
110110

111-
- **Service Account & Identity**
111+
- **Service Account and Identity**
112112
- `--chain-id <emulator|testnet|mainnet>`: Address generation chain (default `emulator`)
113113
- `--service-priv-key <hex>` / `--service-pub-key <hex>`: Service account keys
114114
- `--service-sig-algo <ECDSA_P256|ECDSA_secp256k1>`: Service key signature algo (default `ECDSA_P256`)
115115
- `--service-hash-algo <SHA3_256|SHA2_256>`: Service key hash algo (default `SHA3_256`)
116-
- `--min-account-balance <decimal>`: Minimum account balance / account creation cost
116+
- `--min-account-balance <decimal>`: Minimum account balance or account creation cost
117117
- `--contracts`: Deploy common contracts on start
118118
- `--contract-removal`: Allow contract removal for development (default true)
119119
- `--init`: Initialize a new account profile
120120

121-
- **Logging & Output**
121+
- **Logging and Output**
122122
- `--verbose, -v`: Verbose logging
123123
- `--log-format <text|JSON>`: Logging output format (default `text`)
124124

@@ -168,15 +168,15 @@ For the complete and current list of flags, run:
168168
flow emulator --help
169169
```
170170

171-
## Debugging & Testing
171+
## Debugging and Testing
172172

173173
- **Code Coverage**: Add `--coverage-reporting` flag and visit `http://localhost:8080/emulator/codeCoverage`
174174
- **Debugging**: Use `#debugger()` pragma in Cadence code for breakpoints
175-
- **Fork mode note**: When using `flow emulator --fork`, only Flow chain state is available. External oracles/APIs and cross-chain reads are not live; mock these or run local stub services for E2E.
175+
- **Fork mode note**: When you use `flow emulator --fork`, only Flow chain state is available. External oracles/APIs and cross-chain reads are not live; mock these or run local stub services for E2E.
176176

177177
## Snapshots
178178

179-
The Flow CLI provides a command to create emulator snapshots, which are points in blockchain history you can later jump to and reset the state to that moment. This can be useful for testing where you establish a beginning state, run tests and after revert back to the initial state.
179+
The Flow CLI provides a command to create emulator snapshots, which are points in blockchain history you can later jump to and reset the state to that moment. This can be useful to test where you establish a beginning state, run tests and after revert back to the initial state.
180180

181181
### Quick snapshot workflow
182182

@@ -201,25 +201,25 @@ Create a new emulator snapshot at the current block with a name of `myInitialSta
201201
flow emulator snapshot create myInitialState
202202
```
203203

204-
### Load an existing snapshot
204+
### Load a current snapshot
205205

206206
To jump to a previously created snapshot we use the load command in combination with the name.
207207

208208
```shell
209209
flow emulator snapshot load myInitialState
210210
```
211211

212-
### List all existing snapshots
212+
### List all snapshots
213213

214-
To list all the existing snapshots we previously created and can load to run:
214+
To list all the snapshots we previously created and can load to run:
215215

216216
```shell
217217
flow emulator list
218218
```
219219

220-
## Additional Resources
220+
## Additional resources
221221

222-
To learn more about using the Emulator, please have a look at the [public GitHub repository].
222+
To learn more about how to use the Emulator, have a look at the [public GitHub repository].
223223

224224
<!-- Reference-style links -->
225225

docs/build/tools/flow-cli/accounts/account-add-contract.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ title: Deploy a Contract
33
sidebar_position: 3
44
---
55

6-
Deploy a new contract to a Flow account using the Flow CLI.
6+
Deploy a new contract to a Flow account with the Flow CLI.
77

88
```shell
99
flow accounts add-contract <filename> [<argument> <argument>...] [flags]
1010
```
1111

12-
⚠️ Deprecation notice: using name argument in adding contract command will be deprecated soon.
12+
⚠️ Deprecation notice: we will deprecate the name argument in adding contract command soon.
1313
```shell
1414
flow accounts add-contract <name> <filename> [<argument> <argument>...] [flags]
1515
```
1616

17-
## Example Usage
17+
## Example usage
1818

1919
```shell
2020
> flow accounts add-contract ./FungibleToken.cdc
@@ -36,7 +36,7 @@ Key 0 Public Key 640a5a359bf3536d15192f18d872d57c98a96cb871b92b70cecb0739c2d5c
3636
Contracts Deployed: 1
3737
Contract: 'FungibleToken'
3838
```
39-
**Testnet Example**
39+
**Testnet example**
4040
```
4141
> flow accounts add-contract ./FungibleToken.cdc --signer alice --network testnet
4242
@@ -79,10 +79,10 @@ Path to the file containing the contract source code.
7979

8080
### Arguments
8181
- Name: `argument`
82-
- Valid inputs: valid [cadence values](https://cadencelang.dev/docs/1.0/json-cadence-spec)
83-
matching argument type in transaction code.
82+
- Valid inputs: valid [cadence values]
83+
that match argument type in transaction code.
8484

85-
Input arguments values matching corresponding types in the source code and passed in the same order.
85+
Input arguments values that match corresponding types in the source code and passed in the same order.
8686

8787
Example:
8888
```shell
@@ -113,9 +113,9 @@ Specify the name of the account that will be used to sign the transaction.
113113

114114
Arguments passed to the Cadence transaction in Cadence JSON format.
115115
Cadence JSON format contains `type` and `value` keys and is
116-
[documented here](https://cadencelang.dev/docs/1.0/json-cadence-spec).
116+
[documented here].
117117

118-
### Include Fields
118+
### Include fields
119119

120120
- Flag: `--include`
121121
- Valid inputs: `contracts`
@@ -129,17 +129,14 @@ Specify fields to include in the result output. Applies only to the text output.
129129
- Valid inputs: an IP address or hostname.
130130
- Default: `127.0.0.1:3569` (Flow Emulator)
131131

132-
Specify the hostname of the Access API that will be
133-
used to execute the command. This flag overrides
134-
any host defined by the `--network` flag.
132+
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.
135133

136-
### Network Key
134+
### Network key
137135

138136
- Flag: `--network-key`
139137
- Valid inputs: A valid network public key of the host in hex string format
140138

141-
Specify the network public key of the Access API that will be
142-
used to create a secure GRPC client when executing the command.
139+
Specify the network public key of the Access API that will be used to create a secure GRPC client when you execute the command.
143140

144141
### Network
145142

@@ -191,12 +188,17 @@ Specify the log level. Control how much output you want to see during command ex
191188
- Default: `flow.json`
192189

193190
Specify the path to the `flow.json` configuration file.
194-
You can use the `-f` flag multiple times to merge
195-
several configuration files.
196191

197-
### Version Check
192+
You can use the `-f` flag multiple times to merge several configuration files.
193+
194+
### Version check
198195

199196
- Flag: `--skip-version-check`
200197
- Default: `false`
201198

202199
Skip version check during start up to speed up process for slow connections.
200+
201+
<!-- Relative links, will not render on page -->
202+
203+
[cadence values]: https://cadencelang.dev/docs/1.0/json-cadence-spec
204+
[documented here]: https://cadencelang.dev/docs/1.0/json-cadence-spec

docs/build/tools/flow-cli/accounts/account-fund.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ sidebar_position: 7
66

77
:::info
88

9-
The [Flow Testnet Faucet](https://testnet-faucet.onflow.org/) allows users to create accounts and receive 1,000 Testnet FLOW tokens for testing and development purposes. You can also fund an existing Testnet accounts without needing to create one through the site, or through the CLI.
9+
The [Flow Testnet Faucet] allows users to create accounts and receive 1,000 Testnet FLOW tokens for testing and development purposes. You can also fund a current Testnet account without the need to create one through the site, or through the CLI.
1010

1111
:::
1212

13-
Fund a valid Testnet Flow Account using the Flow CLI.
13+
Fund a valid Testnet Flow Account with the Flow CLI.
1414

1515
```shell
1616
flow accounts fund [address|name]
1717
```
1818

19-
## Example Usage
19+
## Example usage
2020

21-
### Fund by Address
21+
### Fund by address
2222

2323
```
2424
> flow accounts fund 8e94eaa81771313a
@@ -29,7 +29,7 @@ If there is an issue, please use this link instead: https://testnet-faucet.onflo
2929
3030
```
3131

32-
### Fund by Account Name
32+
### Fund by account name
3333

3434
```
3535
> flow accounts fund testnet-account
@@ -40,7 +40,7 @@ If there is an issue, please use this link instead: https://testnet-faucet.onflo
4040
4141
```
4242

43-
### Interactive Prompt
43+
### Interactive prompt
4444

4545
```
4646
> flow accounts fund
@@ -53,7 +53,7 @@ If there is an issue, please use this link instead: https://testnet-faucet.onflo
5353

5454
## Arguments
5555

56-
### Address or Account Name (Optional)
56+
### Address or account name (optional)
5757

5858
- Name: `address|name`
5959
- Valid Input: Flow Testnet account address or account name from `flow.json`
@@ -62,3 +62,8 @@ You can provide:
6262
- A Flow [account address](../../../cadence/basics/accounts.md) (prefixed with `0x` or not)
6363
- An account name configured in your `flow.json`
6464
- No argument to get an interactive prompt for account selection
65+
66+
<!-- Relative links, will not render on page -->
67+
68+
[Flow Testnet Faucet]: https://testnet-faucet.onflow.org/
69+
[account address]: ../../../cadence/basics/accounts.md

0 commit comments

Comments
 (0)