Skip to content

Commit

Permalink
Removed old style API code
Browse files Browse the repository at this point in the history
  • Loading branch information
Phuong Nguyen committed Nov 25, 2021
1 parent 5ec44cb commit 41cbe0a
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 840 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[workspace]
members = [
"workspaces",
"workspaces-macros",
"examples",
]
12 changes: 0 additions & 12 deletions workspaces-macros/Cargo.toml

This file was deleted.

156 changes: 0 additions & 156 deletions workspaces-macros/src/entry.rs

This file was deleted.

14 changes: 0 additions & 14 deletions workspaces-macros/src/lib.rs

This file was deleted.

2 changes: 0 additions & 2 deletions workspaces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ version = "0.1.0"
edition = "2018"

[dependencies]
workspaces-macros = { version = "0.1.0", path = "../workspaces-macros" }

async-trait = "0.1"
actix = "=0.11.0-beta.2"
actix_derive = "=0.6.0-beta.1"
Expand Down
12 changes: 0 additions & 12 deletions workspaces/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ mod worker;

pub mod prelude;

#[cfg(not(test))] // Work around for rust-lang/rust#62127
pub use workspaces_macros::main;
pub use workspaces_macros::test;

pub use exports::*;
pub use rpc::api::*;
pub use runtime::{SandboxRuntime, TestnetRuntime};

pub use network::{Contract, DevNetwork, Network};
pub use worker::{sandbox, testnet, with_sandbox, with_testnet, Worker};

// Used for generated code, Not a public API
#[doc(hidden)]
#[path = "private/mod.rs"]
pub mod __private;
11 changes: 6 additions & 5 deletions workspaces/src/network/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ use async_trait::async_trait;
use near_crypto::{InMemorySigner, Signer};
use near_primitives::types::{AccountId, Balance};

use crate::rpc::client::Client;
use crate::runtime::local::SandboxServer;
use crate::NEAR_BASE;

use super::{
Account, AllowDevAccountCreation, AllowStatePatching, CallExecution, Contract, NetworkActions,
NetworkClient, NetworkInfo, TopLevelAccountCreator,
};
use crate::rpc::client::Client;
use crate::runtime::local::SandboxServer;

// Constant taken from nearcore crate to avoid dependency
pub(crate) const NEAR_BASE: Balance = 1_000_000_000_000_000_000_000_000;

const DEFAULT_DEPOSIT: Balance = 100 * NEAR_BASE;

Expand All @@ -25,7 +26,7 @@ pub struct Sandbox {
}

impl Sandbox {
fn home_dir(port: u16) -> PathBuf {
pub(crate) fn home_dir(port: u16) -> PathBuf {
let mut path = std::env::temp_dir();
path.push(format!("sandbox-{}", port));
path
Expand Down
1 change: 0 additions & 1 deletion workspaces/src/private/mod.rs

This file was deleted.

Loading

0 comments on commit 41cbe0a

Please sign in to comment.