Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

InternalTrait

Fully qualified path: openzeppelin_access::ownable::ownable::OwnableComponent::InternalTrait

pub trait InternalTrait<TContractState, +HasComponent<TContractState>>

Trait functions

initializer

Sets the contract’s initial owner.

Requirements:

  • owner is not the zero address.

This function should be called at construction time.

Fully qualified path: openzeppelin_access::ownable::ownable::OwnableComponent::InternalTrait::initializer

fn initializer(ref self: ComponentState<TContractState>, owner: ContractAddress)

assert_only_owner

Panics if called by any account other than the owner. Use this to restrict access to certain functions to the owner.

Fully qualified path: openzeppelin_access::ownable::ownable::OwnableComponent::InternalTrait::assert_only_owner

fn assert_only_owner(self: @ComponentState<TContractState>)

_transfer_ownership

Transfers ownership of the contract to a new address and resets the pending owner to the zero address.

Internal function without access restriction.

Emits an OwnershipTransferred event.

Fully qualified path: openzeppelin_access::ownable::ownable::OwnableComponent::InternalTrait::_transfer_ownership

fn _transfer_ownership(ref self: ComponentState<TContractState>, new_owner: ContractAddress)

_propose_owner

Sets a new pending owner.

Internal function without access restriction.

Emits an OwnershipTransferStarted event.

Fully qualified path: openzeppelin_access::ownable::ownable::OwnableComponent::InternalTrait::_propose_owner

fn _propose_owner(ref self: ComponentState<TContractState>, new_owner: ContractAddress)