rhaki_cw_multi_test/gov.rs
1use crate::{AcceptingModule, FailingModule, Module};
2use cosmwasm_std::{Empty, GovMsg};
3/// Handles governance-related operations within the test environment.
4/// This trait is essential for testing contracts that interact with governance mechanisms,
5/// simulating proposals, voting, and other governance activities.
6pub trait Gov: Module<ExecT = GovMsg, QueryT = Empty, SudoT = Empty> {}
7/// A type alias for a module that accepts governance-related interactions.
8/// It's used in scenarios where you need to test how your contract interacts
9/// with governance processes and messages.
10pub type GovAcceptingModule = AcceptingModule<GovMsg, Empty, Empty>;
11
12impl Gov for GovAcceptingModule {}
13/// This type alias represents a module designed to fail in response to governance operations.
14/// It's useful for testing how contracts behave when governance actions do not proceed as expected.
15pub type GovFailingModule = FailingModule<GovMsg, Empty, Empty>;
16
17impl Gov for GovFailingModule {}