pub struct Runtime {}
Expand description
The transaction runtime.
Implementations§
source§impl Runtime
impl Runtime
pub fn allocate_component_address( blueprint_id: BlueprintId ) -> (GlobalAddressReservation, ComponentAddress)
pub fn allocate_non_fungible_address( ) -> (GlobalAddressReservation, ResourceAddress)
sourcepub fn get_reservation_address(
reservation: &GlobalAddressReservation
) -> GlobalAddress
pub fn get_reservation_address( reservation: &GlobalAddressReservation ) -> GlobalAddress
Get the global address an address reservation is associated with
pub fn global_component() -> Global<AnyComponent>
pub fn global_address() -> ComponentAddress
sourcepub fn package_address() -> PackageAddress
pub fn package_address() -> PackageAddress
Returns the current package address.
pub fn blueprint_name() -> String
pub fn package_token() -> NonFungibleGlobalId
sourcepub fn emit_event<T: ScryptoEncode + ScryptoDescribe + ScryptoEvent>(event: T)
pub fn emit_event<T: ScryptoEncode + ScryptoDescribe + ScryptoEvent>(event: T)
Emits an application event
pub fn assert_access_rule(rule: AccessRule)
sourcepub fn transaction_hash() -> Hash
pub fn transaction_hash() -> Hash
Returns the transaction hash.
sourcepub fn generate_ruid() -> [u8; 32]
pub fn generate_ruid() -> [u8; 32]
Returns the transaction hash.
pub fn bech32_encode_address<A: Into<GlobalAddress>>(address: A) -> String
pub fn panic(message: String) -> !
sourcepub fn current_epoch() -> Epoch
pub fn current_epoch() -> Epoch
Returns the current epoch
pub fn get_execution_cost_unit_limit() -> u32
pub fn get_execution_cost_unit_price() -> Decimal
pub fn get_finalization_cost_unit_limit() -> u32
pub fn get_finalization_cost_unit_price() -> Decimal
pub fn get_usd_price() -> Decimal
pub fn get_tip_percentage() -> u32
pub fn get_fee_balance() -> Decimal
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<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 moresource§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