1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use crate::{
account::AccountHash,
system::{mint::Error, CallStackElement},
Key, Phase, URef, U512,
};
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;
}