Skip to main content

IValidatorConfigV2Instance

Struct IValidatorConfigV2Instance 

Source
pub struct IValidatorConfigV2Instance<P, N = Ethereum> {
    address: Address,
    provider: P,
    _network: PhantomData<N>,
}
Expand description

A IValidatorConfigV2 instance.

Contains type-safe methods for interacting with an on-chain instance of the IValidatorConfigV2 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.

Fields§

§address: Address§provider: P§_network: PhantomData<N>

Implementations§

Source§

impl<P: Provider<N>, N: Network> IValidatorConfigV2Instance<P, N>

Instantiation and getters/setters.

Source

pub const fn new(address: Address, __provider: P) -> Self

Creates a new wrapper around an on-chain IValidatorConfigV2 contract instance.

See the wrapper’s documentation for more details.

Source

pub const fn address(&self) -> &Address

Returns a reference to the address.

Source

pub fn set_address(&mut self, address: Address)

Sets the address.

Source

pub fn at(self, address: Address) -> Self

Sets the address and returns self.

Source

pub const fn provider(&self) -> &P

Returns a reference to the provider.

Source§

impl<P: Clone, N> IValidatorConfigV2Instance<&P, N>

Source

pub fn with_cloned_provider(self) -> IValidatorConfigV2Instance<P, N>

Clones the provider and returns a new instance with the cloned provider.

Source§

impl<P: Provider<N>, N: Network> IValidatorConfigV2Instance<P, N>

Function calls.

Source

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.

Source

pub fn getActiveValidators( &self, ) -> SolCallBuilder<&P, getActiveValidatorsCall, N>

Creates a new call builder for the [getActiveValidators] function.

Source

pub fn getInitializedAtHeight( &self, ) -> SolCallBuilder<&P, getInitializedAtHeightCall, N>

Creates a new call builder for the [getInitializedAtHeight] function.

Source

pub fn owner(&self) -> SolCallBuilder<&P, ownerCall, N>

Creates a new call builder for the [owner] function.

Source

pub fn validatorCount(&self) -> SolCallBuilder<&P, validatorCountCall, N>

Creates a new call builder for the [validatorCount] function.

Source

pub fn validatorByIndex( &self, index: u64, ) -> SolCallBuilder<&P, validatorByIndexCall, N>

Creates a new call builder for the [validatorByIndex] function.

Source

pub fn validatorByAddress( &self, validatorAddress: Address, ) -> SolCallBuilder<&P, validatorByAddressCall, N>

Creates a new call builder for the [validatorByAddress] function.

Source

pub fn validatorByPublicKey( &self, publicKey: FixedBytes<32>, ) -> SolCallBuilder<&P, validatorByPublicKeyCall, N>

Creates a new call builder for the [validatorByPublicKey] function.

Source

pub fn getNextNetworkIdentityRotationEpoch( &self, ) -> SolCallBuilder<&P, getNextNetworkIdentityRotationEpochCall, N>

Creates a new call builder for the [getNextNetworkIdentityRotationEpoch] function.

Source

pub fn isInitialized(&self) -> SolCallBuilder<&P, isInitializedCall, N>

Creates a new call builder for the [isInitialized] function.

Source

pub fn addValidator( &self, validatorAddress: Address, publicKey: FixedBytes<32>, ingress: String, egress: String, feeRecipient: Address, signature: Bytes, ) -> SolCallBuilder<&P, addValidatorCall, N>

Creates a new call builder for the [addValidator] function.

Source

pub fn deactivateValidator( &self, idx: u64, ) -> SolCallBuilder<&P, deactivateValidatorCall, N>

Creates a new call builder for the [deactivateValidator] function.

Source

pub fn rotateValidator( &self, idx: u64, publicKey: FixedBytes<32>, ingress: String, egress: String, signature: Bytes, ) -> SolCallBuilder<&P, rotateValidatorCall, N>

Creates a new call builder for the [rotateValidator] function.

Source

pub fn setFeeRecipient( &self, idx: u64, feeRecipient: Address, ) -> SolCallBuilder<&P, setFeeRecipientCall, N>

Creates a new call builder for the [setFeeRecipient] function.

Source

pub fn setIpAddresses( &self, idx: u64, ingress: String, egress: String, ) -> SolCallBuilder<&P, setIpAddressesCall, N>

Creates a new call builder for the [setIpAddresses] function.

Source

pub fn transferValidatorOwnership( &self, idx: u64, newAddress: Address, ) -> SolCallBuilder<&P, transferValidatorOwnershipCall, N>

Creates a new call builder for the [transferValidatorOwnership] function.

Source

pub fn transferOwnership( &self, newOwner: Address, ) -> SolCallBuilder<&P, transferOwnershipCall, N>

Creates a new call builder for the [transferOwnership] function.

Source

pub fn setNetworkIdentityRotationEpoch( &self, epoch: u64, ) -> SolCallBuilder<&P, setNetworkIdentityRotationEpochCall, N>

Creates a new call builder for the [setNetworkIdentityRotationEpoch] function.

Source

pub fn migrateValidator( &self, idx: u64, ) -> SolCallBuilder<&P, migrateValidatorCall, N>

Creates a new call builder for the [migrateValidator] function.

Source

pub fn initializeIfMigrated( &self, ) -> SolCallBuilder<&P, initializeIfMigratedCall, N>

Creates a new call builder for the [initializeIfMigrated] function.

Source§

impl<P: Provider<N>, N: Network> IValidatorConfigV2Instance<P, N>

Event filters.

Source

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.

Source

pub fn ValidatorAdded_filter(&self) -> Event<&P, ValidatorAdded, N>

Creates a new event filter for the ValidatorAdded event.

Source

pub fn ValidatorDeactivated_filter(&self) -> Event<&P, ValidatorDeactivated, N>

Creates a new event filter for the ValidatorDeactivated event.

Source

pub fn ValidatorRotated_filter(&self) -> Event<&P, ValidatorRotated, N>

Creates a new event filter for the ValidatorRotated event.

Source

pub fn FeeRecipientUpdated_filter(&self) -> Event<&P, FeeRecipientUpdated, N>

Creates a new event filter for the FeeRecipientUpdated event.

Source

pub fn IpAddressesUpdated_filter(&self) -> Event<&P, IpAddressesUpdated, N>

Creates a new event filter for the IpAddressesUpdated event.

Source

pub fn ValidatorOwnershipTransferred_filter( &self, ) -> Event<&P, ValidatorOwnershipTransferred, N>

Creates a new event filter for the ValidatorOwnershipTransferred event.

Source

pub fn OwnershipTransferred_filter(&self) -> Event<&P, OwnershipTransferred, N>

Creates a new event filter for the OwnershipTransferred event.

Source

pub fn ValidatorMigrated_filter(&self) -> Event<&P, ValidatorMigrated, N>

Creates a new event filter for the ValidatorMigrated event.

Source

pub fn NetworkIdentityRotationEpochSet_filter( &self, ) -> Event<&P, NetworkIdentityRotationEpochSet, N>

Creates a new event filter for the NetworkIdentityRotationEpochSet event.

Source

pub fn Initialized_filter(&self) -> Event<&P, Initialized, N>

Creates a new event filter for the Initialized event.

Source

pub fn SkippedValidatorMigration_filter( &self, ) -> Event<&P, SkippedValidatorMigration, N>

Creates a new event filter for the SkippedValidatorMigration event.

Trait Implementations§

Source§

impl<P: Clone, N: Clone> Clone for IValidatorConfigV2Instance<P, N>

Source§

fn clone(&self) -> IValidatorConfigV2Instance<P, N>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<P, N> Debug for IValidatorConfigV2Instance<P, N>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<P, N> Freeze for IValidatorConfigV2Instance<P, N>
where P: Freeze,

§

impl<P, N> RefUnwindSafe for IValidatorConfigV2Instance<P, N>

§

impl<P, N> Send for IValidatorConfigV2Instance<P, N>
where P: Send, N: Send,

§

impl<P, N> Sync for IValidatorConfigV2Instance<P, N>
where P: Sync, N: Sync,

§

impl<P, N> Unpin for IValidatorConfigV2Instance<P, N>
where P: Unpin, N: Unpin,

§

impl<P, N> UnsafeUnpin for IValidatorConfigV2Instance<P, N>
where P: UnsafeUnpin,

§

impl<P, N> UnwindSafe for IValidatorConfigV2Instance<P, N>
where P: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 T
where 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>
where Self: Sized,

Available on crate feature propagate-header only.
Propagate a header from the request to the response. Read more
§

fn add_extension<T>(self, value: T) -> AddExtension<Self, T>
where Self: Sized,

Available on crate feature add-extension only.
Add some shareable value to request extensions. Read more
§

fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>
where Self: Sized,

Available on crate feature map-request-body only.
Apply a transformation to the request body. Read more
§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Available on crate feature map-response-body only.
Apply a transformation to the response body. Read more
§

fn compression(self) -> Compression<Self>
where Self: Sized,

Available on crate features compression-br or compression-deflate or compression-gzip or compression-zstd only.
Compresses response bodies. Read more
§

fn decompression(self) -> Decompression<Self>
where Self: Sized,

Available on crate features decompression-br or decompression-deflate or decompression-gzip or decompression-zstd only.
Decompress response bodies. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

Available on crate feature trace only.
High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

Available on crate feature trace only.
High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Available on crate feature follow-redirect only.
Follow redirect resposes using the Standard policy. Read more
§

fn sensitive_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>
where Self: Sized,

Available on crate feature sensitive-headers only.
Mark headers as sensitive on both requests and responses. Read more
§

fn sensitive_request_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveRequestHeaders<Self>
where Self: Sized,

Available on crate feature sensitive-headers only.
Mark headers as sensitive on requests. Read more
§

fn sensitive_response_headers( self, headers: impl IntoIterator<Item = HeaderName>, ) -> SetSensitiveResponseHeaders<Self>
where Self: Sized,

Available on crate feature sensitive-headers only.
Mark headers as sensitive on responses. Read more
§

fn override_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Insert a header into the request. Read more
§

fn append_request_header<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Append a header into the request. Read more
§

fn insert_request_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetRequestHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Insert a header into the request, if the header is not already present. Read more
§

fn override_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Insert a header into the response. Read more
§

fn append_response_header<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Append a header into the response. Read more
§

fn insert_response_header_if_not_present<M>( self, header_name: HeaderName, make: M, ) -> SetResponseHeader<Self, M>
where Self: Sized,

Available on crate feature set-header only.
Insert a header into the response, if the header is not already present. Read more
§

fn set_request_id<M>( self, header_name: HeaderName, make_request_id: M, ) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Available on crate feature request-id only.
Add request id header and extension. Read more
§

fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>
where Self: Sized, M: MakeRequestId,

Available on crate feature request-id only.
Add request id header and extension, using x-request-id as the header name. Read more
§

fn propagate_request_id( self, header_name: HeaderName, ) -> PropagateRequestId<Self>
where Self: Sized,

Available on crate feature request-id only.
Propgate request ids from requests to responses. Read more
§

fn propagate_x_request_id(self) -> PropagateRequestId<Self>
where Self: Sized,

Available on crate feature request-id only.
Propgate request ids from requests to responses, using x-request-id as the header name. Read more
§

fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>
where Self: Sized,

Available on crate feature catch-panic only.
Catch panics and convert them into 500 Internal Server responses. Read more
§

fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>
where Self: Sized,

Available on crate feature limit only.
Intercept requests with over-sized payloads and convert them into 413 Payload Too Large responses. Read more
§

fn trim_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Available on crate feature normalize-path only.
Remove trailing slashes from paths. Read more
§

fn append_trailing_slash(self) -> NormalizePath<Self>
where Self: Sized,

Available on crate feature normalize-path only.
Append trailing slash to paths. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryClone for T
where T: Clone,

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> ErasedDestructor for T
where T: 'static,

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.