Certifier
contract Certifier
is UpgradeableOwned, ICertifier
Allows validators to use a zero gas price for their service transactions (see https://openethereum.github.io/wiki/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 `ValidatorSetAuRa.isReportValidatorValid` returns `true` for the specified address.
- Parameters:
_who
- The address for which the boolean flag must be determined.- Returns:
- bool
certifiedExplicitly
function certifiedExplicitly(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 the address is certified using the `_certify` function. This function differs from the `certified`: it doesn't take into account the returned value of `ValidatorSetAuRa.isReportValidatorValid` function.
- 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. Can only be called by the constructor of the `InitializerAuRa` contract or owner.
- Parameters:
_certifiedAddresses
- The addresses for which a zero gas price must be allowed._validatorSet
- The address of the `ValidatorSetAuRa` 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.