pub struct NeoRuntime;Expand description
Direct wrappers for the canonical System.Runtime syscalls.
Implementations§
Source§impl NeoRuntime
impl NeoRuntime
pub fn get_time() -> Result<NeoInteger, NeoError>
pub fn get_time_i64() -> Result<i64, NeoError>
pub fn check_witness(account: &NeoByteString) -> Result<NeoBoolean, NeoError>
pub fn check_witness_bytes(account: &[u8]) -> Result<NeoBoolean, NeoError>
pub fn check_witness_i64(account: i64) -> Result<NeoBoolean, NeoError>
Sourcepub fn require_witness_i64(account: i64) -> bool
pub fn require_witness_i64(account: i64) -> bool
Canonical witness guard for i64-encoded accounts: returns true if the
runtime confirms the caller controls account, false on any syscall
error or denial. This is the single helper every state-changing contract
entry point should call before acting on a caller-supplied identity, to
prevent the “caller passed as a parameter” authorization-bypass class
(audit X1–X5). Mirrors the ad-hoc ensure_witness_i64 already used by
timelock-vault, staking-rewards, and crowdfunding.
pub fn notify( event: &NeoString, state: &NeoArray<NeoValue>, ) -> Result<(), NeoError>
pub fn notify_event(event: &str) -> Result<(), NeoError>
pub fn log(message: &NeoString) -> Result<(), NeoError>
pub fn platform() -> Result<NeoString, NeoError>
pub fn get_trigger() -> Result<NeoInteger, NeoError>
pub fn get_invocation_counter() -> Result<NeoInteger, NeoError>
pub fn get_random() -> Result<NeoInteger, NeoError>
pub fn get_network() -> Result<NeoInteger, NeoError>
pub fn get_address_version() -> Result<NeoInteger, NeoError>
pub fn get_gas_left() -> Result<NeoInteger, NeoError>
pub fn get_calling_script_hash() -> Result<NeoByteString, NeoError>
pub fn get_calling_script_hash_i64() -> Result<i64, NeoError>
pub fn get_entry_script_hash() -> Result<NeoByteString, NeoError>
pub fn get_entry_script_hash_i64() -> Result<i64, NeoError>
pub fn get_executing_script_hash() -> Result<NeoByteString, NeoError>
pub fn get_executing_script_hash_i64() -> Result<i64, NeoError>
pub fn get_notifications( script_hash: Option<&NeoByteString>, ) -> Result<NeoArray<NeoValue>, NeoError>
pub fn get_script_container() -> Result<NeoArray<NeoValue>, NeoError>
pub fn get_storage_context() -> Result<NeoStorageContext, NeoError>
Sourcepub fn burn_gas(gas: &NeoInteger) -> Result<(), NeoError>
pub fn burn_gas(gas: &NeoInteger) -> Result<(), NeoError>
Burn the specified amount of GAS from the calling contract.
Sourcepub fn current_signers() -> Result<NeoArray<NeoValue>, NeoError>
pub fn current_signers() -> Result<NeoArray<NeoValue>, NeoError>
Get the signers of the current transaction.
Sourcepub fn load_script(
script: &NeoByteString,
call_flags: &NeoInteger,
args: &NeoArray<NeoValue>,
) -> Result<(), NeoError>
pub fn load_script( script: &NeoByteString, call_flags: &NeoInteger, args: &NeoArray<NeoValue>, ) -> Result<(), NeoError>
Load and execute a script dynamically.
Auto Trait Implementations§
impl Freeze for NeoRuntime
impl RefUnwindSafe for NeoRuntime
impl Send for NeoRuntime
impl Sync for NeoRuntime
impl Unpin for NeoRuntime
impl UnsafeUnpin for NeoRuntime
impl UnwindSafe for NeoRuntime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more