Function near_sdk::env::take_blockchain_interface [−][src]
pub fn take_blockchain_interface() -> Option<Box<dyn BlockchainInterface>>
Removes and returns the current low-level blockchain interface accessible through env::*
.
It is not meant to be used by the contract developers directly. In most cases you want to use
testing_env!
macro for your use cases.
ⓘ
let blockchain_interface = near_sdk::env::take_blockchain_interface(); // The following will panic, because there is no blockchain interface set: // env::account_balance();