1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
pub use near_bindgen_macros::{callback_args, callback_args_vec, ext_contract, near_bindgen};

pub mod collections;
mod environment;
pub use environment::env;

mod promise;
pub use promise::{Promise, PromiseOrValue};

#[cfg(feature = "testing")]
pub use environment::mocked_blockchain::MockedBlockchain;
pub use near_vm_logic::types::*;
#[cfg(feature = "testing")]
pub use near_vm_logic::Config;
#[cfg(feature = "testing")]
pub use near_vm_logic::VMContext;

#[cfg(feature = "testing")]
#[macro_export]
macro_rules! testing_env {
    ($context:ident, $config:expr) => {
        near_bindgen::env::set_blockchain_interface(Box::new(MockedBlockchain::new(
            $context,
            $config,
            vec![],
        )));
    };
}

pub use environment::blockchain_interface::BlockchainInterface;