VersionedInitializable

Git Source

Author: Aave, inspired by the OpenZeppelin Initializable contract

Helper contract to implement initializer functions. To use it, replace the constructor with a function that has the initializer modifier.

WARNING: Unlike constructors, initializer functions must be manually invoked. This applies both to deploying an Initializable contract, as well as extending an Initializable contract via inheritance. WARNING: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or ensure that all initializers are idempotent, because this is not dealt with automatically as with constructors.

State Variables

lastInitializedRevision

Indicates that the contract has been initialized.

uint256 private lastInitializedRevision = 0;

initializing

Indicates that the contract is in the process of being initialized.

bool private initializing;

__gap

uint256[50] private ______gap;

Functions

initializer

Modifier to use in the initializer function of a contract.

modifier initializer();

getRevision

Returns the revision number of the contract

Needs to be defined in the inherited class as a constant.

function getRevision() public pure virtual returns (uint256);

Returns

isConstructor

Returns true if and only if the function is running in the constructor

function isConstructor() private view returns (bool);

Returns

Last updated