A contract module which provides a basic access control mechanism, where there is an account (a minter) that can be granted exclusive access to specific functions.
This module is used through inheritance.
function _addMinter(address minter_) internal
Internal function that stores the new minter address in the correct storage slot.
Name | Type | Description |
---|---|---|
minter_ | address | The address of the new minter. |
function transferMintership(address minter_) external
Changes the minter of the contract.
Can only be called by the current minter.
Name | Type | Description |
---|---|---|
minter_ | address | The address of the new minter. |
function proposeMintership(address minter_) external
Proposes a change of the minter of the contract.
Can only be called by the current minter.
Name | Type | Description |
---|---|---|
minter_ | address | The address of the new minter. |
function acceptMintership(address fromMinter) external
Accept a change of the minter of the contract.
Can only be called by the proposed minter.
Name | Type | Description |
---|---|---|
fromMinter | address | The previous minter. |
function isMinter(address addr) external view returns (bool)
Query if an address is a minter
Name | Type | Description |
---|---|---|
addr | address | the address to query for |
Name | Type | Description |
---|---|---|
[0] | bool | bool Boolean value representing whether or not the address is a minter. |