pub struct Runtime {}
Expand description

The transaction runtime.

Implementations§

source§

impl Runtime

source

pub fn allocate_component_address( blueprint_id: BlueprintId ) -> (GlobalAddressReservation, ComponentAddress)

source

pub fn allocate_non_fungible_address( ) -> (GlobalAddressReservation, ResourceAddress)

source

pub fn get_reservation_address( reservation: &GlobalAddressReservation ) -> GlobalAddress

Get the global address an address reservation is associated with

source

pub fn global_component() -> Global<AnyComponent>

source

pub fn global_address() -> ComponentAddress

source

pub fn package_address() -> PackageAddress

Returns the current package address.

source

pub fn blueprint_name() -> String

source

pub fn package_token() -> NonFungibleGlobalId

source

pub fn emit_event<T: ScryptoEncode + ScryptoDescribe + ScryptoEvent>(event: T)

Emits an application event

source

pub fn assert_access_rule(rule: AccessRule)

source

pub fn transaction_hash() -> Hash

Returns the transaction hash.

source

pub fn generate_ruid() -> [u8; 32]

Returns the transaction hash.

source

pub fn bech32_encode_address<A: Into<GlobalAddress>>(address: A) -> String

source

pub fn panic(message: String) -> !

source

pub fn current_epoch() -> Epoch

Returns the current epoch

source

pub fn get_execution_cost_unit_limit() -> u32

source

pub fn get_execution_cost_unit_price() -> Decimal

source

pub fn get_finalization_cost_unit_limit() -> u32

source

pub fn get_finalization_cost_unit_price() -> Decimal

source

pub fn get_usd_price() -> Decimal

source

pub fn get_tip_percentage() -> u32

source

pub fn get_fee_balance() -> Decimal

Trait Implementations§

source§

impl Debug for Runtime

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> Twhere T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V