pub struct PythResolverInstance<P, N = Ethereum> { /* private fields */ }Expand description
A PythResolver instance.
Contains type-safe methods for interacting with an on-chain instance of the
PythResolver contract located at a given address, using a given
provider P.
If the contract bytecode is available (see the sol!
documentation on how to provide it), the deploy and deploy_builder methods can
be used to deploy a new instance of the contract.
See the module-level documentation for all the available methods.
Implementations§
Source§impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Instantiation and getters/setters.
impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Instantiation and getters/setters.
Sourcepub const fn new(address: Address, __provider: P) -> Self
pub const fn new(address: Address, __provider: P) -> Self
Creates a new wrapper around an on-chain PythResolver contract instance.
See the wrapper’s documentation for more details.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Source§impl<P: Clone, N> PythResolverInstance<&P, N>
impl<P: Clone, N> PythResolverInstance<&P, N>
Sourcepub fn with_cloned_provider(self) -> PythResolverInstance<P, N>
pub fn with_cloned_provider(self) -> PythResolverInstance<P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Function calls.
impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Function calls.
Sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<&P, C, N>
Creates a new call builder using this contract instance’s provider and address.
Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.
Sourcepub fn CANCEL_DEADLINE(&self) -> SolCallBuilder<&P, CANCEL_DEADLINECall, N>
pub fn CANCEL_DEADLINE(&self) -> SolCallBuilder<&P, CANCEL_DEADLINECall, N>
Creates a new call builder for the [CANCEL_DEADLINE] function.
Sourcepub fn FALLBACK_WINDOW(&self) -> SolCallBuilder<&P, FALLBACK_WINDOWCall, N>
pub fn FALLBACK_WINDOW(&self) -> SolCallBuilder<&P, FALLBACK_WINDOWCall, N>
Creates a new call builder for the [FALLBACK_WINDOW] function.
Sourcepub fn FINALITY_PERIOD(&self) -> SolCallBuilder<&P, FINALITY_PERIODCall, N>
pub fn FINALITY_PERIOD(&self) -> SolCallBuilder<&P, FINALITY_PERIODCall, N>
Creates a new call builder for the [FINALITY_PERIOD] function.
Sourcepub fn MAX_FALLBACK_WINDOWS(
&self,
) -> SolCallBuilder<&P, MAX_FALLBACK_WINDOWSCall, N>
pub fn MAX_FALLBACK_WINDOWS( &self, ) -> SolCallBuilder<&P, MAX_FALLBACK_WINDOWSCall, N>
Creates a new call builder for the [MAX_FALLBACK_WINDOWS] function.
Sourcepub fn acceptAdmin(&self) -> SolCallBuilder<&P, acceptAdminCall, N>
pub fn acceptAdmin(&self) -> SolCallBuilder<&P, acceptAdminCall, N>
Creates a new call builder for the [acceptAdmin] function.
Sourcepub fn admin(&self) -> SolCallBuilder<&P, adminCall, N>
pub fn admin(&self) -> SolCallBuilder<&P, adminCall, N>
Creates a new call builder for the [admin] function.
Sourcepub fn confThresholdBps(&self) -> SolCallBuilder<&P, confThresholdBpsCall, N>
pub fn confThresholdBps(&self) -> SolCallBuilder<&P, confThresholdBpsCall, N>
Creates a new call builder for the [confThresholdBps] function.
Sourcepub fn factory(&self) -> SolCallBuilder<&P, factoryCall, N>
pub fn factory(&self) -> SolCallBuilder<&P, factoryCall, N>
Creates a new call builder for the [factory] function.
Sourcepub fn finalizeResolution(
&self,
factoryMarketId: U256,
) -> SolCallBuilder<&P, finalizeResolutionCall, N>
pub fn finalizeResolution( &self, factoryMarketId: U256, ) -> SolCallBuilder<&P, finalizeResolutionCall, N>
Creates a new call builder for the [finalizeResolution] function.
Sourcepub fn getPythUpdateFee(
&self,
priceUpdateData: Vec<Bytes>,
) -> SolCallBuilder<&P, getPythUpdateFeeCall, N>
pub fn getPythUpdateFee( &self, priceUpdateData: Vec<Bytes>, ) -> SolCallBuilder<&P, getPythUpdateFeeCall, N>
Creates a new call builder for the [getPythUpdateFee] function.
Sourcepub fn pendingAdmin(&self) -> SolCallBuilder<&P, pendingAdminCall, N>
pub fn pendingAdmin(&self) -> SolCallBuilder<&P, pendingAdminCall, N>
Creates a new call builder for the [pendingAdmin] function.
Sourcepub fn pendingResolutions(
&self,
_0: U256,
) -> SolCallBuilder<&P, pendingResolutionsCall, N>
pub fn pendingResolutions( &self, _0: U256, ) -> SolCallBuilder<&P, pendingResolutionsCall, N>
Creates a new call builder for the [pendingResolutions] function.
Sourcepub fn pyth(&self) -> SolCallBuilder<&P, pythCall, N>
pub fn pyth(&self) -> SolCallBuilder<&P, pythCall, N>
Creates a new call builder for the [pyth] function.
Sourcepub fn resolveMarket(
&self,
factoryMarketId: U256,
priceUpdateData: Vec<Bytes>,
) -> SolCallBuilder<&P, resolveMarketCall, N>
pub fn resolveMarket( &self, factoryMarketId: U256, priceUpdateData: Vec<Bytes>, ) -> SolCallBuilder<&P, resolveMarketCall, N>
Creates a new call builder for the [resolveMarket] function.
Sourcepub fn setConfThreshold(
&self,
newBps: U256,
) -> SolCallBuilder<&P, setConfThresholdCall, N>
pub fn setConfThreshold( &self, newBps: U256, ) -> SolCallBuilder<&P, setConfThresholdCall, N>
Creates a new call builder for the [setConfThreshold] function.
Sourcepub fn setPendingAdmin(
&self,
_pendingAdmin: Address,
) -> SolCallBuilder<&P, setPendingAdminCall, N>
pub fn setPendingAdmin( &self, _pendingAdmin: Address, ) -> SolCallBuilder<&P, setPendingAdminCall, N>
Creates a new call builder for the [setPendingAdmin] function.
Source§impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Event filters.
impl<P: Provider<N>, N: Network> PythResolverInstance<P, N>
Event filters.
Sourcepub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<&P, E, N>
Creates a new event filter using this contract instance’s provider and address.
Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.
Sourcepub fn ResolutionChallenged_filter(&self) -> Event<&P, ResolutionChallenged, N>
pub fn ResolutionChallenged_filter(&self) -> Event<&P, ResolutionChallenged, N>
Creates a new event filter for the ResolutionChallenged event.
Sourcepub fn ResolutionFinalized_filter(&self) -> Event<&P, ResolutionFinalized, N>
pub fn ResolutionFinalized_filter(&self) -> Event<&P, ResolutionFinalized, N>
Creates a new event filter for the ResolutionFinalized event.
Sourcepub fn ResolutionSubmitted_filter(&self) -> Event<&P, ResolutionSubmitted, N>
pub fn ResolutionSubmitted_filter(&self) -> Event<&P, ResolutionSubmitted, N>
Creates a new event filter for the ResolutionSubmitted event.
Trait Implementations§
Source§impl<P: Clone, N: Clone> Clone for PythResolverInstance<P, N>
impl<P: Clone, N: Clone> Clone for PythResolverInstance<P, N>
Source§fn clone(&self) -> PythResolverInstance<P, N>
fn clone(&self) -> PythResolverInstance<P, N>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<P, N> Freeze for PythResolverInstance<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for PythResolverInstance<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for PythResolverInstance<P, N>
impl<P, N> Sync for PythResolverInstance<P, N>
impl<P, N> Unpin for PythResolverInstance<P, N>
impl<P, N> UnsafeUnpin for PythResolverInstance<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for PythResolverInstance<P, N>where
P: UnwindSafe,
N: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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