pub struct OsmosisTestApp { /* private fields */ }

Implementations§

source§

impl OsmosisTestApp

source

pub fn new() -> Self

source

pub fn get_block_timestamp(&self) -> Timestamp

Get the current block time as a timestamp

source

pub fn get_block_time_nanos(&self) -> i64

Get the current block time in nanoseconds

source

pub fn get_block_time_seconds(&self) -> i64

Get the current block time in seconds

source

pub fn get_block_height(&self) -> i64

Get the current block height

source

pub fn get_first_validator_address(&self) -> RunnerResult<String>

Get the first validator address

source

pub fn get_first_validator_signing_account( &self ) -> RunnerResult<SigningAccount>

Get the first validator signing account

source

pub fn increase_time(&self, seconds: u64)

Increase the time of the blockchain by the given number of seconds.

source

pub fn init_account(&self, coins: &[Coin]) -> RunnerResult<SigningAccount>

Initialize account with initial balance of any coins. This function mints new coins and send to newly created account

source

pub fn init_accounts( &self, coins: &[Coin], count: u64 ) -> RunnerResult<Vec<SigningAccount>>

Convinience function to create multiple accounts with the same Initial coins balance

source

pub fn simulate_tx<I>( &self, msgs: I, signer: &SigningAccount ) -> RunnerResult<GasInfo>where I: IntoIterator<Item = Any>,

Simulate transaction execution and return gas info

source

pub fn set_param_set( &self, subspace: &str, pset: impl Into<Any> ) -> RunnerResult<()>

Set parameter set for a given subspace.

source

pub fn get_param_set<P: Message + Default>( &self, subspace: &str, type_url: &str ) -> RunnerResult<P>

Get parameter set for a given subspace.

Trait Implementations§

source§

impl Debug for OsmosisTestApp

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for OsmosisTestApp

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl PartialEq<OsmosisTestApp> for OsmosisTestApp

source§

fn eq(&self, other: &OsmosisTestApp) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a> Runner<'a> for OsmosisTestApp

source§

fn execute_multiple<M, R>( &self, msgs: &[(M, &str)], signer: &SigningAccount ) -> RunnerExecuteResult<R>where M: Message, R: Message + Default,

source§

fn query<Q, R>(&self, path: &str, q: &Q) -> RunnerResult<R>where Q: Message, R: Message + Default,

source§

fn execute_multiple_raw<R>( &self, msgs: Vec<Any>, signer: &SigningAccount ) -> RunnerExecuteResult<R>where R: Message + Default,

source§

fn execute<M, R>( &self, msg: M, type_url: &str, signer: &SigningAccount ) -> Result<ExecuteResponse<R>, RunnerError>where M: Message, R: Message + Default,

source§

fn execute_cosmos_msgs<S>( &self, msgs: &[CosmosMsg<Empty>], signer: &SigningAccount ) -> Result<ExecuteResponse<S>, RunnerError>where S: Message + Default,

source§

impl StructuralPartialEq for OsmosisTestApp

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more