pub mod codec;
pub mod storage;
pub mod utils;
pub use neo_macros::*;
pub use neo_runtime::{
NeoContractRuntime, NeoCrypto, NeoJSON, NeoRuntime, NeoRuntimeContext, NeoStorage,
};
pub use neo_syscalls::*;
pub use neo_types::{
NeoArray, NeoBoolean, NeoByteString, NeoContract, NeoContract as NeoContractTrait,
NeoContractABI, NeoContractEntry, NeoContractEvent, NeoContractManifest, NeoContractMethod,
NeoContractMethodTrait, NeoContractParameter, NeoContractPermission, NeoError, NeoInteger,
NeoIterator, NeoMap, NeoResult, NeoStorageContext, NeoString, NeoStruct, NeoValue,
};
pub use serde;
pub mod prelude {
pub use crate::{
neo_contract, neo_entry, neo_event, neo_manifest_overlay, neo_method, neo_permission,
neo_safe, neo_safe_methods, neo_supported_standards, neo_trusts, serde, NeoArray,
NeoBoolean, NeoByteString, NeoContract, NeoContractABI, NeoContractEntry, NeoContractEvent,
NeoContractManifest, NeoContractMethod, NeoContractMethodTrait, NeoContractParameter,
NeoContractPermission, NeoContractRuntime, NeoContractTrait, NeoCrypto, NeoError,
NeoInteger, NeoIterator, NeoJSON, NeoMap, NeoResult, NeoRuntime, NeoRuntimeContext,
NeoStorage, NeoStorageContext, NeoString, NeoStruct, NeoValue,
};
}
pub struct ExampleContract;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_neo_types() {
let int = NeoInteger::new(42);
assert_eq!(int.as_i32(), 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!");
}
}