Skip to content

Commit

Permalink
Add recommendation to initialize all contracts that use Initializable
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Sep 13, 2021
1 parent 8a5b67f commit 38448c1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions contracts/proxy/utils/Initializable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ pragma solidity ^0.8.0;
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be used in certain kinds of exploits since it may allow an attacker to take control of
* the contract. This includes the implementation contract behind a proxy. You can either invoke the initializer
* manually, independently of initialization of the proxy, or you can include a constructor to automatically mark it as
* initialized when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() initializer {}
* ```
* ====
*/
abstract contract Initializable {
/**
Expand Down

0 comments on commit 38448c1

Please sign in to comment.