unc_sdk/
lib.rs

1//* Clippy is giving false positive warnings for this in 1.57 version. Remove this if fixed.
2//* https://github.com/rust-lang/rust-clippy/issues/8091
3#![allow(clippy::redundant_closure)]
4// We want to enable all clippy lints, but some of them generate false positives.
5#![allow(clippy::missing_const_for_fn, clippy::redundant_pub_crate)]
6#![allow(clippy::multiple_bound_locations)]
7
8#[cfg(test)]
9extern crate quickcheck;
10
11pub use unc_sdk_macros::{
12    ext_contract, unc, unc_bindgen, BorshStorageKey, EventMetadata, FunctionError, PanicOnDefault,
13    UncSchema,
14};
15
16pub mod store;
17
18#[cfg(feature = "legacy")]
19pub mod collections;
20mod environment;
21pub use environment::env;
22
23#[cfg(feature = "unstable")]
24pub use unc_sys as sys;
25
26mod promise;
27pub use promise::{Allowance, Promise, PromiseOrValue};
28
29// Private types just used within macro generation, not stable to be used.
30#[doc(hidden)]
31#[path = "private/mod.rs"]
32pub mod __private;
33
34pub mod json_types;
35
36mod types;
37pub use crate::types::*;
38
39#[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))]
40pub use environment::mock;
41#[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))]
42pub use environment::mock::test_vm_config;
43#[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))]
44// Re-export to avoid breakages
45pub use environment::mock::MockedBlockchain;
46#[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))]
47pub use test_utils::context::VMContext;
48
49pub mod utils;
50pub use crate::utils::storage_key_impl::IntoStorageKey;
51pub use crate::utils::*;
52
53#[cfg(all(feature = "unit-testing", not(target_arch = "wasm32")))]
54pub mod test_utils;
55
56// Set up global allocator by default if custom-allocator feature is not set in wasm32 architecture.
57#[cfg(all(feature = "wee_alloc", target_arch = "wasm32"))]
58#[global_allocator]
59static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
60
61// Exporting common crates
62
63pub use base64;
64pub use borsh;
65pub use bs58;
66#[cfg(feature = "abi")]
67pub use schemars;
68pub use serde;
69pub use serde_json;