odra_casper_livenet_env/lib.rs
1//! This crate provides a host environment for the livenet.
2mod error;
3mod livenet_contract_env;
4mod livenet_host;
5
6use livenet_host::LivenetHost;
7pub use odra_casper_rpc_client::error::LivenetError;
8use odra_core::host::HostEnv;
9
10/// Returns a host environment for the livenet.
11pub fn env() -> HostEnv {
12 let env = LivenetHost::new();
13 HostEnv::new(env)
14}
15
16/// Returns a non-failing host env for the livent
17pub fn env_safe() -> Result<HostEnv, LivenetError> {
18 let env = LivenetHost::new_safe()?;
19 Ok(HostEnv::new(env))
20}