From 06876ab611a0c0e5bf5d560f08713254ecffb642 Mon Sep 17 00:00:00 2001 From: Jarry Xiao <61092285+jarry-xiao@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:37:55 -0400 Subject: [PATCH] Jarry/small bug in create mint (#36) * fix bug in create mint * bump version * Add more data to get-market to help with market creation --- Cargo.toml | 2 +- src/lib/helpers/devnet_helpers.rs | 4 ++-- src/lib/helpers/print_helpers.rs | 14 +++++++++++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 56b1d06..24631a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "phoenix-cli" -version = "0.3.3" +version = "0.3.4" description = "CLI and associated library for interacting with the Phoenix program from the command line" edition = "2021" license = "MIT" diff --git a/src/lib/helpers/devnet_helpers.rs b/src/lib/helpers/devnet_helpers.rs index 762f465..34fd628 100644 --- a/src/lib/helpers/devnet_helpers.rs +++ b/src/lib/helpers/devnet_helpers.rs @@ -61,8 +61,8 @@ pub mod devnet_token_faucet { let create_mint_data = CreateMint { ticker, decimals }; let ix_data: Vec = [ - CREAT_MINT_DISCRIMINATOR, - create_mint_data.try_to_vec().unwrap().try_into().unwrap(), + &CREAT_MINT_DISCRIMINATOR, + create_mint_data.try_to_vec().unwrap().as_slice(), ] .concat(); diff --git a/src/lib/helpers/print_helpers.rs b/src/lib/helpers/print_helpers.rs index 5367194..2ccc07c 100644 --- a/src/lib/helpers/print_helpers.rs +++ b/src/lib/helpers/print_helpers.rs @@ -182,26 +182,34 @@ pub async fn print_market_details( println!("Quote vault key: {}", market_header.quote_params.vault_key); println!( - "Base Lot Size, in raw base units: {}", + "Raw base units per base lot: {}", get_decimal_string( market_metadata.base_atoms_per_base_lot, market_metadata.base_decimals ), ); println!( - "Quote Lot Size, in quote units: {}", + "Quote units per quote lot: {}", get_decimal_string( market_metadata.quote_atoms_per_quote_lot, market_metadata.quote_decimals ) ); println!( - "Tick size in quote atoms per base unit: {}", + "Tick size in quote units per base unit: {}", get_decimal_string( market_metadata.tick_size_in_quote_atoms_per_base_unit, market_metadata.quote_decimals ) ); + println!( + "Num base lots per base unit: {}", + market_metadata.num_base_lots_per_base_unit, + ); + println!( + "Tick size in quote atoms per base unit: {}", + market_metadata.tick_size_in_quote_atoms_per_base_unit, + ); println!("Taker fees in basis points: {}", taker_fees); println!("Fee destination pubkey: {:?}", market_header.fee_recipient); println!(