Administrable

Kiln

Administrable

This contract handles the administration of the contracts

Methods

acceptAdmin

function acceptAdmin() external nonpayable

Accept the transfer of ownership

Only callable by the pending admin. Resets the pending admin if succesful.

getAdmin

function getAdmin() external view returns (address)

Retrieves the current admin address

Returns

NameTypeDescription

_0

address

The admin address

getPendingAdmin

function getPendingAdmin() external view returns (address)

Retrieve the current pending admin address

Returns

NameTypeDescription

_0

address

The pending admin address

proposeAdmin

function proposeAdmin(address _newAdmin) external nonpayable

Proposes a new address as admin

This security prevents setting an invalid address as an admin. The pendingadmin has to claim its ownership of the contract, and prove that the newaddress is able to perform regular transactions.

Parameters

NameTypeDescription

_newAdmin

address

New admin address

Events

SetAdmin

event SetAdmin(address indexed admin)

The admin address changed

Parameters

NameTypeDescription

admin indexed

address

New admin address

SetPendingAdmin

event SetPendingAdmin(address indexed pendingAdmin)

The pending admin address changed

Parameters

NameTypeDescription

pendingAdmin indexed

address

New pending admin address

Errors

InvalidZeroAddress

error InvalidZeroAddress()

The address is zero

Unauthorized

error Unauthorized(address caller)

The operator is unauthorized for the caller

Parameters

NameTypeDescription

caller

address

Address performing the call

Last updated