1#[cfg(feature = "serde")]
9pub mod codec;
10pub mod native_contracts;
11pub mod nep_macros;
12pub mod standards;
13#[cfg(feature = "serde")]
14pub mod storage;
15#[cfg(feature = "serde")]
16pub mod utils;
17
18pub use native_contracts::*;
20pub use neo_macros::*;
21pub use neo_runtime::{
22 call_typed, ContractCallError, DefaultContractCaller, NeoContractRuntime, NeoRuntime,
23 NeoRuntimeContext, NeoStorage, RawKeyBuilder, RawStorage, RawStorageGet,
24};
25#[cfg(feature = "std")]
26pub use neo_runtime::{NeoCrypto, NeoJSON};
27pub use neo_syscalls::*;
28pub use neo_types::{
29 serialise_array, serialise_notification, serialise_value, BigInt, ContractCaller,
30 FromNeoValue, Hash160, Hash256, NeoArray, NeoBoolean, NeoByteString, NeoContract,
31 NeoContractABI, NeoContractEntry, NeoContractEvent, NeoContractManifest, NeoContractMethod,
32 NeoContractMethodTrait, NeoContractParameter, NeoContractPermission, NeoError, NeoInteger,
33 NeoIterator, NeoMap, NeoResult, NeoStorageContext, NeoString, NeoStruct, NeoValue,
34 MAX_NOTIFICATION_SIZE, MAX_STACK_SIZE,
35};
36
37#[cfg(feature = "serde")]
38pub use serde;
39pub use standards::*;
40
41pub mod prelude {
43 #[cfg(feature = "serde")]
44 pub use crate::serde;
45 pub use crate::{
46 call_typed, native_contracts::*, neo_contract, neo_entry, neo_event, neo_manifest_overlay,
47 neo_method, neo_permission, neo_safe, neo_safe_methods, neo_supported_standards,
48 neo_trusts, serialise_array, serialise_notification, serialise_value, standards::*, BigInt,
49 ContractCallError, ContractCaller, DefaultContractCaller, FromNeoValue, Hash160, Hash256,
50 NeoArray, NeoBoolean, NeoByteString, NeoContract, NeoContractABI, NeoContractEntry,
51 NeoContractEvent, NeoContractManifest, NeoContractMethod, NeoContractMethodTrait,
52 NeoContractParameter, NeoContractPermission, NeoContractRuntime, NeoError, NeoInteger,
53 NeoIterator, NeoMap, NeoResult, NeoRuntime, NeoRuntimeContext, NeoStorage,
54 NeoStorageContext, NeoString, NeoStruct, NeoValue, RawKeyBuilder, RawStorage, RawStorageGet,
55 MAX_NOTIFICATION_SIZE, MAX_STACK_SIZE,
56 };
57 #[cfg(feature = "std")]
58 pub use crate::{NeoCrypto, NeoJSON};
59}
60
61pub struct ExampleContract;
126
127#[cfg(test)]
128mod tests {
129 use super::*;
130
131 #[test]
132 fn test_neo_types() {
133 let int = NeoInteger::new(42);
134 assert_eq!(int.as_i32_saturating(), 42);
135
136 let bool_val = NeoBoolean::new(true);
137 assert!(bool_val.as_bool());
138
139 let string = NeoString::from_str("Hello, Neo!");
140 assert_eq!(string.as_str(), "Hello, Neo!");
141 }
142}