pub struct IOperatorStatusRegistryInstance<P, N = Ethereum> { /* private fields */ }Expand description
A IOperatorStatusRegistry instance.
Contains type-safe methods for interacting with an on-chain instance of the
IOperatorStatusRegistry 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, N> IOperatorStatusRegistryInstance<P, N>
Instantiation and getters/setters.
impl<P, N> IOperatorStatusRegistryInstance<P, N>
Instantiation and getters/setters.
Sourcepub const fn new(
address: Address,
__provider: P,
) -> IOperatorStatusRegistryInstance<P, N>
pub const fn new( address: Address, __provider: P, ) -> IOperatorStatusRegistryInstance<P, N>
Creates a new wrapper around an on-chain IOperatorStatusRegistry contract instance.
See the wrapper’s documentation for more details.
Sourcepub async fn deploy(
__provider: P,
) -> Result<IOperatorStatusRegistryInstance<P, N>, Error>
pub async fn deploy( __provider: P, ) -> Result<IOperatorStatusRegistryInstance<P, N>, Error>
Deploys this contract using the given provider and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use deploy_builder instead.
Sourcepub fn deploy_builder(__provider: P) -> CallBuilder<P, (), N>
pub fn deploy_builder(__provider: P) -> CallBuilder<P, (), N>
Creates a RawCallBuilder for deploying this contract using the given provider
and constructor arguments, if any.
This is a simple wrapper around creating a RawCallBuilder with the data set to
the bytecode concatenated with the constructor’s ABI-encoded arguments.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Sourcepub fn at(self, address: Address) -> IOperatorStatusRegistryInstance<P, N>
pub fn at(self, address: Address) -> IOperatorStatusRegistryInstance<P, N>
Sets the address and returns self.
Source§impl<P, N> IOperatorStatusRegistryInstance<&P, N>where
P: Clone,
impl<P, N> IOperatorStatusRegistryInstance<&P, N>where
P: Clone,
Sourcepub fn with_cloned_provider(self) -> IOperatorStatusRegistryInstance<P, N>
pub fn with_cloned_provider(self) -> IOperatorStatusRegistryInstance<P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<P, N> IOperatorStatusRegistryInstance<P, N>
Function calls.
impl<P, N> IOperatorStatusRegistryInstance<P, N>
Function calls.
Sourcepub fn call_builder<C>(&self, call: &C) -> CallBuilder<&P, PhantomData<C>, N>where
C: SolCall,
pub fn call_builder<C>(&self, call: &C) -> CallBuilder<&P, PhantomData<C>, N>where
C: SolCall,
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 addMetricDefinition(
&self,
serviceId: u64,
name: String,
minValue: Uint<256, 4>,
maxValue: Uint<256, 4>,
required: bool,
) -> CallBuilder<&P, PhantomData<addMetricDefinitionCall>, N>
pub fn addMetricDefinition( &self, serviceId: u64, name: String, minValue: Uint<256, 4>, maxValue: Uint<256, 4>, required: bool, ) -> CallBuilder<&P, PhantomData<addMetricDefinitionCall>, N>
Creates a new call builder for the [addMetricDefinition] function.
Sourcepub fn configureHeartbeat(
&self,
serviceId: u64,
interval: u64,
maxMissed: u8,
) -> CallBuilder<&P, PhantomData<configureHeartbeatCall>, N>
pub fn configureHeartbeat( &self, serviceId: u64, interval: u64, maxMissed: u8, ) -> CallBuilder<&P, PhantomData<configureHeartbeatCall>, N>
Creates a new call builder for the [configureHeartbeat] function.
Sourcepub fn deregisterOperator(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<deregisterOperatorCall>, N>
pub fn deregisterOperator( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<deregisterOperatorCall>, N>
Creates a new call builder for the [deregisterOperator] function.
Sourcepub fn enableCustomMetrics(
&self,
serviceId: u64,
enabled: bool,
) -> CallBuilder<&P, PhantomData<enableCustomMetricsCall>, N>
pub fn enableCustomMetrics( &self, serviceId: u64, enabled: bool, ) -> CallBuilder<&P, PhantomData<enableCustomMetricsCall>, N>
Creates a new call builder for the [enableCustomMetrics] function.
Sourcepub fn getHeartbeatConfig(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<getHeartbeatConfigCall>, N>
pub fn getHeartbeatConfig( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getHeartbeatConfigCall>, N>
Creates a new call builder for the [getHeartbeatConfig] function.
Sourcepub fn getLastHeartbeat(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<getLastHeartbeatCall>, N>
pub fn getLastHeartbeat( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<getLastHeartbeatCall>, N>
Creates a new call builder for the [getLastHeartbeat] function.
Sourcepub fn getMetricDefinitions(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<getMetricDefinitionsCall>, N>
pub fn getMetricDefinitions( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getMetricDefinitionsCall>, N>
Creates a new call builder for the [getMetricDefinitions] function.
Sourcepub fn getMetricValue(
&self,
serviceId: u64,
operator: Address,
metricName: String,
) -> CallBuilder<&P, PhantomData<getMetricValueCall>, N>
pub fn getMetricValue( &self, serviceId: u64, operator: Address, metricName: String, ) -> CallBuilder<&P, PhantomData<getMetricValueCall>, N>
Creates a new call builder for the [getMetricValue] function.
Sourcepub fn getOnlineOperators(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<getOnlineOperatorsCall>, N>
pub fn getOnlineOperators( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getOnlineOperatorsCall>, N>
Creates a new call builder for the [getOnlineOperators] function.
Sourcepub fn getOperatorState(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<getOperatorStateCall>, N>
pub fn getOperatorState( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<getOperatorStateCall>, N>
Creates a new call builder for the [getOperatorState] function.
Sourcepub fn getOperatorStatus(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<getOperatorStatusCall>, N>
pub fn getOperatorStatus( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<getOperatorStatusCall>, N>
Creates a new call builder for the [getOperatorStatus] function.
Sourcepub fn getSlashableOperators(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<getSlashableOperatorsCall>, N>
pub fn getSlashableOperators( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<getSlashableOperatorsCall>, N>
Creates a new call builder for the [getSlashableOperators] function.
Sourcepub fn getSlashableOperatorsPaginated(
&self,
serviceId: u64,
offset: Uint<256, 4>,
limit: Uint<256, 4>,
) -> CallBuilder<&P, PhantomData<getSlashableOperatorsPaginatedCall>, N>
pub fn getSlashableOperatorsPaginated( &self, serviceId: u64, offset: Uint<256, 4>, limit: Uint<256, 4>, ) -> CallBuilder<&P, PhantomData<getSlashableOperatorsPaginatedCall>, N>
Creates a new call builder for the [getSlashableOperatorsPaginated] function.
Sourcepub fn goOffline(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<goOfflineCall>, N>
pub fn goOffline( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<goOfflineCall>, N>
Creates a new call builder for the [goOffline] function.
Sourcepub fn goOnline(
&self,
serviceId: u64,
) -> CallBuilder<&P, PhantomData<goOnlineCall>, N>
pub fn goOnline( &self, serviceId: u64, ) -> CallBuilder<&P, PhantomData<goOnlineCall>, N>
Creates a new call builder for the [goOnline] function.
Sourcepub fn isHeartbeatCurrent(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<isHeartbeatCurrentCall>, N>
pub fn isHeartbeatCurrent( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<isHeartbeatCurrentCall>, N>
Creates a new call builder for the [isHeartbeatCurrent] function.
Sourcepub fn isOnline(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<isOnlineCall>, N>
pub fn isOnline( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<isOnlineCall>, N>
Creates a new call builder for the [isOnline] function.
Sourcepub fn isRegisteredOperator(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<isRegisteredOperatorCall>, N>
pub fn isRegisteredOperator( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<isRegisteredOperatorCall>, N>
Creates a new call builder for the [isRegisteredOperator] function.
Sourcepub fn registerOperator(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<registerOperatorCall>, N>
pub fn registerOperator( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<registerOperatorCall>, N>
Creates a new call builder for the [registerOperator] function.
Sourcepub fn registerServiceOwner(
&self,
serviceId: u64,
owner: Address,
) -> CallBuilder<&P, PhantomData<registerServiceOwnerCall>, N>
pub fn registerServiceOwner( &self, serviceId: u64, owner: Address, ) -> CallBuilder<&P, PhantomData<registerServiceOwnerCall>, N>
Creates a new call builder for the [registerServiceOwner] function.
Sourcepub fn removeInactiveOperator(
&self,
serviceId: u64,
operator: Address,
) -> CallBuilder<&P, PhantomData<removeInactiveOperatorCall>, N>
pub fn removeInactiveOperator( &self, serviceId: u64, operator: Address, ) -> CallBuilder<&P, PhantomData<removeInactiveOperatorCall>, N>
Creates a new call builder for the [removeInactiveOperator] function.
Sourcepub fn reportForSlashing(
&self,
serviceId: u64,
operator: Address,
reason: String,
) -> CallBuilder<&P, PhantomData<reportForSlashingCall>, N>
pub fn reportForSlashing( &self, serviceId: u64, operator: Address, reason: String, ) -> CallBuilder<&P, PhantomData<reportForSlashingCall>, N>
Creates a new call builder for the [reportForSlashing] function.
Sourcepub fn setMetricDefinitions(
&self,
serviceId: u64,
definitions: Vec<<MetricDefinition as SolType>::RustType>,
) -> CallBuilder<&P, PhantomData<setMetricDefinitionsCall>, N>
pub fn setMetricDefinitions( &self, serviceId: u64, definitions: Vec<<MetricDefinition as SolType>::RustType>, ) -> CallBuilder<&P, PhantomData<setMetricDefinitionsCall>, N>
Creates a new call builder for the [setMetricDefinitions] function.
Sourcepub fn submitHeartbeat(
&self,
serviceId: u64,
blueprintId: u64,
statusCode: u8,
metrics: Bytes,
signature: Bytes,
) -> CallBuilder<&P, PhantomData<submitHeartbeatCall>, N>
pub fn submitHeartbeat( &self, serviceId: u64, blueprintId: u64, statusCode: u8, metrics: Bytes, signature: Bytes, ) -> CallBuilder<&P, PhantomData<submitHeartbeatCall>, N>
Creates a new call builder for the [submitHeartbeat] function.
Sourcepub fn submitHeartbeatDirect(
&self,
serviceId: u64,
blueprintId: u64,
statusCode: u8,
metrics: Bytes,
) -> CallBuilder<&P, PhantomData<submitHeartbeatDirectCall>, N>
pub fn submitHeartbeatDirect( &self, serviceId: u64, blueprintId: u64, statusCode: u8, metrics: Bytes, ) -> CallBuilder<&P, PhantomData<submitHeartbeatDirectCall>, N>
Creates a new call builder for the [submitHeartbeatDirect] function.
Source§impl<P, N> IOperatorStatusRegistryInstance<P, N>
Event filters.
impl<P, N> IOperatorStatusRegistryInstance<P, N>
Event filters.
Sourcepub fn event_filter<E>(&self) -> Event<&P, E, N>where
E: SolEvent,
pub fn event_filter<E>(&self) -> Event<&P, E, N>where
E: SolEvent,
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.
Trait Implementations§
Source§impl<P, N> Clone for IOperatorStatusRegistryInstance<P, N>
impl<P, N> Clone for IOperatorStatusRegistryInstance<P, N>
Source§fn clone(&self) -> IOperatorStatusRegistryInstance<P, N>
fn clone(&self) -> IOperatorStatusRegistryInstance<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 IOperatorStatusRegistryInstance<P, N>where
P: Freeze,
impl<P, N> RefUnwindSafe for IOperatorStatusRegistryInstance<P, N>where
P: RefUnwindSafe,
N: RefUnwindSafe,
impl<P, N> Send for IOperatorStatusRegistryInstance<P, N>
impl<P, N> Sync for IOperatorStatusRegistryInstance<P, N>
impl<P, N> Unpin for IOperatorStatusRegistryInstance<P, N>
impl<P, N> UnsafeUnpin for IOperatorStatusRegistryInstance<P, N>where
P: UnsafeUnpin,
impl<P, N> UnwindSafe for IOperatorStatusRegistryInstance<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