[−][src]Function near_sdk::env::set_blockchain_interface
pub fn set_blockchain_interface(
blockchain_interface: Box<dyn BlockchainInterface>
)
Replaces the current low-level blockchain interface accessible through env::*
with another
low-level blockchain interfacr that implements BlockchainInterface
trait. In most cases you
want to use testing_env!
macro to set it.
ⓘ
let mocked_blockchain = near_sdk::MockedBlockchain::new( context, vm_config, fees_config, vec![], storage, ); near_sdk::env::set_blockchain_interface(Box::new(mocked_blockchain));