pub struct MarsMockQuerier { /* private fields */ }
Implementations§
Source§impl MarsMockQuerier
impl MarsMockQuerier
pub fn new(base: MockQuerier<TerraQueryWrapper>) -> Self
Sourcepub fn set_contract_balances(&mut self, contract_balances: &[Coin])
pub fn set_contract_balances(&mut self, contract_balances: &[Coin])
Set new balances for contract address
Sourcepub fn set_native_exchange_rates(
&mut self,
base_denom: String,
exchange_rates: &[(String, Decimal)],
)
pub fn set_native_exchange_rates( &mut self, base_denom: String, exchange_rates: &[(String, Decimal)], )
Set mock querier exchange rates query results for a given denom
Sourcepub fn set_native_tax(
&mut self,
tax_rate: Decimal,
tax_caps: &[(String, Uint128)],
)
pub fn set_native_tax( &mut self, tax_rate: Decimal, tax_caps: &[(String, Uint128)], )
Set mock querier for tax data
Sourcepub fn set_cw20_balances(
&mut self,
cw20_address: Addr,
balances: &[(Addr, Uint128)],
)
pub fn set_cw20_balances( &mut self, cw20_address: Addr, balances: &[(Addr, Uint128)], )
Set mock querier balances results for a given cw20 token
Sourcepub fn set_cw20_total_supply(
&mut self,
cw20_address: Addr,
total_supply: Uint128,
)
pub fn set_cw20_total_supply( &mut self, cw20_address: Addr, total_supply: Uint128, )
Set mock querier so that it returns a specific total supply on the token info query for a given cw20 token (note this will override existing token info with default values for the rest of the fields)
pub fn set_cw20_symbol(&mut self, cw20_address: Addr, symbol: String)
pub fn set_oracle_price(&mut self, asset_reference: Vec<u8>, price: Decimal)
pub fn set_staking_xmars_per_mars(&mut self, xmars_per_mars: Decimal)
pub fn set_staking_mars_per_xmars(&mut self, mars_per_xmars: Decimal)
pub fn set_xmars_address(&mut self, address: Addr)
pub fn set_xmars_balance_at( &mut self, address: Addr, block: u64, balance: Uint128, )
pub fn set_xmars_total_supply_at(&mut self, block: u64, balance: Uint128)
pub fn set_vesting_address(&mut self, address: Addr)
pub fn set_vesting_voting_power_at( &mut self, address: Addr, block: u64, voting_power: Uint128, )
pub fn set_vesting_total_voting_power_at( &mut self, block: u64, total_voting_power: Uint128, )
pub fn set_astroport_pair(&mut self, pair_info: PairInfo)
pub fn set_astroport_pair_cumulative_prices( &mut self, contract_addr: String, cumulative_prices: CumulativePricesResponse, )
pub fn set_astroport_pair_simulation( &mut self, contract_addr: String, simulation: SimulationResponse, )
pub fn set_incentives_address(&mut self, address: Addr)
pub fn set_unclaimed_rewards( &mut self, user_address: String, unclaimed_rewards: Uint128, )
pub fn handle_query( &self, request: &QueryRequest<TerraQueryWrapper>, ) -> QuerierResult
Trait Implementations§
Source§impl Querier for MarsMockQuerier
impl Querier for MarsMockQuerier
Source§fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
fn raw_query(&self, bin_request: &[u8]) -> QuerierResult
raw_query is all that must be implemented for the Querier.
This allows us to pass through binary queries from one level to another without
knowing the custom format, or we can decode it, with the knowledge of the allowed
types. People using the querier probably want one of the simpler auto-generated
helper methods
Auto Trait Implementations§
impl Freeze for MarsMockQuerier
impl !RefUnwindSafe for MarsMockQuerier
impl !Send for MarsMockQuerier
impl !Sync for MarsMockQuerier
impl Unpin for MarsMockQuerier
impl !UnwindSafe for MarsMockQuerier
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