extern crate core;
mod address;
mod call_args;
mod mock_vm_type;
mod ty;
#[allow(clippy::assign_op_pattern, clippy::reversed_empty_ranges)]
mod uints;
pub use address::Address;
pub use address::CONTRACT_ADDRESS_PREFIX;
pub use borsh::{BorshDeserialize, BorshSerialize};
pub use call_args::CallArgs;
pub use mock_vm_type::{MockVMSerializationError, MockVMType};
pub use ty::Typed;
pub use uints::{U128, U256, U512};
pub type Balance = U256;
pub type BlockTime = u64;
pub trait OdraType: MockVMType {
    fn serialize(&self) -> Option<Vec<u8>> {
        self.ser().ok()
    }
    fn deserialize(bytes: &[u8]) -> Option<Self> {
        Self::deser(bytes.to_vec()).ok()
    }
}
impl<T: MockVMType> OdraType for T {}
pub type EventData = Vec<u8>;
#[derive(Debug, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize, Default)]
pub struct Bytes(Vec<u8>);
impl Bytes {
    pub fn new() -> Bytes {
        Bytes::default()
    }
    #[inline]
    pub fn inner_bytes(&self) -> &Vec<u8> {
        &self.0
    }
    pub fn as_slice(&self) -> &[u8] {
        self.inner_bytes().as_slice()
    }
}
impl From<Vec<u8>> for Bytes {
    fn from(vec: Vec<u8>) -> Self {
        Self(vec)
    }
}