Skip to main content

NeoVMSyscall

Struct NeoVMSyscall 

Source
pub struct NeoVMSyscall;
Expand description

Neo N3 System Call Wrapper

Implementations§

Source§

impl NeoVMSyscall

Source

pub fn get_time() -> Result<NeoInteger, NeoError>

Get current timestamp

Source

pub fn check_witness(account: &NeoByteString) -> Result<NeoBoolean, NeoError>

Check if the specified account is a witness

Source

pub fn notify( event: &NeoString, state: &NeoArray<NeoValue>, ) -> Result<(), NeoError>

Send notification to the runtime.

§Arguments
  • event - The event name
  • state - The event state as an array of values
§Note

This function clones the event and state arguments as NeoValue requires owned data.

Source

pub fn log(message: &NeoString) -> Result<(), NeoError>

Log message to the runtime.

§Note

This function clones the message as NeoValue requires owned data.

Source

pub fn platform() -> Result<NeoString, NeoError>

Platform identifier

Source

pub fn get_trigger() -> Result<NeoInteger, NeoError>

Source

pub fn get_invocation_counter() -> Result<NeoInteger, NeoError>

Source

pub fn get_random() -> Result<NeoInteger, NeoError>

Source

pub fn get_network() -> Result<NeoInteger, NeoError>

Source

pub fn get_address_version() -> Result<NeoInteger, NeoError>

Source

pub fn get_gas_left() -> Result<NeoInteger, NeoError>

Source

pub fn get_calling_script_hash() -> Result<NeoByteString, NeoError>

Source

pub fn get_entry_script_hash() -> Result<NeoByteString, NeoError>

Source

pub fn get_executing_script_hash() -> Result<NeoByteString, NeoError>

Source

pub fn get_notifications( script_hash: Option<&NeoByteString>, ) -> Result<NeoArray<NeoValue>, NeoError>

Get notifications for the specified script hash, or all notifications if None.

Source

pub fn get_script_container() -> Result<NeoArray<NeoValue>, NeoError>

Source

pub fn storage_get_context() -> Result<NeoStorageContext, NeoError>

Source

pub fn storage_get_read_only_context() -> Result<NeoStorageContext, NeoError>

Source

pub fn storage_as_read_only( context: &NeoStorageContext, ) -> Result<NeoStorageContext, NeoError>

Source

pub fn storage_get( context: &NeoStorageContext, key: &NeoByteString, ) -> Result<NeoByteString, NeoError>

Source

pub fn storage_put( context: &NeoStorageContext, key: &NeoByteString, value: &NeoByteString, ) -> Result<(), NeoError>

Source

pub fn storage_delete( context: &NeoStorageContext, key: &NeoByteString, ) -> Result<(), NeoError>

Source

pub fn storage_find( context: &NeoStorageContext, prefix: &NeoByteString, ) -> Result<NeoIterator<NeoValue>, NeoError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.