Skip to content

Commit

Permalink
feat: bump to version 0.3.0-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuttymoon committed Aug 22, 2023
1 parent 944e69f commit cb526f6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
members = ["crates/ash_cli", "crates/ash_sdk"]

[workspace.package]
version = "0.2.3-alpha"
version = "0.3.0-alpha"
edition = "2021"
authors = ["E36 Knots"]
homepage = "https://ash.center"
Expand Down
2 changes: 1 addition & 1 deletion crates/ash_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ categories.workspace = true
keywords.workspace = true

[dependencies]
ash_sdk = { path = "../ash_sdk", version = "0.2.3-alpha" }
ash_sdk = { path = "../ash_sdk", version = "0.3.0-alpha" }
clap = { version = "4.0.32", features = ["derive", "env"] }
colored = "2.0.0"
exitcode = "1.1.2"
Expand Down
34 changes: 17 additions & 17 deletions crates/ash_cli/src/utils/templating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub(crate) fn template_blockchain_info(
));
}

indent::indent_all_by(indent.into(), info_str)
indent::indent_all_by(indent, info_str)
}

pub(crate) fn template_validator_info(
Expand Down Expand Up @@ -262,7 +262,7 @@ pub(crate) fn template_validator_info(
}
}

indent::indent_all_by(indent.into(), info_str)
indent::indent_all_by(indent, info_str)
}

pub(crate) fn template_subnet_info(
Expand Down Expand Up @@ -315,7 +315,7 @@ pub(crate) fn template_subnet_info(
type_colorize(&subnet.subnet_type.to_string()),
match subnet.subnet_type {
AvalancheSubnetType::Permissioned =>
indent::indent_all_by(subindent.into(), permissioned_subnet_info),
indent::indent_all_by(subindent, permissioned_subnet_info),
_ => "".to_string(),
},
type_colorize(&subnet.blockchains.len()),
Expand Down Expand Up @@ -351,7 +351,7 @@ pub(crate) fn template_subnet_info(
));
}

indent::indent_all_by(indent.into(), info_str)
indent::indent_all_by(indent, info_str)
}

pub(crate) fn template_subnet_creation(subnet: &AvalancheSubnet, wait: bool) -> String {
Expand Down Expand Up @@ -471,7 +471,7 @@ pub(crate) fn template_avalanche_node_info(node: &AvalancheNode, indent: usize)
type_colorize(&node.uptime.weighted_average_percentage),
));

indent::indent_all_by(indent.into(), info_str)
indent::indent_all_by(indent, info_str)
}

pub(crate) fn template_chain_is_bootstrapped(
Expand All @@ -493,7 +493,7 @@ pub(crate) fn template_chain_is_bootstrapped(
}
));

indent::indent_all_by(indent.into(), bootstrapped_str)
indent::indent_all_by(indent, bootstrapped_str)
}

pub(crate) fn template_generate_private_key(
Expand All @@ -511,7 +511,7 @@ pub(crate) fn template_generate_private_key(
type_colorize(&private_key_hex),
));

indent::indent_all_by(indent.into(), private_key_str)
indent::indent_all_by(indent, private_key_str)
}

pub(crate) fn template_wallet_info(wallet_info: &AvalancheWalletInfo, indent: usize) -> String {
Expand All @@ -528,7 +528,7 @@ pub(crate) fn template_wallet_info(wallet_info: &AvalancheWalletInfo, indent: us
type_colorize(&wallet_info.evm_address),
));

indent::indent_all_by(indent.into(), info_str)
indent::indent_all_by(indent, info_str)
}

pub(crate) fn template_xchain_balance(
Expand All @@ -546,7 +546,7 @@ pub(crate) fn template_xchain_balance(
type_colorize(&(balance.balance as f64 / 1_000_000_000.0)),
));

indent::indent_all_by(indent.into(), balance_str)
indent::indent_all_by(indent, balance_str)
}

pub(crate) fn template_xchain_transfer(
Expand Down Expand Up @@ -581,7 +581,7 @@ pub(crate) fn template_xchain_transfer(
));
}

indent::indent_all_by(indent.into(), transfer_str)
indent::indent_all_by(indent, transfer_str)
}

pub(crate) fn template_genesis_encoded(genesis_bytes: Vec<u8>, indent: usize) -> String {
Expand All @@ -594,7 +594,7 @@ pub(crate) fn template_genesis_encoded(genesis_bytes: Vec<u8>, indent: usize) ->
type_colorize(&format!("0x{}", hex::encode(genesis_bytes))),
));

indent::indent_all_by(indent.into(), genesis_str)
indent::indent_all_by(indent, genesis_str)
}

pub(crate) fn template_warp_message(
Expand Down Expand Up @@ -624,7 +624,7 @@ pub(crate) fn template_warp_message(
type_colorize(&message.unsigned_message.source_chain_id),
match &message.unsigned_message.payload {
WarpMessagePayload::SubnetEVMAddressedPayload(addressed_payload) =>
template_warp_addressed_payload(&addressed_payload, 2),
template_warp_addressed_payload(addressed_payload, 2),
WarpMessagePayload::Unknown(payload) => format!(
"Payload (Unknown): {}",
type_colorize(&indent::indent_all_by(
Expand Down Expand Up @@ -656,7 +656,7 @@ pub(crate) fn template_warp_message(
unsigned_message_str,
match &message.verified_message {
VerifiedWarpMessage::SubnetEVM(verified_message) =>
template_warp_subnet_evm_message(&verified_message, 2),
template_warp_subnet_evm_message(verified_message, 2),
VerifiedWarpMessage::Unknown => "".to_string(),
},
match extended {
Expand All @@ -665,7 +665,7 @@ pub(crate) fn template_warp_message(
}
));

indent::indent_all_by(indent.into(), message_str)
indent::indent_all_by(indent, message_str)
}

pub(crate) fn template_warp_addressed_payload(payload: &AddressedPayload, indent: usize) -> String {
Expand All @@ -685,7 +685,7 @@ pub(crate) fn template_warp_addressed_payload(payload: &AddressedPayload, indent
type_colorize(&payload.payload),
));

indent::indent_all_by(indent.into(), payload_str)
indent::indent_all_by(indent, payload_str)
}

pub(crate) fn template_warp_subnet_evm_message(
Expand Down Expand Up @@ -713,7 +713,7 @@ pub(crate) fn template_warp_subnet_evm_message(
}
));

indent::indent_all_by(indent.into(), message_str)
indent::indent_all_by(indent, message_str)
}

pub(crate) fn template_warp_node_signatures(
Expand All @@ -739,5 +739,5 @@ pub(crate) fn template_warp_node_signatures(
))
}

indent::indent_all_by(indent.into(), signatures_str)
indent::indent_all_by(indent, signatures_str)
}
7 changes: 2 additions & 5 deletions crates/ash_sdk/src/avalanche/subnets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@ impl AvalancheSubnet {
let mut endpoint_node = AvalancheNode {
http_host: endpoint_host.clone(),
http_port: endpoint_port,
https_enabled: match endpoint_scheme.as_str() {
"https" => true,
_ => false,
},
https_enabled: matches!(endpoint_scheme.as_str(), "https"),
..Default::default()
};
endpoint_node.update_info()?;
Expand All @@ -260,7 +257,7 @@ impl AvalancheSubnet {
let info_rpc_url = format!(
"{}/{}",
endpoint_node.get_http_endpoint(),
info::AVAX_INFO_API_ENDPOINT.to_string()
info::AVAX_INFO_API_ENDPOINT
);

// Get the peers information from the info.peers endpoint (notably the nodes public IP addresses)
Expand Down
2 changes: 1 addition & 1 deletion crates/ash_sdk/src/avalanche/warp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ impl WarpMessage {
}

// Update the status of the Warp message
if self.node_signatures.len() >= 1 {
if !self.node_signatures.is_empty() {
self.status = WarpMessageStatus::Signed(self.node_signatures.len() as u16);
} else {
self.status = WarpMessageStatus::Sent;
Expand Down

0 comments on commit cb526f6

Please sign in to comment.