forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split client interaction commands into a forc-client plugin (FuelLabs…
- Loading branch information
1 parent
0e50890
commit 1ed1cf1
Showing
31 changed files
with
221 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# forc-client | ||
|
||
Forc plugin for interacting with a Fuel node. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# forc deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# forc run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[package] | ||
name = "forc-client" | ||
version = "0.19.2" | ||
edition = "2021" | ||
|
||
[dependencies] | ||
anyhow = "1" | ||
clap = { version = "3", features = ["derive", "env"] } | ||
forc-pkg = { version = "0.19.2", path = "../../forc-pkg" } | ||
forc-util = { version = "0.19.2", path = "../../forc-util" } | ||
fuel-gql-client = { version = "0.9", default-features = false } | ||
fuel-tx = "0.13" | ||
fuel-vm = "0.12" | ||
futures = "0.3" | ||
hex = "0.4.3" | ||
serde = { version = "1.0" } | ||
serde_json = "1.0.73" | ||
sway-core = { version = "0.19.2", path = "../../sway-core" } | ||
sway-types = { version = "0.19.2", path = "../../sway-types" } | ||
sway-utils = { version = "0.19.2", path = "../../sway-utils" } | ||
tokio = { version = "1.8", features = ["macros", "rt-multi-thread", "process"] } | ||
tracing = "0.1" | ||
|
||
|
||
[[bin]] | ||
name = "forc-deploy" | ||
path = "src/bin/deploy/main.rs" | ||
|
||
[[bin]] | ||
name = "forc-run" | ||
path = "src/bin/run/main.rs" | ||
|
||
[lib] | ||
path = "src/lib.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use forc_client::ops::deploy::{cmd::DeployCommand, op::deploy}; | ||
use forc_util::init_tracing_subscriber; | ||
use std::process; | ||
|
||
use clap::Parser; | ||
|
||
#[tokio::main] | ||
pub async fn main() { | ||
init_tracing_subscriber(); | ||
let command = DeployCommand::parse(); | ||
if let Err(err) = deploy(command).await { | ||
eprintln!("Error: {:?}", err); | ||
process::exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
use forc_client::ops::run::{cmd::RunCommand, op::run}; | ||
use forc_util::init_tracing_subscriber; | ||
use std::process; | ||
|
||
use clap::Parser; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
init_tracing_subscriber(); | ||
let command = RunCommand::parse(); | ||
if let Err(err) = run(command).await { | ||
eprintln!("Error: {:?}", err); | ||
process::exit(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod ops; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod cmd; | ||
pub mod op; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod deploy; | ||
pub mod run; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod cmd; | ||
pub mod op; | ||
mod parameters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
forc/src/utils/parameters.rs → ...ins/forc-client/src/ops/run/parameters.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.