Skip to content

Commit

Permalink
fix: fully remove all sandbox related types and args
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal committed Oct 16, 2023
1 parent 3ac190a commit 34b0467
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 774 deletions.
235 changes: 0 additions & 235 deletions cmd/soroban-cli/src/commands/config/events_file.rs

This file was deleted.

55 changes: 0 additions & 55 deletions cmd/soroban-cli/src/commands/config/ledger_file.rs

This file was deleted.

25 changes: 0 additions & 25 deletions cmd/soroban-cli/src/commands/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ use std::path::PathBuf;

use clap::{arg, command, Parser};
use serde::{Deserialize, Serialize};
use soroban_ledger_snapshot::LedgerSnapshot;

use crate::Pwd;

use self::{network::Network, secret::Secret};

pub mod events_file;
pub mod identity;
pub mod ledger_file;
pub mod locator;
pub mod network;
pub mod secret;
Expand All @@ -20,7 +17,6 @@ pub enum Cmd {
/// Configure different identities to sign transactions.
#[command(subcommand)]
Identity(identity::Cmd),

/// Configure different networks
#[command(subcommand)]
Network(network::Cmd),
Expand All @@ -30,16 +26,10 @@ pub enum Cmd {
pub enum Error {
#[error(transparent)]
Identity(#[from] identity::Error),

#[error(transparent)]
Network(#[from] network::Error),

#[error(transparent)]
Ledger(#[from] ledger_file::Error),

#[error(transparent)]
Secret(#[from] secret::Error),

#[error(transparent)]
Config(#[from] locator::Error),
}
Expand All @@ -60,9 +50,6 @@ pub struct Args {
#[command(flatten)]
pub network: network::Args,

#[command(flatten)]
pub ledger_file: ledger_file::Args,

#[arg(long, visible_alias = "source", env = "SOROBAN_ACCOUNT")]
/// Account that signs the final transaction. Alias `source`. Can be an identity (--source alice), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). Default: `identity generate --default-seed`
pub source_account: Option<String>,
Expand Down Expand Up @@ -98,18 +85,6 @@ impl Args {
Ok(self.network.get(&self.locator)?)
}

pub fn is_no_network(&self) -> bool {
self.network.is_no_network()
}

pub fn get_state(&self) -> Result<LedgerSnapshot, Error> {
Ok(self.ledger_file.read(&self.locator.config_dir()?)?)
}

pub fn set_state(&self, state: &LedgerSnapshot) -> Result<(), Error> {
Ok(self.ledger_file.write(state, &self.locator.config_dir()?)?)
}

pub fn config_dir(&self) -> Result<PathBuf, Error> {
Ok(self.locator.config_dir()?)
}
Expand Down
Loading

0 comments on commit 34b0467

Please sign in to comment.