Skip to content

Commit

Permalink
Documentation updatess
Browse files Browse the repository at this point in the history
  • Loading branch information
alfiedotwtf committed Oct 8, 2024
1 parent a75450a commit 78188c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 9 additions & 3 deletions docs/book/src/forc/plugins/forc_client/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,21 @@ By default `--default-signer` flag would sign your transactions with the followi
0xde97d8624a438121b86a1956544bd72ed68cd69f2c99555b08b1e8c51ffd511c
```
## Interacting with the testnet
## Selecting a target network

To interact with the latest testnet, use the `--testnet` flag. When this flag is passed, transactions created by `forc-deploy` will be sent to the latest `testnet`.
By default, `local` is used for the target network. To interact with the latest testnet, use the `--testnet` flag. When this flag is passed, transactions created by `forc-deploy` will be sent to the latest `testnet`:

```sh
forc-deploy --testnet
```

It is also possible to pass the exact node URL while using `forc-deploy` or `forc-run` which can be done using `--node-url` flag.
The same can be done to target mainnet:

```sh
forc-deploy --mainnet
```

It is also possible to pass the exact node URL while using `forc-deploy` or `forc-run` which can be done using `--node-url` flag:

```sh
forc-deploy --node-url https://beta-3.fuel.network
Expand Down
12 changes: 7 additions & 5 deletions forc-plugins/forc-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,27 @@ pub struct NodeTarget {
/// If unspecified, checks the manifest's `network` table, then falls back
/// to `http://127.0.0.1:4000`
///
/// You can also use `--target` or `--testnet` to specify the Fuel node.
/// You can also use `--target`, `--testnet`, or `--mainnet` to specify the Fuel node.
#[clap(long, env = "FUEL_NODE_URL")]
pub node_url: Option<String>,

/// Use preset configurations for deploying to a specific target.
///
/// You can also use `--node-url` or `--testnet` to specify the Fuel node.
/// You can also use `--node-url`, `--testnet`, or `--mainnet` to specify the Fuel node.
///
/// Possible values are: [beta-1, beta-2, beta-3, beta-4, local]
/// Possible values are: [beta-1, beta-2, beta-3, beta-4, devnet, local, testnet, mainnet]
#[clap(long)]
pub target: Option<Target>,

/// Use preset configuration for testnet.
///
/// You can also use `--node-url` or `--target` to specify the Fuel node.
/// You can also use `--node-url`, `--target`, or `--mainnet` to specify the Fuel node.
#[clap(long)]
pub testnet: bool,

/// Use preset configuration for mainnet.
///
/// You can also use `--node-url` or `--target` to specify the Fuel node.
/// You can also use `--node-url`, `--target`, or `--testnet` to specify the Fuel node.
#[clap(long)]
pub mainnet: bool,
}

0 comments on commit 78188c6

Please sign in to comment.