Struct AllocationManagerInstance

Source
pub struct AllocationManagerInstance<P, N = Ethereum> { /* private fields */ }
Expand description

A AllocationManager instance.

Contains type-safe methods for interacting with an on-chain instance of the
[`AllocationManager`](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<P: Provider<N>, N: Network> AllocationManagerInstance<P, N>

Instantiation and getters/setters.

Source

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

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

    See the [wrapper's documentation](`AllocationManagerInstance`) for more details.
Source

pub async fn deploy( provider: P, _delegation: Address, _pauserRegistry: Address, _permissionController: Address, _DEALLOCATION_DELAY: u32, _ALLOCATION_CONFIGURATION_DELAY: u32, _version: String, ) -> Result<AllocationManagerInstance<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.
Source

pub fn deploy_builder( provider: P, _delegation: Address, _pauserRegistry: Address, _permissionController: Address, _DEALLOCATION_DELAY: u32, _ALLOCATION_CONFIGURATION_DELAY: u32, _version: String, ) -> RawCallBuilder<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.
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> AllocationManagerInstance<&P, N>

Source

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

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

Source§

impl<P: Provider<N>, N: Network> AllocationManagerInstance<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 ALLOCATION_CONFIGURATION_DELAY( &self, ) -> SolCallBuilder<&P, ALLOCATION_CONFIGURATION_DELAYCall, N>

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

Source

pub fn DEALLOCATION_DELAY( &self, ) -> SolCallBuilder<&P, DEALLOCATION_DELAYCall, N>

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

Source

pub fn addStrategiesToOperatorSet( &self, avs: Address, operatorSetId: u32, strategies: Vec<Address>, ) -> SolCallBuilder<&P, addStrategiesToOperatorSetCall, N>

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

Source

pub fn clearDeallocationQueue( &self, operator: Address, strategies: Vec<Address>, numToClear: Vec<u16>, ) -> SolCallBuilder<&P, clearDeallocationQueueCall, N>

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

Source

pub fn createOperatorSets( &self, avs: Address, params: Vec<<CreateSetParams as SolType>::RustType>, ) -> SolCallBuilder<&P, createOperatorSetsCall, N>

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

Source

pub fn delegation(&self) -> SolCallBuilder<&P, delegationCall, N>

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

Source

pub fn deregisterFromOperatorSets( &self, params: <DeregisterParams as SolType>::RustType, ) -> SolCallBuilder<&P, deregisterFromOperatorSetsCall, N>

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

Source

pub fn getAVSRegistrar( &self, avs: Address, ) -> SolCallBuilder<&P, getAVSRegistrarCall, N>

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

Source

pub fn getAllocatableMagnitude( &self, operator: Address, strategy: Address, ) -> SolCallBuilder<&P, getAllocatableMagnitudeCall, N>

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

Source

pub fn getAllocatedSets( &self, operator: Address, ) -> SolCallBuilder<&P, getAllocatedSetsCall, N>

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

Source

pub fn getAllocatedStake( &self, operatorSet: <OperatorSet as SolType>::RustType, operators: Vec<Address>, strategies: Vec<Address>, ) -> SolCallBuilder<&P, getAllocatedStakeCall, N>

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

Source

pub fn getAllocatedStrategies( &self, operator: Address, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, getAllocatedStrategiesCall, N>

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

Source

pub fn getAllocation( &self, operator: Address, operatorSet: <OperatorSet as SolType>::RustType, strategy: Address, ) -> SolCallBuilder<&P, getAllocationCall, N>

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

Source

pub fn getAllocationDelay( &self, operator: Address, ) -> SolCallBuilder<&P, getAllocationDelayCall, N>

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

Source

pub fn getAllocations( &self, operators: Vec<Address>, operatorSet: <OperatorSet as SolType>::RustType, strategy: Address, ) -> SolCallBuilder<&P, getAllocationsCall, N>

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

Source

pub fn getEncumberedMagnitude( &self, operator: Address, strategy: Address, ) -> SolCallBuilder<&P, getEncumberedMagnitudeCall, N>

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

Source

pub fn getMaxMagnitude( &self, operator: Address, strategy: Address, ) -> SolCallBuilder<&P, getMaxMagnitudeCall, N>

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

Source

pub fn getMaxMagnitudes_0( &self, operators: Vec<Address>, strategy: Address, ) -> SolCallBuilder<&P, getMaxMagnitudes_0Call, N>

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

Source

pub fn getMaxMagnitudes_1( &self, operator: Address, strategies: Vec<Address>, ) -> SolCallBuilder<&P, getMaxMagnitudes_1Call, N>

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

Source

pub fn getMaxMagnitudesAtBlock( &self, operator: Address, strategies: Vec<Address>, blockNumber: u32, ) -> SolCallBuilder<&P, getMaxMagnitudesAtBlockCall, N>

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

Source

pub fn getMemberCount( &self, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, getMemberCountCall, N>

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

Source

pub fn getMembers( &self, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, getMembersCall, N>

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

Source

pub fn getMinimumSlashableStake( &self, operatorSet: <OperatorSet as SolType>::RustType, operators: Vec<Address>, strategies: Vec<Address>, futureBlock: u32, ) -> SolCallBuilder<&P, getMinimumSlashableStakeCall, N>

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

Source

pub fn getOperatorSetCount( &self, avs: Address, ) -> SolCallBuilder<&P, getOperatorSetCountCall, N>

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

Source

pub fn getRegisteredSets( &self, operator: Address, ) -> SolCallBuilder<&P, getRegisteredSetsCall, N>

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

Source

pub fn getStrategiesInOperatorSet( &self, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, getStrategiesInOperatorSetCall, N>

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

Source

pub fn getStrategyAllocations( &self, operator: Address, strategy: Address, ) -> SolCallBuilder<&P, getStrategyAllocationsCall, N>

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

Source

pub fn initialize( &self, initialOwner: Address, initialPausedStatus: U256, ) -> SolCallBuilder<&P, initializeCall, N>

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

Source

pub fn isMemberOfOperatorSet( &self, operator: Address, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, isMemberOfOperatorSetCall, N>

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

Source

pub fn isOperatorSet( &self, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, isOperatorSetCall, N>

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

Source

pub fn isOperatorSlashable( &self, operator: Address, operatorSet: <OperatorSet as SolType>::RustType, ) -> SolCallBuilder<&P, isOperatorSlashableCall, N>

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

Source

pub fn modifyAllocations( &self, operator: Address, params: Vec<<AllocateParams as SolType>::RustType>, ) -> SolCallBuilder<&P, modifyAllocationsCall, N>

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

Source

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

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

Source

pub fn pause(&self, newPausedStatus: U256) -> SolCallBuilder<&P, pauseCall, N>

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

Source

pub fn pauseAll(&self) -> SolCallBuilder<&P, pauseAllCall, N>

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

Source

pub fn paused_0(&self, index: u8) -> SolCallBuilder<&P, paused_0Call, N>

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

Source

pub fn paused_1(&self) -> SolCallBuilder<&P, paused_1Call, N>

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

Source

pub fn pauserRegistry(&self) -> SolCallBuilder<&P, pauserRegistryCall, N>

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

Source

pub fn permissionController( &self, ) -> SolCallBuilder<&P, permissionControllerCall, N>

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

Source

pub fn registerForOperatorSets( &self, operator: Address, params: <RegisterParams as SolType>::RustType, ) -> SolCallBuilder<&P, registerForOperatorSetsCall, N>

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

Source

pub fn removeStrategiesFromOperatorSet( &self, avs: Address, operatorSetId: u32, strategies: Vec<Address>, ) -> SolCallBuilder<&P, removeStrategiesFromOperatorSetCall, N>

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

Source

pub fn renounceOwnership(&self) -> SolCallBuilder<&P, renounceOwnershipCall, N>

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

Source

pub fn setAVSRegistrar( &self, avs: Address, registrar: Address, ) -> SolCallBuilder<&P, setAVSRegistrarCall, N>

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

Source

pub fn setAllocationDelay( &self, operator: Address, delay: u32, ) -> SolCallBuilder<&P, setAllocationDelayCall, N>

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

Source

pub fn slashOperator( &self, avs: Address, params: <SlashingParams as SolType>::RustType, ) -> SolCallBuilder<&P, slashOperatorCall, N>

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

Source

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

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

Source

pub fn unpause( &self, newPausedStatus: U256, ) -> SolCallBuilder<&P, unpauseCall, N>

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

Source

pub fn updateAVSMetadataURI( &self, avs: Address, metadataURI: String, ) -> SolCallBuilder<&P, updateAVSMetadataURICall, N>

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

Source

pub fn version(&self) -> SolCallBuilder<&P, versionCall, N>

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

Source§

impl<P: Provider<N>, N: Network> AllocationManagerInstance<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 AVSMetadataURIUpdated_filter( &self, ) -> Event<&P, AVSMetadataURIUpdated, N>

Creates a new event filter for the AVSMetadataURIUpdated event.

Source

pub fn AVSRegistrarSet_filter(&self) -> Event<&P, AVSRegistrarSet, N>

Creates a new event filter for the AVSRegistrarSet event.

Source

pub fn AllocationDelaySet_filter(&self) -> Event<&P, AllocationDelaySet, N>

Creates a new event filter for the AllocationDelaySet event.

Source

pub fn AllocationUpdated_filter(&self) -> Event<&P, AllocationUpdated, N>

Creates a new event filter for the AllocationUpdated event.

Source

pub fn EncumberedMagnitudeUpdated_filter( &self, ) -> Event<&P, EncumberedMagnitudeUpdated, N>

Creates a new event filter for the EncumberedMagnitudeUpdated event.

Source

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

Creates a new event filter for the Initialized event.

Source

pub fn MaxMagnitudeUpdated_filter(&self) -> Event<&P, MaxMagnitudeUpdated, N>

Creates a new event filter for the MaxMagnitudeUpdated event.

Source

pub fn OperatorAddedToOperatorSet_filter( &self, ) -> Event<&P, OperatorAddedToOperatorSet, N>

Creates a new event filter for the OperatorAddedToOperatorSet event.

Source

pub fn OperatorRemovedFromOperatorSet_filter( &self, ) -> Event<&P, OperatorRemovedFromOperatorSet, N>

Creates a new event filter for the OperatorRemovedFromOperatorSet event.

Source

pub fn OperatorSetCreated_filter(&self) -> Event<&P, OperatorSetCreated, N>

Creates a new event filter for the OperatorSetCreated event.

Source

pub fn OperatorSlashed_filter(&self) -> Event<&P, OperatorSlashed, N>

Creates a new event filter for the OperatorSlashed event.

Source

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

Creates a new event filter for the OwnershipTransferred event.

Source

pub fn Paused_filter(&self) -> Event<&P, Paused, N>

Creates a new event filter for the Paused event.

Source

pub fn StrategyAddedToOperatorSet_filter( &self, ) -> Event<&P, StrategyAddedToOperatorSet, N>

Creates a new event filter for the StrategyAddedToOperatorSet event.

Source

pub fn StrategyRemovedFromOperatorSet_filter( &self, ) -> Event<&P, StrategyRemovedFromOperatorSet, N>

Creates a new event filter for the StrategyRemovedFromOperatorSet event.

Source

pub fn Unpaused_filter(&self) -> Event<&P, Unpaused, N>

Creates a new event filter for the Unpaused event.

Trait Implementations§

Source§

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

Source§

fn clone(&self) -> AllocationManagerInstance<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 AllocationManagerInstance<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 AllocationManagerInstance<P, N>
where P: Freeze,

§

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

§

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

§

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

§

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

§

impl<P, N> UnwindSafe for AllocationManagerInstance<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.

Source§

impl<T> Instrument for T

Source§

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

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

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

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

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

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

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

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

Source§

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

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

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

Source§

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

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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