Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
K1-R1 authored Oct 15, 2024
2 parents d1f1781 + 7c7f27b commit 8db8ea4
Show file tree
Hide file tree
Showing 13 changed files with 379 additions and 330 deletions.
98 changes: 52 additions & 46 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ fuel-abi-types = "0.7"
# Although ALL verions are "X.Y", we need the complete semver for
# fuel-core-client as the GitHub Actions workflow parses this value to pull down
# the correct tarball
fuel-core-client = { version = "0.37.0", default-features = false }
fuel-core-types = { version = "0.37", default-features = false }
fuel-core-client = { version = "0.40.0", default-features = false }
fuel-core-types = { version = "0.40", default-features = false }

# Dependencies from the `fuels-rs` repository:

fuels = "0.66"
fuels-core = "0.66"
fuels-accounts = "0.66"
fuels = "0.66.9"
fuels-core = "0.66.9"
fuels-accounts = "0.66.9"

# Dependencies from the `fuel-vm` repository:
fuel-asm = "0.58"
Expand All @@ -103,7 +103,7 @@ fuel-tx = "0.58"
fuel-vm = "0.58"

# Dependencies from the `forc-wallet` repository:
forc-wallet = "0.10"
forc-wallet = "0.11"

#
# External dependencies
Expand Down
18 changes: 12 additions & 6 deletions docs/book/src/forc/plugins/forc_client/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,30 @@ 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 --node-url https://beta-3.fuel.network
forc-deploy --mainnet
```

Another alternative is the `--target` option, which provides useful aliases to all targets. For example if you want to deploy to `beta-5` you can use:
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 --target beta-5
forc-deploy --node-url https://mainnet.fuel.network
```

Another alternative is the `--target` option, which provides useful aliases to all targets. For example if you want to deploy to `testnet` you can use:

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

Since deploying and running projects on the testnet cost gas, you will need coins to pay for them. You can get some using the [testnet faucet](https://faucet-testnet.fuel.network/).
Expand Down
2 changes: 1 addition & 1 deletion forc-plugins/forc-client/src/cmd/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ forc_util::cli_examples! {
super::Command {
[ Deploy a single contract => "forc deploy bc09bfa7a11a04ce42b0a5abf04fd437387ee49bf4561d575177e2946468b408" ]
[ Deploy a single contract from a different path => "forc deploy bc09bfa7a11a04ce42b0a5abf04fd437387ee49bf4561d575177e2946468b408 --path {path}" ]
[ Deploy to a custom network => "forc deploy --node-url https://beta-5.fuel.network/graphql" ]
[ Deploy to a custom network => "forc deploy --node-url https://testnet.fuel.network/graphql" ]
}
}

Expand Down
14 changes: 3 additions & 11 deletions forc-plugins/forc-client/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/// Default to localhost to favour the common case of testing.
pub const NODE_URL: &str = sway_utils::constants::DEFAULT_NODE_URL;
pub const BETA_2_ENDPOINT_URL: &str = "https://node-beta-2.fuel.network";
pub const BETA_3_ENDPOINT_URL: &str = "https://beta-3.fuel.network";
pub const BETA_4_ENDPOINT_URL: &str = "https://beta-4.fuel.network";
pub const BETA_5_ENDPOINT_URL: &str = "https://beta-5.fuel.network";
pub const DEVNET_ENDPOINT_URL: &str = "https://devnet.fuel.network";
pub const TESTNET_ENDPOINT_URL: &str = "https://testnet.fuel.network";
pub const MAINNET_ENDPOINT_URL: &str = "https://mainnet.fuel.network";

pub const BETA_2_FAUCET_URL: &str = "https://faucet-beta-2.fuel.network";
pub const BETA_3_FAUCET_URL: &str = "https://faucet-beta-3.fuel.network";
pub const BETA_4_FAUCET_URL: &str = "https://faucet-beta-4.fuel.network";
pub const BETA_5_FAUCET_URL: &str = "https://faucet-beta-5.fuel.network";
pub const DEVNET_FAUCET_URL: &str = "https://faucet-devnet.fuel.network";
pub const TESTNET_FAUCET_URL: &str = "https://faucet-testnet.fuel.network";

pub const TESTNET_EXPLORER_URL: &str = "https://app.fuel.network";
pub const TESTNET_EXPLORER_URL: &str = "https://app-testnet.fuel.network";
pub const MAINNET_EXPLORER_URL: &str = "https://app.fuel.network";

/// Default PrivateKey to sign transactions submitted to local node.
pub const DEFAULT_PRIVATE_KEY: &str =
Expand Down
Loading

0 comments on commit 8db8ea4

Please sign in to comment.