pub struct ContractInstances<P> {
pub token: HoprTokenInstance<P>,
pub channels: HoprChannelsInstance<P>,
pub announcements: HoprAnnouncementsInstance<P>,
pub network_registry: HoprNetworkRegistryInstance<P>,
pub network_registry_proxy: NetworkRegistryProxy<P>,
pub safe_registry: HoprNodeSafeRegistryInstance<P>,
pub price_oracle: HoprTicketPriceOracleInstance<P>,
pub win_prob_oracle: HoprWinningProbabilityOracleInstance<P>,
pub stake_factory: HoprNodeStakeFactoryInstance<P>,
pub module_implementation: HoprNodeManagementModuleInstance<P>,
}
Expand description
Holds instances to contracts.
Fields§
§token: HoprTokenInstance<P>
§channels: HoprChannelsInstance<P>
§announcements: HoprAnnouncementsInstance<P>
§network_registry: HoprNetworkRegistryInstance<P>
§network_registry_proxy: NetworkRegistryProxy<P>
§safe_registry: HoprNodeSafeRegistryInstance<P>
§price_oracle: HoprTicketPriceOracleInstance<P>
§win_prob_oracle: HoprWinningProbabilityOracleInstance<P>
§stake_factory: HoprNodeStakeFactoryInstance<P>
§module_implementation: HoprNodeManagementModuleInstance<P>
Implementations§
Source§impl<P> ContractInstances<P>where
P: Provider + Clone,
impl<P> ContractInstances<P>where
P: Provider + Clone,
pub fn new( contract_addresses: &ContractAddresses, provider: P, use_dummy_nr: bool, ) -> Self
Sourcepub async fn deploy_for_testing(
provider: P,
deployer: &ChainKeypair,
) -> ContractResult<Self>
pub async fn deploy_for_testing( provider: P, deployer: &ChainKeypair, ) -> ContractResult<Self>
Deploys testing environment (with dummy network registry proxy) via the given provider.
Sourcepub async fn deploy_for_testing_with_staking_proxy(
provider: P,
deployer: &ChainKeypair,
) -> ContractResult<Self>
pub async fn deploy_for_testing_with_staking_proxy( provider: P, deployer: &ChainKeypair, ) -> ContractResult<Self>
Deploys testing environment (with dummy network registry proxy) via the given provider.
Trait Implementations§
Source§impl<P: Debug> Debug for ContractInstances<P>
impl<P: Debug> Debug for ContractInstances<P>
Source§impl<P> From<&ContractInstances<P>> for ContractAddresseswhere
P: Provider + Clone,
impl<P> From<&ContractInstances<P>> for ContractAddresseswhere
P: Provider + Clone,
Source§fn from(instances: &ContractInstances<P>) -> Self
fn from(instances: &ContractInstances<P>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for ContractInstances<P>where
P: Freeze,
impl<P> RefUnwindSafe for ContractInstances<P>where
P: RefUnwindSafe,
impl<P> Send for ContractInstances<P>where
P: Send,
impl<P> Sync for ContractInstances<P>where
P: Sync,
impl<P> Unpin for ContractInstances<P>where
P: Unpin,
impl<P> UnwindSafe for ContractInstances<P>where
P: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more