#[cfg(feature = "serde")]
pub mod codec;
pub mod native_contracts;
pub mod standards;
#[cfg(feature = "serde")]
pub mod storage;
#[cfg(feature = "serde")]
pub mod utils;
pub use native_contracts::*;
pub use neo_macros::*;
pub use neo_runtime::{
NeoContractRuntime, NeoRuntime, NeoRuntimeContext, NeoStorage, RawKeyBuilder, RawStorage,
RawStorageGet,
};
#[cfg(feature = "std")]
pub use neo_runtime::{NeoCrypto, NeoJSON};
pub use neo_syscalls::*;
pub use neo_types::{
Hash160, Hash256, NeoArray, NeoBoolean, NeoByteString, NeoContract, NeoContractABI,
NeoContractEntry, NeoContractEvent, NeoContractManifest, NeoContractMethod,
NeoContractMethodTrait, NeoContractParameter, NeoContractPermission, NeoError, NeoInteger,
NeoIterator, NeoMap, NeoResult, NeoStorageContext, NeoString, NeoStruct, NeoValue,
};
#[cfg(feature = "serde")]
pub use serde;
pub use standards::*;
pub mod prelude {
#[cfg(feature = "serde")]
pub use crate::serde;
pub use crate::{
native_contracts::*, neo_contract, neo_entry, neo_event, neo_manifest_overlay, neo_method,
neo_permission, neo_safe, neo_safe_methods, neo_supported_standards, neo_trusts,
standards::*, Hash160, Hash256, NeoArray, NeoBoolean, NeoByteString, NeoContract,
NeoContractABI, NeoContractEntry, NeoContractEvent, NeoContractManifest, NeoContractMethod,
NeoContractMethodTrait, NeoContractParameter, NeoContractPermission, NeoContractRuntime,
NeoError, NeoInteger, NeoIterator, NeoMap, NeoResult, NeoRuntime, NeoRuntimeContext,
NeoStorage, NeoStorageContext, NeoString, NeoStruct, NeoValue, RawKeyBuilder, RawStorage,
RawStorageGet,
};
#[cfg(feature = "std")]
pub use crate::{NeoCrypto, NeoJSON};
}
pub struct ExampleContract;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_neo_types() {
let int = NeoInteger::new(42);
assert_eq!(int.as_i32_saturating(), 42);
let bool_val = NeoBoolean::new(true);
assert!(bool_val.as_bool());
let string = NeoString::from_str("Hello, Neo!");
assert_eq!(string.as_str(), "Hello, Neo!");
}
}