Skip to content

Commit cda3b07

Browse files
committed
handle not controller feature
1 parent bd12d26 commit cda3b07

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

bin/sozo/src/commands/options/account/mod.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::collections::HashMap;
22
use std::str::FromStr;
33

4-
use anyhow::{anyhow, Context, Result};
4+
use anyhow::{anyhow, Result};
55
use clap::Args;
66
use dojo_utils::env::DOJO_ACCOUNT_ADDRESS_ENV_VAR;
77
use dojo_world::config::Environment;
@@ -11,7 +11,6 @@ use starknet::core::types::{BlockId, BlockTag, Felt};
1111
use starknet::providers::Provider;
1212
use starknet::signers::LocalWallet;
1313
use tracing::trace;
14-
use url::Url;
1514

1615
use super::signer::SignerOptions;
1716
use super::starknet::StarknetOptions;
@@ -58,14 +57,16 @@ impl AccountOptions {
5857
#[cfg(feature = "controller")]
5958
pub async fn controller<P>(
6059
&self,
61-
rpc_url: Url,
60+
rpc_url: url::Url,
6261
provider: P,
6362
contracts: &HashMap<String, ContractInfo>,
6463
) -> Result<ControllerSessionAccount<P>>
6564
where
6665
P: Provider,
6766
P: Send + Sync,
6867
{
68+
use anyhow::Context;
69+
6970
controller::create_controller(rpc_url, provider, contracts)
7071
.await
7172
.context("Failed to create a Controller account")

bin/sozo/src/commands/options/account/provider.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unused)]
2+
13
use async_trait::async_trait;
24
use starknet::core::types::{
35
BlockHashAndNumber, BlockId, BroadcastedDeclareTransaction,
@@ -12,11 +14,7 @@ use starknet::core::types::{
1214
use starknet::providers::{Provider, ProviderError, ProviderRequestData, ProviderResponseData};
1315

1416
#[derive(Debug, Clone)]
15-
pub enum EitherProvider<P, Q>
16-
where
17-
P: Provider,
18-
Q: Provider,
19-
{
17+
pub enum EitherProvider<P, Q> {
2018
Left(P),
2119
Right(Q),
2220
}

bin/sozo/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![warn(unused_crate_dependencies)]
1+
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
22

33
use std::env;
44
use std::process::exit;

0 commit comments

Comments
 (0)