pub struct SlasherInstance<T, P, N = Ethereum> { /* private fields */ }
Expand description
A Slasher
instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`Slasher`](self) contract located at a given `address`, using a given
provider `P`.
If the contract bytecode is available (see the [`sol!`](alloy_sol_types::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](self) for all the available methods.
Implementations§
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, P, N>
Instantiation and getters/setters.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, 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 Slasher
contract instance.
See the [wrapper's documentation](`SlasherInstance`) for more details.
Sourcepub async fn deploy(
provider: P,
_0: Address,
_1: Address,
) -> Result<SlasherInstance<T, P, N>>
pub async fn deploy( provider: P, _0: Address, _1: Address, ) -> Result<SlasherInstance<T, P, N>>
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,
_0: Address,
_1: Address,
) -> RawCallBuilder<T, P, N>
pub fn deploy_builder( provider: P, _0: Address, _1: Address, ) -> RawCallBuilder<T, 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.
Source§impl<T, P: Clone, N> SlasherInstance<T, &P, N>
impl<T, P: Clone, N> SlasherInstance<T, &P, N>
Sourcepub fn with_cloned_provider(self) -> SlasherInstance<T, P, N>
pub fn with_cloned_provider(self) -> SlasherInstance<T, P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, P, N>
Function calls.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, P, N>
Function calls.
Sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &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 canSlash(
&self,
_0: Address,
_1: Address,
) -> SolCallBuilder<T, &P, canSlashCall, N>
pub fn canSlash( &self, _0: Address, _1: Address, ) -> SolCallBuilder<T, &P, canSlashCall, N>
Creates a new call builder for the [canSlash
] function.
Sourcepub fn canWithdraw(
&self,
_0: Address,
_1: u32,
_2: U256,
) -> SolCallBuilder<T, &P, canWithdrawCall, N>
pub fn canWithdraw( &self, _0: Address, _1: u32, _2: U256, ) -> SolCallBuilder<T, &P, canWithdrawCall, N>
Creates a new call builder for the [canWithdraw
] function.
Sourcepub fn contractCanSlashOperatorUntilBlock(
&self,
_0: Address,
_1: Address,
) -> SolCallBuilder<T, &P, contractCanSlashOperatorUntilBlockCall, N>
pub fn contractCanSlashOperatorUntilBlock( &self, _0: Address, _1: Address, ) -> SolCallBuilder<T, &P, contractCanSlashOperatorUntilBlockCall, N>
Creates a new call builder for the [contractCanSlashOperatorUntilBlock
] function.
Sourcepub fn delegation(&self) -> SolCallBuilder<T, &P, delegationCall, N>
pub fn delegation(&self) -> SolCallBuilder<T, &P, delegationCall, N>
Creates a new call builder for the [delegation
] function.
Sourcepub fn freezeOperator(
&self,
_0: Address,
) -> SolCallBuilder<T, &P, freezeOperatorCall, N>
pub fn freezeOperator( &self, _0: Address, ) -> SolCallBuilder<T, &P, freezeOperatorCall, N>
Creates a new call builder for the [freezeOperator
] function.
Sourcepub fn getCorrectValueForInsertAfter(
&self,
_0: Address,
_1: u32,
) -> SolCallBuilder<T, &P, getCorrectValueForInsertAfterCall, N>
pub fn getCorrectValueForInsertAfter( &self, _0: Address, _1: u32, ) -> SolCallBuilder<T, &P, getCorrectValueForInsertAfterCall, N>
Creates a new call builder for the [getCorrectValueForInsertAfter
] function.
Sourcepub fn getMiddlewareTimesIndexServeUntilBlock(
&self,
_0: Address,
_1: u32,
) -> SolCallBuilder<T, &P, getMiddlewareTimesIndexServeUntilBlockCall, N>
pub fn getMiddlewareTimesIndexServeUntilBlock( &self, _0: Address, _1: u32, ) -> SolCallBuilder<T, &P, getMiddlewareTimesIndexServeUntilBlockCall, N>
Creates a new call builder for the [getMiddlewareTimesIndexServeUntilBlock
] function.
Sourcepub fn getMiddlewareTimesIndexStalestUpdateBlock(
&self,
_0: Address,
_1: u32,
) -> SolCallBuilder<T, &P, getMiddlewareTimesIndexStalestUpdateBlockCall, N>
pub fn getMiddlewareTimesIndexStalestUpdateBlock( &self, _0: Address, _1: u32, ) -> SolCallBuilder<T, &P, getMiddlewareTimesIndexStalestUpdateBlockCall, N>
Creates a new call builder for the [getMiddlewareTimesIndexStalestUpdateBlock
] function.
Sourcepub fn initialize(
&self,
_0: Address,
_1: Address,
_2: U256,
) -> SolCallBuilder<T, &P, initializeCall, N>
pub fn initialize( &self, _0: Address, _1: Address, _2: U256, ) -> SolCallBuilder<T, &P, initializeCall, N>
Creates a new call builder for the [initialize
] function.
Sourcepub fn isFrozen(&self, _0: Address) -> SolCallBuilder<T, &P, isFrozenCall, N>
pub fn isFrozen(&self, _0: Address) -> SolCallBuilder<T, &P, isFrozenCall, N>
Creates a new call builder for the [isFrozen
] function.
Sourcepub fn latestUpdateBlock(
&self,
_0: Address,
_1: Address,
) -> SolCallBuilder<T, &P, latestUpdateBlockCall, N>
pub fn latestUpdateBlock( &self, _0: Address, _1: Address, ) -> SolCallBuilder<T, &P, latestUpdateBlockCall, N>
Creates a new call builder for the [latestUpdateBlock
] function.
Sourcepub fn middlewareTimesLength(
&self,
_0: Address,
) -> SolCallBuilder<T, &P, middlewareTimesLengthCall, N>
pub fn middlewareTimesLength( &self, _0: Address, ) -> SolCallBuilder<T, &P, middlewareTimesLengthCall, N>
Creates a new call builder for the [middlewareTimesLength
] function.
Sourcepub fn operatorToMiddlewareTimes(
&self,
_0: Address,
_1: U256,
) -> SolCallBuilder<T, &P, operatorToMiddlewareTimesCall, N>
pub fn operatorToMiddlewareTimes( &self, _0: Address, _1: U256, ) -> SolCallBuilder<T, &P, operatorToMiddlewareTimesCall, N>
Creates a new call builder for the [operatorToMiddlewareTimes
] function.
Sourcepub fn operatorWhitelistedContractsLinkedListEntry(
&self,
_0: Address,
_1: Address,
) -> SolCallBuilder<T, &P, operatorWhitelistedContractsLinkedListEntryCall, N>
pub fn operatorWhitelistedContractsLinkedListEntry( &self, _0: Address, _1: Address, ) -> SolCallBuilder<T, &P, operatorWhitelistedContractsLinkedListEntryCall, N>
Creates a new call builder for the [operatorWhitelistedContractsLinkedListEntry
] function.
Sourcepub fn operatorWhitelistedContractsLinkedListSize(
&self,
_0: Address,
) -> SolCallBuilder<T, &P, operatorWhitelistedContractsLinkedListSizeCall, N>
pub fn operatorWhitelistedContractsLinkedListSize( &self, _0: Address, ) -> SolCallBuilder<T, &P, operatorWhitelistedContractsLinkedListSizeCall, N>
Creates a new call builder for the [operatorWhitelistedContractsLinkedListSize
] function.
Sourcepub fn optIntoSlashing(
&self,
_0: Address,
) -> SolCallBuilder<T, &P, optIntoSlashingCall, N>
pub fn optIntoSlashing( &self, _0: Address, ) -> SolCallBuilder<T, &P, optIntoSlashingCall, N>
Creates a new call builder for the [optIntoSlashing
] function.
Sourcepub fn owner(&self) -> SolCallBuilder<T, &P, ownerCall, N>
pub fn owner(&self) -> SolCallBuilder<T, &P, ownerCall, N>
Creates a new call builder for the [owner
] function.
Sourcepub fn pause(
&self,
newPausedStatus: U256,
) -> SolCallBuilder<T, &P, pauseCall, N>
pub fn pause( &self, newPausedStatus: U256, ) -> SolCallBuilder<T, &P, pauseCall, N>
Creates a new call builder for the [pause
] function.
Sourcepub fn pauseAll(&self) -> SolCallBuilder<T, &P, pauseAllCall, N>
pub fn pauseAll(&self) -> SolCallBuilder<T, &P, pauseAllCall, N>
Creates a new call builder for the [pauseAll
] function.
Sourcepub fn paused_0(&self, index: u8) -> SolCallBuilder<T, &P, paused_0Call, N>
pub fn paused_0(&self, index: u8) -> SolCallBuilder<T, &P, paused_0Call, N>
Creates a new call builder for the [paused_0
] function.
Sourcepub fn paused_1(&self) -> SolCallBuilder<T, &P, paused_1Call, N>
pub fn paused_1(&self) -> SolCallBuilder<T, &P, paused_1Call, N>
Creates a new call builder for the [paused_1
] function.
Sourcepub fn pauserRegistry(&self) -> SolCallBuilder<T, &P, pauserRegistryCall, N>
pub fn pauserRegistry(&self) -> SolCallBuilder<T, &P, pauserRegistryCall, N>
Creates a new call builder for the [pauserRegistry
] function.
Sourcepub fn recordFirstStakeUpdate(
&self,
_0: Address,
_1: u32,
) -> SolCallBuilder<T, &P, recordFirstStakeUpdateCall, N>
pub fn recordFirstStakeUpdate( &self, _0: Address, _1: u32, ) -> SolCallBuilder<T, &P, recordFirstStakeUpdateCall, N>
Creates a new call builder for the [recordFirstStakeUpdate
] function.
Sourcepub fn recordLastStakeUpdateAndRevokeSlashingAbility(
&self,
_0: Address,
_1: u32,
) -> SolCallBuilder<T, &P, recordLastStakeUpdateAndRevokeSlashingAbilityCall, N>
pub fn recordLastStakeUpdateAndRevokeSlashingAbility( &self, _0: Address, _1: u32, ) -> SolCallBuilder<T, &P, recordLastStakeUpdateAndRevokeSlashingAbilityCall, N>
Creates a new call builder for the [recordLastStakeUpdateAndRevokeSlashingAbility
] function.
Sourcepub fn recordStakeUpdate(
&self,
_0: Address,
_1: u32,
_2: u32,
_3: U256,
) -> SolCallBuilder<T, &P, recordStakeUpdateCall, N>
pub fn recordStakeUpdate( &self, _0: Address, _1: u32, _2: u32, _3: U256, ) -> SolCallBuilder<T, &P, recordStakeUpdateCall, N>
Creates a new call builder for the [recordStakeUpdate
] function.
Sourcepub fn renounceOwnership(
&self,
) -> SolCallBuilder<T, &P, renounceOwnershipCall, N>
pub fn renounceOwnership( &self, ) -> SolCallBuilder<T, &P, renounceOwnershipCall, N>
Creates a new call builder for the [renounceOwnership
] function.
Sourcepub fn resetFrozenStatus(
&self,
_0: Vec<Address>,
) -> SolCallBuilder<T, &P, resetFrozenStatusCall, N>
pub fn resetFrozenStatus( &self, _0: Vec<Address>, ) -> SolCallBuilder<T, &P, resetFrozenStatusCall, N>
Creates a new call builder for the [resetFrozenStatus
] function.
Sourcepub fn setPauserRegistry(
&self,
newPauserRegistry: Address,
) -> SolCallBuilder<T, &P, setPauserRegistryCall, N>
pub fn setPauserRegistry( &self, newPauserRegistry: Address, ) -> SolCallBuilder<T, &P, setPauserRegistryCall, N>
Creates a new call builder for the [setPauserRegistry
] function.
Sourcepub fn strategyManager(&self) -> SolCallBuilder<T, &P, strategyManagerCall, N>
pub fn strategyManager(&self) -> SolCallBuilder<T, &P, strategyManagerCall, N>
Creates a new call builder for the [strategyManager
] function.
Sourcepub fn transferOwnership(
&self,
newOwner: Address,
) -> SolCallBuilder<T, &P, transferOwnershipCall, N>
pub fn transferOwnership( &self, newOwner: Address, ) -> SolCallBuilder<T, &P, transferOwnershipCall, N>
Creates a new call builder for the [transferOwnership
] function.
Sourcepub fn unpause(
&self,
newPausedStatus: U256,
) -> SolCallBuilder<T, &P, unpauseCall, N>
pub fn unpause( &self, newPausedStatus: U256, ) -> SolCallBuilder<T, &P, unpauseCall, N>
Creates a new call builder for the [unpause
] function.
Sourcepub fn whitelistedContractDetails(
&self,
_0: Address,
_1: Address,
) -> SolCallBuilder<T, &P, whitelistedContractDetailsCall, N>
pub fn whitelistedContractDetails( &self, _0: Address, _1: Address, ) -> SolCallBuilder<T, &P, whitelistedContractDetailsCall, N>
Creates a new call builder for the [whitelistedContractDetails
] function.
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, P, N>
Event filters.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> SlasherInstance<T, P, N>
Event filters.
Sourcepub fn event_filter<E: SolEvent>(&self) -> Event<T, &P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<T, &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 FrozenStatusReset_filter(&self) -> Event<T, &P, FrozenStatusReset, N>
pub fn FrozenStatusReset_filter(&self) -> Event<T, &P, FrozenStatusReset, N>
Creates a new event filter for the FrozenStatusReset
event.
Sourcepub fn Initialized_filter(&self) -> Event<T, &P, Initialized, N>
pub fn Initialized_filter(&self) -> Event<T, &P, Initialized, N>
Creates a new event filter for the Initialized
event.
Sourcepub fn MiddlewareTimesAdded_filter(
&self,
) -> Event<T, &P, MiddlewareTimesAdded, N>
pub fn MiddlewareTimesAdded_filter( &self, ) -> Event<T, &P, MiddlewareTimesAdded, N>
Creates a new event filter for the MiddlewareTimesAdded
event.
Sourcepub fn OperatorFrozen_filter(&self) -> Event<T, &P, OperatorFrozen, N>
pub fn OperatorFrozen_filter(&self) -> Event<T, &P, OperatorFrozen, N>
Creates a new event filter for the OperatorFrozen
event.
Sourcepub fn OptedIntoSlashing_filter(&self) -> Event<T, &P, OptedIntoSlashing, N>
pub fn OptedIntoSlashing_filter(&self) -> Event<T, &P, OptedIntoSlashing, N>
Creates a new event filter for the OptedIntoSlashing
event.
Sourcepub fn OwnershipTransferred_filter(
&self,
) -> Event<T, &P, OwnershipTransferred, N>
pub fn OwnershipTransferred_filter( &self, ) -> Event<T, &P, OwnershipTransferred, N>
Creates a new event filter for the OwnershipTransferred
event.
Sourcepub fn Paused_filter(&self) -> Event<T, &P, Paused, N>
pub fn Paused_filter(&self) -> Event<T, &P, Paused, N>
Creates a new event filter for the Paused
event.
Sourcepub fn PauserRegistrySet_filter(&self) -> Event<T, &P, PauserRegistrySet, N>
pub fn PauserRegistrySet_filter(&self) -> Event<T, &P, PauserRegistrySet, N>
Creates a new event filter for the PauserRegistrySet
event.
Sourcepub fn SlashingAbilityRevoked_filter(
&self,
) -> Event<T, &P, SlashingAbilityRevoked, N>
pub fn SlashingAbilityRevoked_filter( &self, ) -> Event<T, &P, SlashingAbilityRevoked, N>
Creates a new event filter for the SlashingAbilityRevoked
event.
Trait Implementations§
Auto Trait Implementations§
impl<T, P, N> Freeze for SlasherInstance<T, P, N>where
P: Freeze,
impl<T, P, N> RefUnwindSafe for SlasherInstance<T, P, N>
impl<T, P, N> Send for SlasherInstance<T, P, N>
impl<T, P, N> Sync for SlasherInstance<T, P, N>
impl<T, P, N> Unpin for SlasherInstance<T, P, N>
impl<T, P, N> UnwindSafe for SlasherInstance<T, P, N>
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