Skip to content

Commit

Permalink
fix: get crates building again
Browse files Browse the repository at this point in the history
  • Loading branch information
Serial-ATA committed Dec 27, 2024
1 parent c44f3cc commit d5ae8d2
Show file tree
Hide file tree
Showing 8 changed files with 902 additions and 24 deletions.
901 changes: 893 additions & 8 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions cli/src/deploy/tangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ use alloy_rpc_types_eth::TransactionRequest;
use alloy_signer_local::PrivateKeySigner;
use color_eyre::eyre::{self, Context, ContextCompat, Result};
use gadget_blueprint_proc_macro_core::{BlueprintManager, ServiceBlueprint};
use gadget_clients::tangle::runtime::TangleConfig;
use gadget_crypto::tangle_pair_signer::TanglePairSigner;
use gadget_std::fmt::Debug;
use gadget_std::path::PathBuf;
use subxt::tx::Signer;
use tangle_subxt::subxt;
use tangle_subxt::subxt::ext::sp_core;
use tangle_subxt::subxt::tx::PairSigner;
use tangle_subxt::tangle_testnet_runtime::api as TangleApi;
use tangle_subxt::tangle_testnet_runtime::api::services::calls::types;

pub type TanglePairSigner = PairSigner<TangleConfig, sp_core::sr25519::Pair>;

#[derive(Clone)]
pub struct Opts {
/// The name of the package to deploy (if the workspace has multiple packages)
Expand All @@ -26,7 +24,7 @@ pub struct Opts {
/// The path to the manifest file
pub manifest_path: gadget_std::path::PathBuf,
/// The signer for deploying the blueprint
pub signer: Option<TanglePairSigner>,
pub signer: Option<TanglePairSigner<sp_core::sr25519::Pair>>,
/// The signer for deploying the smart contract
pub signer_evm: Option<PrivateKeySigner>,
}
Expand Down Expand Up @@ -106,7 +104,7 @@ pub async fn deploy_to_tangle(
let signer = if let Some(signer) = signer {
signer
} else {
crate::signer::load_signer_from_env()?.pair
crate::signer::load_signer_from_env()?
};

let my_account_id = signer.account_id();
Expand Down
5 changes: 2 additions & 3 deletions crates/blueprint/manager/src/executor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ pub async fn run_blueprint_manager<F: SendFuture<'static, ()>>(
&event,
&mut active_gadgets,
&sub_account_id.clone(),
)
.await;
);

if result.needs_update {
operator_subscribed_blueprints = services_client
Expand Down Expand Up @@ -294,7 +293,7 @@ async fn handle_init(

// Immediately poll, handling the initial state
let poll_result =
event_handler::check_blueprint_events(&init_event, active_gadgets, sub_account_id).await;
event_handler::check_blueprint_events(&init_event, active_gadgets, sub_account_id);

event_handler::handle_tangle_event(
&init_event,
Expand Down
3 changes: 0 additions & 3 deletions crates/crypto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ pub use gadget_crypto_tangle_pair_signer as tangle_pair_signer;
#[cfg(feature = "hashing")]
pub use gadget_crypto_hashing as hashing;

#[cfg(feature = "tangle-pair-signer")]
pub use gadget_crypto_tangle_pair_signer as tangle_pair_signer;

#[derive(Debug, Error)]
pub enum CryptoCoreError {
#[cfg(feature = "k256")]
Expand Down
2 changes: 1 addition & 1 deletion crates/event-listeners/tangle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
[dependencies]
gadget-blueprint-serde = { workspace = true }
gadget-clients = { workspace = true, features = ["tangle"] }
gadget-contexts = { workspace = true, features = ["keystore"] }
gadget-contexts = { workspace = true, features = ["keystore", "tangle"] }
gadget-crypto-tangle-pair-signer = { workspace = true }
gadget-event-listeners-core = { workspace = true }
gadget-keystore = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/macros/blueprint-proc-macro/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ fn generate_qos_report_event_handler(

#[automatically_derived]
#[gadget_sdk::async_trait::async_trait]
impl gadget_sdk::event_utils::substrate::EventHandler<gadget_sdk::clients::tangle::runtime::TangleConfig, #event_type> for #struct_name {
impl gadget_sdk::event_utils::substrate::EventHandler<gadget_sdk::clients::tangle::client::TangleConfig, #event_type> for #struct_name {
async fn handle(&self, event: &#event_type) -> Result<Vec<gadget_sdk::tangle_subxt::tangle_testnet_runtime::api::runtime_types::tangle_primitives::services::field::Field<gadget_sdk::subxt_core::utils::AccountId32>>, gadget_sdk::event_utils::Error> {
use std::time::Duration;
use gadget_sdk::slashing::reports::{QoSReporter, DefaultQoSReporter};
Expand Down
1 change: 0 additions & 1 deletion crates/macros/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ pub enum FieldType {
}

impl FieldType {
#[must_use]
/// Returns the Rust type representation of this field type as a string.
///
/// This method converts the `FieldType` enum variant into its corresponding Rust type string.
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.83.0"
channel = "nightly-2024-10-13"
components = ["rustfmt", "clippy", "rust-src"]
targets = ["wasm32-unknown-unknown"]
profile = "minimal"

0 comments on commit d5ae8d2

Please sign in to comment.