Certifier
contract Certifier
is OwnedEternalStorage, ICertifier
Allows validators to use a zero gas price for their service transactions (see https://wiki.parity.io/Permissioning.html#gas-price for more info).
Index
Reference
Events
Confirmed
event Confirmed(address who)
Emitted by the `certify` function when the specified address is allowed to use a zero gas price for its transactions.
- Parameters:
who
- Specified address allowed to make zero gas price transactions.
Revoked
event Revoked(address who)
Emitted by the `revoke` function when the specified address is denied using a zero gas price for its transactions.
- Parameters:
who
- Specified address for which zero gas price transactions are denied.
Modifiers
onlyInitialized
modifier onlyInitialized()
Ensures the `initialize` function was called before.
Functions
_certify
function _certify(address _who) internal
An internal function for the `certify` and `initialize` functions.
- Parameters:
_who
- The address for which transactions with a zero gas price must be allowed.
certified
function certified(address _who) external view returns (bool)
Returns a boolean flag indicating whether the specified address is allowed to use zero gas price transactions. Returns `true` if either the address is certified using the `_certify` function or if `ValidatorSet.isReportValidatorValid` returns `true` for the specified address.
- Parameters:
_who
- The address for which the boolean flag must be determined.- Returns:
- bool
certify
function certify(address _who) external
Allows the specified address to use a zero gas price for its transactions. Can only be called by the `owner`.
- Modifiers:
- onlyOwner onlyInitialized
- Parameters:
_who
- The address for which zero gas price transactions must be allowed.
initialize
function initialize(address[] _certifiedAddresses, address _validatorSet) external
Initializes the contract at network startup. Must be called by the constructor of the `Initializer` contract.
- Parameters:
_certifiedAddresses
- The addresses for which a zero gas price must be allowed._validatorSet
- The address of the `ValidatorSet` contract.
isInitialized
function isInitialized() public view returns (bool)
Returns a boolean flag indicating if the `initialize` function has been called.
- Returns:
- bool
revoke
function revoke(address _who) external
Denies the specified address usage of a zero gas price for its transactions. Can only be called by the `owner`.
- Modifiers:
- onlyOwner onlyInitialized
- Parameters:
_who
- The address for which transactions with a zero gas price must be denied.
validatorSetContract
function validatorSetContract() public view returns (IValidatorSet)
Returns the address of the `ValidatorSet` contract.
- Returns:
- IValidatorSet