logo
pub trait RuntimeProvider {
    fn get_caller(&self) -> AccountHash;
    fn get_immediate_caller(&self) -> Option<&CallStackElement>;
    fn get_phase(&self) -> Phase;
    fn put_key(&mut self, name: &str, key: Key) -> Result<(), Error>;
    fn get_key(&self, name: &str) -> Option<Key>;
    fn get_approved_spending_limit(&self) -> U512;
    fn sub_approved_spending_limit(&mut self, transferred: U512);
    fn get_main_purse(&self) -> URef;
}
Expand description

Provider of runtime host functionality.

Required methods

This method should return the caller of the current context.

This method should return the immediate caller of the current context.

Gets execution phase

This method should handle storing given Key under name.

This method should handle obtaining a given named Key under a name.

Returns approved CSPR spending limit.

Signal to host that transferred amount of tokens has been transferred.

Returns main purse of the sender account.

Implementors