use frame_support::{sp_runtime::DispatchError, traits::fungible::Mutate};
use super::Sandbox;
use crate::{runtime::AccountIdFor, BalanceOf, SandboxConfig};
impl<Config: SandboxConfig> Sandbox<Config>
where
Config::Runtime: pallet_balances::Config,
{
pub fn mint_into(
&mut self,
address: AccountIdFor<Config::Runtime>,
amount: BalanceOf<Config::Runtime>,
) -> Result<BalanceOf<Config::Runtime>, DispatchError> {
self.execute_with(|| {
pallet_balances::Pallet::<Config::Runtime>::mint_into(&address, amount)
})
}
pub fn free_balance(
&mut self,
address: &AccountIdFor<Config::Runtime>,
) -> BalanceOf<Config::Runtime> {
self.execute_with(|| pallet_balances::Pallet::<Config::Runtime>::free_balance(address))
}
}