PolicyPoolComponent

_This is the base class of all the components of the protocol that are linked to the PolicyPool and created after it. Holds the reference to _policyPool as immutable, also provides access to common admin roles:

 This contract also keeps track of the tweaks to avoid two tweaks of the same type are done in a short period._

Variables

_policyPool

contract IPolicyPool _policyPool

Errors

NoZeroPolicyPool

error NoZeroPolicyPool()

UpgradeCannotChangePolicyPool

error UpgradeCannotChangePolicyPool()

OnlyPolicyPool

error OnlyPolicyPool()

Public Functions

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

See {IERC165-supportsInterface}.

policyPool

function policyPool() public view returns (contract IPolicyPool)

Returns the address of the PolicyPool (see {PolicyPool}) where this component belongs.

currency

function currency() public view returns (contract IERC20Metadata)

Private Functions

constructor

constructor(contract IPolicyPool policyPool_) internal

__PolicyPoolComponent_init

function __PolicyPoolComponent_init() internal

_authorizeUpgrade

function _authorizeUpgrade(address newImpl) internal view

_upgradeValidations

function _upgradeValidations(address newImpl) internal view virtual