axelar-gmp-sdk-solidity

Solidity API

Ownable

A contract module which provides a basic access control mechanism, where there is an account (an owner) that can be granted exclusive access to specific functions.

The owner account is set through ownership transfer. This module makes it possible to transfer the ownership of the contract to a new account in one step, as well as to an interim pending owner. In the second flow the ownership does not change until the pending owner accepts the ownership transfer.

_OWNER_SLOT

bytes32 _OWNER_SLOT

_OWNERSHIP_TRANSFER_SLOT

bytes32 _OWNERSHIP_TRANSFER_SLOT

constructor

constructor(address _owner) internal

Initializes the contract by transferring ownership to the owner parameter.

Parameters

Name Type Description
_owner address Address to set as the initial owner of the contract

onlyOwner

modifier onlyOwner()

Modifier that throws an error if called by any account other than the owner.

owner

function owner() public view returns (address owner_)

Returns the current owner of the contract.

Return Values

Name Type Description
owner_ address The current owner of the contract

pendingOwner

function pendingOwner() public view returns (address owner_)

Returns the pending owner of the contract.

Return Values

Name Type Description
owner_ address The pending owner of the contract

transferOwnership

function transferOwnership(address newOwner) external virtual

Transfers ownership of the contract to a new account newOwner.

Can only be called by the current owner.

Parameters

Name Type Description
newOwner address The address to transfer ownership to

proposeOwnership

function proposeOwnership(address newOwner) external virtual

Propose to transfer ownership of the contract to a new account newOwner.

Can only be called by the current owner. The ownership does not change until the new owner accepts the ownership transfer.

Parameters

Name Type Description
newOwner address The address to transfer ownership to

acceptOwnership

function acceptOwnership() external virtual

Accepts ownership of the contract.

Can only be called by the pending owner

_transferOwnership

function _transferOwnership(address newOwner) internal virtual

Internal function to transfer ownership of the contract to a new account newOwner.

Called in the constructor to set the initial owner.

Parameters

Name Type Description
newOwner address The address to transfer ownership to