diff --git a/game/src/game.rs b/game/src/game.rs index 6c5e799..dda1805 100644 --- a/game/src/game.rs +++ b/game/src/game.rs @@ -47,29 +47,44 @@ pub async fn create_ship( ) -> anyhow::Result<()> { log::debug!("The args are:: {:?}", args); - let params_json: String = std::fs::read_to_string(args.params_path).unwrap(); - let params: ScriptsParams = serde_json::from_str(¶ms_json) - .map_err(|e| anyhow!("Invalid params JSON: {}", e)) - .unwrap(); + let params_json: String = std::fs::read_to_string(args.params_path) + .map_err(|e| anyhow!("Failed to read params file: {}", e))?; + + let params: ScriptsParams = + serde_json::from_str(¶ms_json).map_err(|e| anyhow!("Invalid params JSON: {}", e))?; let asteria_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "asteria.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "asteria.txt") + .map_err(|e| anyhow!("Failed to read asteria script: {}", e))?; + let spacetime_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt") + .map_err(|e| anyhow!("Failed to read spacetime script: {}", e))?; + let pellet_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt") + .map_err(|e| anyhow!("Failed to read pellet script: {}", e))?; - let asteria_script: PlutusScript = PlutusScript(hex::decode(asteria_script_hex).unwrap()); + let asteria_script: PlutusScript = + PlutusScript(hex::decode(asteria_script_hex).expect("Failed to decode asteria script")); let asteria_hash: PolicyId = compute_plutus_v2_script_hash(asteria_script.clone()); - let asteria_address: Address = - Address(hex::decode("70".to_owned() + &hex::encode(asteria_hash)).unwrap()); + let asteria_address: Address = Address( + hex::decode("70".to_owned() + &hex::encode(asteria_hash)) + .map_err(|e| anyhow!("Failed to decode asteria address: {}", e))?, + ); - let spacetime_script: PlutusScript = PlutusScript(hex::decode(spacetime_script_hex).unwrap()); + let spacetime_script: PlutusScript = + PlutusScript(hex::decode(spacetime_script_hex).expect("Failed to decode spacetime script")); let spacetime_hash: PolicyId = compute_plutus_v2_script_hash(spacetime_script.clone()); - let spacetime_address: Address = - Address(hex::decode("70".to_owned() + &hex::encode(spacetime_hash)).unwrap()); + let spacetime_address: Address = Address( + hex::decode("70".to_owned() + &hex::encode(spacetime_hash)) + .map_err(|e| anyhow!("Failed to decode spacetime address: {}", e))?, + ); - let pellet_script: PlutusScript = PlutusScript(hex::decode(pellet_script_hex).unwrap()); + let pellet_script: PlutusScript = PlutusScript( + hex::decode(pellet_script_hex) + .map_err(|e| anyhow!("Failed to decode pellet script: {}", e))?, + ); let pellet_policy: PolicyId = compute_plutus_v2_script_hash(pellet_script.clone()); // Construct a template Transaction to push coins into later @@ -212,7 +227,11 @@ pub async fn create_ship( let vkey: Vec = Vec::from(args.witness.0); let public = Public::from_h256(args.witness); - let signature: Vec = Vec::from(keystore::sign_with(keystore, &public, tx_hash)?.0); + let signature: Vec = Vec::from( + keystore::sign_with(keystore, &public, tx_hash) + .map_err(|e| anyhow!("Failed to sign transaction: {}", e))? + .0, + ); transaction.transaction_witness_set = <_>::from(vec![VKeyWitness::from((vkey, signature))]); @@ -279,20 +298,29 @@ pub async fn gather_fuel( ) -> anyhow::Result<()> { log::debug!("The args are:: {:?}", args); - let params_json: String = std::fs::read_to_string(args.params_path).unwrap(); - let params: ScriptsParams = serde_json::from_str(¶ms_json) - .map_err(|e| anyhow!("Invalid params JSON: {}", e)) - .unwrap(); + let params_json: String = std::fs::read_to_string(args.params_path) + .map_err(|e| anyhow!("Failed to read params file: {}", e))?; + + let params: ScriptsParams = + serde_json::from_str(¶ms_json).map_err(|e| anyhow!("Invalid params JSON: {}", e))?; let spacetime_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt") + .map_err(|e| anyhow!("Failed to read spacetime script: {}", e))?; let pellet_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt") + .map_err(|e| anyhow!("Failed to read pellet script: {}", e))?; - let spacetime_script: PlutusScript = PlutusScript(hex::decode(spacetime_script_hex).unwrap()); + let spacetime_script: PlutusScript = PlutusScript( + hex::decode(spacetime_script_hex) + .map_err(|e| anyhow!("Failed to decode spacetime script: {}", e))?, + ); let shipyard_policy: PolicyId = compute_plutus_v2_script_hash(spacetime_script.clone()); - let pellet_script: PlutusScript = PlutusScript(hex::decode(pellet_script_hex).unwrap()); + let pellet_script: PlutusScript = PlutusScript( + hex::decode(pellet_script_hex) + .map_err(|e| anyhow!("Failed to decode pellet script: {}", e))?, + ); let pellet_policy: PolicyId = compute_plutus_v2_script_hash(pellet_script.clone()); // Construct a template Transaction to push coins into later @@ -426,8 +454,11 @@ pub async fn gather_fuel( let vkey: Vec = Vec::from(args.witness.0); let public = Public::from_h256(args.witness); - let signature: Vec = - Vec::from(crate::keystore::sign_with(keystore, &public, tx_hash)?.0); + let signature: Vec = Vec::from( + keystore::sign_with(keystore, &public, tx_hash) + .map_err(|e| anyhow!("Failed to sign transaction: {}", e))? + .0, + ); transaction.transaction_witness_set = <_>::from(vec![VKeyWitness::from((vkey, signature))]); transaction.transaction_witness_set.redeemer = Some(vec![ship_redeemer, pellet_redeemer]); @@ -484,20 +515,28 @@ pub async fn move_ship( ) -> anyhow::Result<()> { log::debug!("The args are:: {:?}", args); - let params_json: String = std::fs::read_to_string(args.params_path).unwrap(); - let params: ScriptsParams = serde_json::from_str(¶ms_json) - .map_err(|e| anyhow!("Invalid params JSON: {}", e)) - .unwrap(); + let params_json: String = std::fs::read_to_string(args.params_path) + .map_err(|e| anyhow!("Failed to read params file: {}", e))?; + let params: ScriptsParams = + serde_json::from_str(¶ms_json).map_err(|e| anyhow!("Invalid params JSON: {}", e))?; let spacetime_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt") + .map_err(|e| anyhow!("Failed to read spacetime script: {}", e))?; let pellet_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt") + .map_err(|e| anyhow!("Failed to read pellet script: {}", e))?; - let spacetime_script: PlutusScript = PlutusScript(hex::decode(spacetime_script_hex).unwrap()); + let spacetime_script: PlutusScript = PlutusScript( + hex::decode(spacetime_script_hex) + .map_err(|e| anyhow!("Failed to decode spacetime script: {}", e))?, + ); let shipyard_policy: PolicyId = compute_plutus_v2_script_hash(spacetime_script.clone()); - let pellet_script: PlutusScript = PlutusScript(hex::decode(pellet_script_hex).unwrap()); + let pellet_script: PlutusScript = PlutusScript( + hex::decode(pellet_script_hex) + .map_err(|e| anyhow!("Failed to decode pellet script: {}", e))?, + ); let pellet_policy: PolicyId = compute_plutus_v2_script_hash(pellet_script.clone()); // Construct a template Transaction to push coins into later @@ -548,11 +587,10 @@ pub async fn move_ship( // BURNS let moved_manhattan_distance = (pos_x - args.pos_x).abs() + (pos_y - args.pos_y).abs(); - let moved_manhattan_distance_i64: i64 = moved_manhattan_distance.try_into().unwrap(); let burn_fuel: Option> = Some(Multiasset::from(( pellet_policy, fuel_name.clone(), - -moved_manhattan_distance_i64, + -(moved_manhattan_distance as i64), ))); // BUILD REDEEMERS @@ -635,8 +673,11 @@ pub async fn move_ship( let vkey: Vec = Vec::from(args.witness.0); let public = Public::from_h256(args.witness); - let signature: Vec = - Vec::from(crate::keystore::sign_with(keystore, &public, tx_hash)?.0); + let signature: Vec = Vec::from( + crate::keystore::sign_with(keystore, &public, tx_hash) + .map_err(|e| anyhow!("Failed to sign transaction: {}", e))? + .0, + ); transaction.transaction_witness_set = <_>::from(vec![VKeyWitness::from((vkey, signature))]); transaction.transaction_witness_set.redeemer = Some(vec![ship_redeemer, pellet_redeemer]); @@ -692,27 +733,42 @@ pub async fn mine_asteria( ) -> anyhow::Result<()> { log::debug!("The args are:: {:?}", args); - let params_json: String = std::fs::read_to_string(args.params_path).unwrap(); - let params: ScriptsParams = serde_json::from_str(¶ms_json) - .map_err(|e| anyhow!("Invalid params JSON: {}", e)) - .unwrap(); + let params_json: String = std::fs::read_to_string(args.params_path) + .map_err(|e| anyhow!("Failed to read params file: {}", e))?; + let params: ScriptsParams = + serde_json::from_str(¶ms_json).map_err(|e| anyhow!("Invalid params JSON: {}", e))?; let asteria_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "asteria.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "asteria.txt") + .map_err(|e| anyhow!("Failed to read asteria script: {}", e))?; let spacetime_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "spacetime.txt") + .map_err(|e| anyhow!("Failed to read spacetime script: {}", e))?; let pellet_script_hex: &str = - &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt").unwrap(); + &std::fs::read_to_string(params.scripts_directory.clone() + "pellet.txt") + .map_err(|e| anyhow!("Failed to read pellet script: {}", e))?; - let asteria_script: PlutusScript = PlutusScript(hex::decode(asteria_script_hex).unwrap()); + let asteria_script: PlutusScript = PlutusScript( + hex::decode(asteria_script_hex) + .map_err(|e| anyhow!("Failed to decode asteria script: {}", e))?, + ); let asteria_hash: PolicyId = compute_plutus_v2_script_hash(asteria_script.clone()); - let asteria_address: Address = - Address(hex::decode("70".to_owned() + &hex::encode(asteria_hash)).unwrap()); - let spacetime_script: PlutusScript = PlutusScript(hex::decode(spacetime_script_hex).unwrap()); + let asteria_address: Address = Address( + hex::decode("70".to_owned() + &hex::encode(asteria_hash)) + .map_err(|e| anyhow!("Failed to decode asteria address: {}", e))?, + ); + + let spacetime_script: PlutusScript = PlutusScript( + hex::decode(spacetime_script_hex) + .map_err(|e| anyhow!("Failed to decode spacetime script: {}", e))?, + ); let shipyard_policy: PolicyId = compute_plutus_v2_script_hash(spacetime_script.clone()); - let pellet_script: PlutusScript = PlutusScript(hex::decode(pellet_script_hex).unwrap()); + let pellet_script: PlutusScript = PlutusScript( + hex::decode(pellet_script_hex) + .map_err(|e| anyhow!("Failed to decode pellet script: {}", e))?, + ); let pellet_policy: PolicyId = compute_plutus_v2_script_hash(pellet_script.clone()); // Construct a template Transaction to push coins into later @@ -781,7 +837,9 @@ pub async fn mine_asteria( // BURNS let ship_fuel = quanity_of(&ship_value, &pellet_policy, &fuel_name); - let ship_fuel_i64: i64 = ship_fuel.try_into().unwrap(); + let ship_fuel_i64: i64 = ship_fuel + .try_into() + .expect("Fuel amount too large to fit in i64"); let burns = Some( Multiasset::from((shipyard_policy, ship_token_name.clone(), -1)) + Multiasset::from((pellet_policy, fuel_name.clone(), -ship_fuel_i64)), @@ -867,8 +925,11 @@ pub async fn mine_asteria( let vkey: Vec = Vec::from(args.witness.0); let public = Public::from_h256(args.witness); - let signature: Vec = - Vec::from(crate::keystore::sign_with(keystore, &public, tx_hash)?.0); + let signature: Vec = Vec::from( + crate::keystore::sign_with(keystore, &public, tx_hash) + .map_err(|e| anyhow!("Failed to sign transaction: {}", e))? + .0, + ); transaction.transaction_witness_set = <_>::from(vec![VKeyWitness::from((vkey, signature))]); transaction.transaction_witness_set.redeemer = Some(vec![ @@ -922,10 +983,10 @@ pub async fn mine_asteria( } pub async fn deploy_scripts(args: DeployScriptsArgs) -> anyhow::Result<()> { - let params_json: String = std::fs::read_to_string(args.params_path).unwrap(); - let params: ScriptsParams = serde_json::from_str(¶ms_json) - .map_err(|e| anyhow!("Invalid params JSON: {}", e)) - .unwrap(); + let params_json: String = std::fs::read_to_string(args.params_path) + .map_err(|e| anyhow!("Failed to read params file: {}", e))?; + let params: ScriptsParams = + serde_json::from_str(¶ms_json).map_err(|e| anyhow!("Invalid params JSON: {}", e))?; let asteria_params = PallasPlutusData::Array(Indef( [ @@ -959,7 +1020,7 @@ pub async fn deploy_scripts(args: DeployScriptsArgs) -> anyhow::Result<()> { asteria_params.encode_fragment().unwrap().as_slice(), hex::decode(ASTERIA_PARAMETERIZED).unwrap().as_slice(), ) - .unwrap(), + .map_err(|e| anyhow!("Failed to apply params to asteria script: {}", e))?, ); let asteria_hash: PolicyId = compute_plutus_v2_script_hash(asteria_script.clone()); @@ -985,7 +1046,7 @@ pub async fn deploy_scripts(args: DeployScriptsArgs) -> anyhow::Result<()> { pellet_params.encode_fragment().unwrap().as_slice(), hex::decode(PELLET_PARAMETERIZED).unwrap().as_slice(), ) - .unwrap(), + .map_err(|e| anyhow!("Failed to apply params to pellet script: {}", e))?, ); let pellet_hash: PolicyId = compute_plutus_v2_script_hash(pellet_script.clone()); @@ -1044,24 +1105,29 @@ pub async fn deploy_scripts(args: DeployScriptsArgs) -> anyhow::Result<()> { spacetime_params.encode_fragment().unwrap().as_slice(), hex::decode(SPACETIME_PARAMETERIZED).unwrap().as_slice(), ) - .unwrap(), + .map_err(|e| anyhow!("Failed to apply params to spacetime script: {}", e))?, ); + // If scripts directory does not exist, create it + std::fs::create_dir_all(¶ms.scripts_directory) + .map_err(|e| anyhow!("Failed to create scripts directory: {}", e))?; + std::fs::write( params.scripts_directory.clone() + "pellet.txt", hex::encode(pellet_script.0), ) - .unwrap(); + .map_err(|e| anyhow!("Failed to write pellet script: {}", e))?; std::fs::write( params.scripts_directory.clone() + "asteria.txt", hex::encode(asteria_script.0), ) - .unwrap(); + .map_err(|e| anyhow!("Failed to write asteria script: {}", e))?; std::fs::write( params.scripts_directory.clone() + "spacetime.txt", hex::encode(spacetime_script.0), ) - .unwrap(); + .map_err(|e| anyhow!("Failed to write spacetime script: {}", e))?; + println!("All scripts written successfully!"); Ok(()) } diff --git a/game/src/lib.rs b/game/src/lib.rs index 35ac704..7a3c617 100644 --- a/game/src/lib.rs +++ b/game/src/lib.rs @@ -39,23 +39,31 @@ impl GameCommand { match cli.command { Some(GameCommand::Game(cmd)) => match cmd { Command::CreateShip(args) => { - let _ = game::create_ship(&db, &client, &keystore, slot_config, args).await; + let _ = game::create_ship(&db, &client, &keystore, slot_config, args) + .await + .unwrap(); Ok(()) } Command::GatherFuel(args) => { - let _ = game::gather_fuel(&db, &client, &keystore, args).await; + let _ = game::gather_fuel(&db, &client, &keystore, args) + .await + .unwrap(); Ok(()) } Command::MoveShip(args) => { - let _ = game::move_ship(&db, &client, &keystore, slot_config, args).await; + let _ = game::move_ship(&db, &client, &keystore, slot_config, args) + .await + .unwrap(); Ok(()) } Command::MineAsteria(args) => { - let _ = game::mine_asteria(&db, &client, &keystore, args).await; + let _ = game::mine_asteria(&db, &client, &keystore, args) + .await + .unwrap(); Ok(()) } Command::DeployScripts(args) => { - let _ = game::deploy_scripts(args).await; + let _ = game::deploy_scripts(args).await.unwrap(); Ok(()) } }, diff --git a/wallet/README.md b/wallet/README.md index 0322ada..65f64a1 100644 --- a/wallet/README.md +++ b/wallet/README.md @@ -26,7 +26,7 @@ In another terminal, one can interact with the node by issuing wallet commands. To list the whole UTxO set, run ```bash -./target/release/gpc-wallet show-all-outputs +./target/release/gpc-wallet wallet show-all-outputs ``` When this is done for the first, the output will look like this: @@ -42,7 +42,7 @@ When this is done for the first, the output will look like this: This “genesis” UTxO belongs to Shawn's address. In order to spend it, we need to add his public/secret key pair (pk/sk) to the wallet keystore. We do this by generating the pair with the corresponding seed phrase: ``` -$ ./target/release/gpc-wallet insert-key "news slush supreme milk chapter athlete soap sausage put clutch what kitten" +$ ./target/release/gpc-wallet wallet insert-key "news slush supreme milk chapter athlete soap sausage put clutch what kitten" [2024-11-14T12:38:19Z INFO gpc_wallet] Number of blocks in the db: 6 [2024-11-14T12:38:19Z INFO gpc_wallet] Wallet database synchronized with node to height 26 @@ -53,7 +53,7 @@ Associated address is 0x6101e6301758a6badfab05035cffc8e3438b3aff2a4edc6544b47329 We use the `generate-key` command to have another pk/sk and address available for experimenting. ``` -$ ./target/release/gpc-wallet generate-key +$ ./target/release/gpc-wallet wallet generate-key [2024-11-14T12:38:53Z INFO gpc_wallet] Number of blocks in the db: 26 [2024-11-14T12:38:53Z INFO gpc_wallet] Wallet database synchronized with node to height 37 @@ -65,7 +65,7 @@ Associated address is 0x614fdf13c0aabb2c2e6df7a0ac0f5cb5aaabca448af8287e54681273 Now we spend the output, generating a new UTxO for the last address: ``` -$ ./target/release/gpc-wallet spend-value --input 998f074b5357d465fdd99198c65af6a418522e5a1688e2674c935702fef38d0600000000 --amount 200000000 --recipient 0x614fdf13c0aabb2c2e6df7a0ac0f5cb5aaabca448af8287e54681273dd +$ ./target/release/gpc-wallet wallet spend-value --input 998f074b5357d465fdd99198c65af6a418522e5a1688e2674c935702fef38d0600000000 --amount 200000000 --recipient 0x614fdf13c0aabb2c2e6df7a0ac0f5cb5aaabca448af8287e54681273dd [2024-11-14T12:41:18Z INFO gpc_wallet] Number of blocks in the db: 37 [2024-11-14T12:41:18Z INFO gpc_wallet] Wallet database synchronized with node to height 86 @@ -80,7 +80,7 @@ Transaction queued. When accepted, the following UTxOs will become available: All command-line arguments admit short versions (run `./target/release/gpc-wallet -h` for details). The next invocation spends the first UTxO and sends some coins back to Shawn: ``` -$ ./target/release/gpc-wallet spend-value --input dcb998d9e000c19fd20e41afeff6e1e0d9366e6e6c756c8173e52fc8061638f600000000 --amount 150000000 --witness 3538f889235842527b946255962241591cdc86cb99ba566afde335ae94262ee4 +$ ./target/release/gpc-wallet wallet spend-value --input dcb998d9e000c19fd20e41afeff6e1e0d9366e6e6c756c8173e52fc8061638f600000000 --amount 150000000 --witness 3538f889235842527b946255962241591cdc86cb99ba566afde335ae94262ee4 [2024-11-14T12:47:45Z INFO gpc_wallet] Number of blocks in the db: 184 [2024-11-14T12:47:45Z INFO gpc_wallet] Wallet database synchronized with node to height 215 @@ -96,7 +96,7 @@ In this second example, we had to explicitly state the pk of the owning address The UTxO set at this point is ``` -$ ./target/release/gpc-wallet show-all-outputs +$ ./target/release/gpc-wallet wallet show-all-outputs [2024-11-14T12:48:44Z INFO gpc_wallet] Number of blocks in the db: 215 [2024-11-14T12:48:44Z INFO gpc_wallet] Wallet database synchronized with node to height 234 @@ -111,7 +111,7 @@ dcb998d9e000c19fd20e41afeff6e1e0d9366e6e6c756c8173e52fc8061638f601000000: owner Finally, to send some coins *and* `tokenA`s from the last UTxO to the other account, we do: ``` -$ ./target/release/gpc-wallet spend-value --input dcb998d9e000c19fd20e41afeff6e1e0d9366e6e6c756c8173e52fc8061638f601000000 --amount 14000000 --policy 0x0298aa99f95e2fe0a0132a6bb794261fb7e7b0d988215da2f2de2005 --name tokenA --token-amount 200000000 --recipient 0x614fdf13c0aabb2c2e6df7a0ac0f5cb5aaabca448af8287e54681273dd +$ ./target/release/gpc-wallet wallet spend-value --input dcb998d9e000c19fd20e41afeff6e1e0d9366e6e6c756c8173e52fc8061638f601000000 --amount 14000000 --policy 0x0298aa99f95e2fe0a0132a6bb794261fb7e7b0d988215da2f2de2005 --name tokenA --token-amount 200000000 --recipient 0x614fdf13c0aabb2c2e6df7a0ac0f5cb5aaabca448af8287e54681273dd [2024-11-14T12:54:28Z INFO gpc_wallet] Number of blocks in the db: 250 [2024-11-14T12:54:28Z INFO gpc_wallet] Wallet database synchronized with node to height 349 @@ -125,7 +125,7 @@ Transaction queued. When accepted, the following UTxOs will become available: The *balance* summarizes `Value` amounts for each address: ``` -$ ./target/release/gpc-wallet show-balance +$ ./target/release/gpc-wallet wallet show-balance [2024-11-14T12:54:34Z INFO gpc_wallet] Number of blocks in the db: 349 [2024-11-14T12:54:34Z INFO gpc_wallet] Wallet database synchronized with node to height 351 @@ -147,7 +147,7 @@ total : 314000000 Coins, Multiassets: In order to reproduce more complex wallet commands, like consuming a script input or minting an asset, we provide a more complete transaction builder via the `build-tx` command. The only argument is a JSON file with all the necessary information about inputs, outputs, scripts, mintings, witnesses, required signers and validity interval. Run the command with: ```bash -$ ./target/release/gpc-wallet build-tx --tx-info /path/to/your/json/file.json +$ ./target/release/gpc-wallet wallet build-tx --tx-info /path/to/your/json/file.json ``` The json file must contain the following fields: @@ -232,5 +232,5 @@ Both commands will print the corresponding UTxOs in the same format as `show-all For a complete list of commands and options, run ```bash -./target/release/gpc-wallet --help +./target/release/gpc-wallet wallet --help ``` diff --git a/wallet/src/main.rs b/wallet/src/main.rs index ba3e771..1c8cc9a 100644 --- a/wallet/src/main.rs +++ b/wallet/src/main.rs @@ -17,7 +17,7 @@ //! To list the whole UTxO set, run //! //! ```bash -//! ./target/release/gpc-wallet show-all-outputs +//! ./target/release/gpc-wallet wallet show-all-outputs //! ``` mod cli;