pub struct Ownable2StepContractRef { /* private fields */ }Expand description
Ownable2Step Contract Ref.
Implementations§
Source§impl Ownable2StepContractRef
impl Ownable2StepContractRef
Sourcepub fn init(&mut self, owner: Address)
pub fn init(&mut self, owner: Address)
Initializes the module setting an owner as the initial owner.
Sourcepub fn get_pending_owner(&self) -> Option<Address>
pub fn get_pending_owner(&self) -> Option<Address>
Returns the address of the pending owner.
Sourcepub fn transfer_ownership(&mut self, new_owner: &Address)
pub fn transfer_ownership(&mut self, new_owner: &Address)
Starts the ownership transfer of the module to a new_owner.
Replaces the pending_ownerif there is one.
This function can only be accessed by the current owner of the module.
Sourcepub fn renounce_ownership(&mut self)
pub fn renounce_ownership(&mut self)
If the contract’s owner chooses to renounce their ownership, the contract will no longer have an owner. This means that any functions that can only be accessed by the owner will no longer be available.
The function can only be called by the current owner, and it will permanently remove the owner’s privileges.
Sourcepub fn accept_ownership(&mut self)
pub fn accept_ownership(&mut self)
The new owner accepts the ownership transfer. Replaces the current owner and clears the pending owner.
Sourcepub fn assert_owner(&self, address: &Address)
pub fn assert_owner(&self, address: &Address)
Reverts with if the function called by any account other than the owner.
Trait Implementations§
Source§impl ContractRef for Ownable2StepContractRef
impl ContractRef for Ownable2StepContractRef
Source§impl SchemaEvents for Ownable2StepContractRef
impl SchemaEvents for Ownable2StepContractRef
Source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Auto Trait Implementations§
impl Freeze for Ownable2StepContractRef
impl !RefUnwindSafe for Ownable2StepContractRef
impl !Send for Ownable2StepContractRef
impl !Sync for Ownable2StepContractRef
impl Unpin for Ownable2StepContractRef
impl !UnwindSafe for Ownable2StepContractRef
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> 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