use crate::system::error::ProviderError;
use casper_types::{
account::AccountHash, system::Caller, Key, Phase, RuntimeFootprint, SystemHashRegistry, URef,
U512,
};
pub trait RuntimeProvider {
fn get_caller(&self) -> AccountHash;
fn get_immediate_caller(&self) -> Option<Caller>;
fn is_called_from_standard_payment(&self) -> bool;
fn get_system_entity_registry(&self) -> Result<SystemHashRegistry, ProviderError>;
fn runtime_footprint_by_account_hash(
&mut self,
account_hash: AccountHash,
) -> Result<Option<RuntimeFootprint>, ProviderError>;
fn get_phase(&self) -> Phase;
fn get_key(&self, name: &str) -> Option<Key>;
fn get_approved_spending_limit(&self) -> U512;
fn sub_approved_spending_limit(&mut self, amount: U512);
fn get_main_purse(&self) -> Option<URef>;
fn is_administrator(&self, account_hash: &AccountHash) -> bool;
fn allow_unrestricted_transfers(&self) -> bool;
fn is_valid_uref(&self, uref: &URef) -> bool;
}