Struct cw_multi_test::BankKeeper
source · pub struct BankKeeper {}
Expand description
A structure representing a default bank keeper.
Manages financial interactions in CosmWasm tests, such as simulating token transactions and account balances. This is particularly important for contracts that deal with financial operations in the Cosmos ecosystem.
Implementations§
source§impl BankKeeper
impl BankKeeper
sourcepub fn init_balance(
&self,
storage: &mut dyn Storage,
account: &Addr,
amount: Vec<Coin>
) -> AnyResult<()>
pub fn init_balance( &self, storage: &mut dyn Storage, account: &Addr, amount: Vec<Coin> ) -> AnyResult<()>
Administration function for adjusting bank accounts in genesis.
sourcepub fn set_denom_metadata(
&self,
bank_storage: &mut dyn Storage,
denom: String,
metadata: DenomMetadata
) -> AnyResult<()>
pub fn set_denom_metadata( &self, bank_storage: &mut dyn Storage, denom: String, metadata: DenomMetadata ) -> AnyResult<()>
Administration function for adjusting denomination metadata.
Trait Implementations§
source§impl Default for BankKeeper
impl Default for BankKeeper
source§fn default() -> BankKeeper
fn default() -> BankKeeper
Returns the “default value” for a type. Read more
source§impl Module for BankKeeper
impl Module for BankKeeper
source§fn execute<ExecC, QueryC>(
&self,
_api: &dyn Api,
storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
sender: Addr,
msg: BankMsg
) -> AnyResult<AppResponse>
fn execute<ExecC, QueryC>( &self, _api: &dyn Api, storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, sender: Addr, msg: BankMsg ) -> AnyResult<AppResponse>
Runs any ExecT message,
which can be called by any external actor or smart contract.
source§fn query(
&self,
api: &dyn Api,
storage: &dyn Storage,
_querier: &dyn Querier,
_block: &BlockInfo,
request: BankQuery
) -> AnyResult<Binary>
fn query( &self, api: &dyn Api, storage: &dyn Storage, _querier: &dyn Querier, _block: &BlockInfo, request: BankQuery ) -> AnyResult<Binary>
Runs any QueryT message,
which can be called by any external actor or smart contract.
source§fn sudo<ExecC, QueryC>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
msg: BankSudo
) -> AnyResult<AppResponse>
fn sudo<ExecC, QueryC>( &self, api: &dyn Api, storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo, msg: BankSudo ) -> AnyResult<AppResponse>
Runs privileged actions, like minting tokens, or governance proposals.
This allows modules to have full access to these privileged actions,
that cannot be triggered by smart contracts. Read more
impl Bank for BankKeeper
Auto Trait Implementations§
impl Freeze for BankKeeper
impl RefUnwindSafe for BankKeeper
impl Send for BankKeeper
impl Sync for BankKeeper
impl Unpin for BankKeeper
impl UnwindSafe for BankKeeper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more