Struct cw_iper_test::IperApp
source · pub struct IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>where
CustomT: Module,{
pub relayer: Addr,
pub chain_id: String,
pub app: App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>,
pub channels: Rc<RefCell<Channels>>,
/* private fields */
}
Expand description
§cw-iper-test
Core Structure
This structure wraps a base App
internally,
extending its functionality. Specifically, it allows for:
- Storing a
contract
withIBC entry points
using theIperApp::store_ibc_code
function. - Retrieving information and managing incoming and outgoing
IBC packets
.
The packet management is invoked by the Ecosystem
structure, which handles the automatic
relay of IBC packets
.
The struct expose the inner App
, allowing to use the standards methods.
Fields§
§relayer: Addr
Default relayer address for packet relaying.
chain_id: String
Chain name/id of the rappresenting chain.
app: App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
Inner App
channels: Rc<RefCell<Channels>>
Stored ibc channels
Implementations§
source§impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, GovT, StargateT> IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IperIbcModule, GovT, StargateT>where
BankT: Bank + 'static,
ApiT: Api + 'static,
StorageT: Storage + 'static,
CustomT: Module + 'static,
WasmT: Wasm<CustomT::ExecT, CustomT::QueryT> + 'static,
StakingT: Staking + 'static,
DistrT: Distribution + 'static,
GovT: Gov + 'static,
CustomT::ExecT: CustomMsg + DeserializeOwned + 'static,
CustomT::QueryT: CustomQuery + DeserializeOwned + 'static,
StargateT: Stargate + 'static,
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, GovT, StargateT> IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IperIbcModule, GovT, StargateT>where
BankT: Bank + 'static,
ApiT: Api + 'static,
StorageT: Storage + 'static,
CustomT: Module + 'static,
WasmT: Wasm<CustomT::ExecT, CustomT::QueryT> + 'static,
StakingT: Staking + 'static,
DistrT: Distribution + 'static,
GovT: Gov + 'static,
CustomT::ExecT: CustomMsg + DeserializeOwned + 'static,
CustomT::QueryT: CustomQuery + DeserializeOwned + 'static,
StargateT: Stargate + 'static,
sourcepub fn store_ibc_code(
&mut self,
contract: MultiContract<CustomT::ExecT, CustomT::QueryT>
) -> u64
pub fn store_ibc_code( &mut self, contract: MultiContract<CustomT::ExecT, CustomT::QueryT> ) -> u64
Store a contract.
This function can be used to store both non ibc contracts
and ibc contracts
.
sourcepub fn get_pending_packet(&self, packet_id: u64) -> Result<IbcPacketType, Error>
pub fn get_pending_packet(&self, packet_id: u64) -> Result<IbcPacketType, Error>
Get info about a specific pending packet
.
sourcepub fn get_pending_packets(&self) -> Result<BTreeMap<u64, IbcPacketType>, Error>
pub fn get_pending_packets(&self) -> Result<BTreeMap<u64, IbcPacketType>, Error>
Get all pending packets
.
sourcepub fn some_pending_packets(&self) -> bool
pub fn some_pending_packets(&self) -> bool
Return true
if the are some pending packets
.
Auto Trait Implementations§
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> Freeze for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> !RefUnwindSafe for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> !Send for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> !Sync for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> Unpin for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> !UnwindSafe for IperApp<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request