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