pub struct Operator {
pub address: Address,
pub delegation_approver_address: Address,
pub metadata_url: String,
pub allocation_delay: Option<u32>,
pub _deprecated_earnings_receiver_address: Option<Address>,
pub staker_opt_out_window_blocks: Option<u32>,
}Expand description
Operator represents EigenLayer’s view of an operator
Fields§
§address: AddressOperator Address
delegation_approver_address: Address§metadata_url: StringMetadataUrl URL where operator metadata is stored
allocation_delay: Option<u32>allocation_delay is the delay in seconds where an operator is allowed to change allocation
This can only be set once by the operator. Once set this can’t be changed
_deprecated_earnings_receiver_address: Option<Address>§staker_opt_out_window_blocks: Option<u32>Implementations§
Source§impl Operator
impl Operator
pub fn new( address: &str, delegation_approver_address: &str, metadata_url: String, allocation_delay: Option<u32>, _deprecated_earnings_receiver_address: Option<Address>, staker_opt_out_window_blocks: Option<u32>, ) -> Result<Self, OperatorTypesError>
pub async fn validate(&self) -> Result<(), OperatorTypesError>
pub fn operator_id_from_key_pair( keypair: BlsKeyPair, ) -> Result<OperatorId, OperatorTypesError>
Auto Trait Implementations§
impl Freeze for Operator
impl RefUnwindSafe for Operator
impl Send for Operator
impl Sync for Operator
impl Unpin for Operator
impl UnsafeUnpin for Operator
impl UnwindSafe for Operator
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
Mutably borrows from an owned value. Read more
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>
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 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>
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 moreCreates a shared type from an unshared type.