Trait cw_multi_test::Staking

source ·
pub trait Staking: Module<ExecT = StakingMsg, QueryT = StakingQuery, SudoT = StakingSudo> {
    // Provided method
    fn process_queue<ExecC: CustomMsg, QueryC: CustomQuery>(
        &self,
        _api: &dyn Api,
        _storage: &mut dyn Storage,
        _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
        _block: &BlockInfo
    ) -> AnyResult<AppResponse> { ... }
}
Expand description

A trait defining a behavior of the stake keeper.

Manages staking operations, vital for testing contracts in proof-of-stake (PoS) blockchain environments. This trait simulates staking behaviors, including delegation, validator operations, and reward mechanisms.

Provided Methods§

source

fn process_queue<ExecC: CustomMsg, QueryC: CustomQuery>( &self, _api: &dyn Api, _storage: &mut dyn Storage, _router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>, _block: &BlockInfo ) -> AnyResult<AppResponse>

This is called from the end blocker (update_block / set_block) to process the staking queue. Needed because unbonding has a waiting time. If you’re implementing a dummy staking module, this can be a no-op.

Object Safety§

This trait is not object safe.

Implementors§