|
||
---|---|---|
.. | ||
EternalStorage.sol | ||
EternalStorageProxy.sol | ||
OwnedUpgradeabilityProxy.sol | ||
Proxy.sol | ||
README.md | ||
UpgradeabilityOwnerStorage.sol | ||
UpgradeabilityProxy.sol | ||
UpgradeabilityStorage.sol |
README.md
Upgradeability contracts
This directory contains contracts needed for the idea of upgradeable contracts. The source code for this contracts was originally taken from openzeppelin-labs repository.
Since the original code is not recommended for production use, it is not directly imported into this project.
During the development process and performing security audits, the following minor changes were introduced:
- Required solidity compiler version was fixed at
0.4.24
, since this version is used in the source code of other contracts. Deprecated syntax for constructors and emitting events was also updated to a new one. - Access modifier
onlyProxyOwner
was renamed toonlyUpgradeabilityOwner
. Function calls toproxyOwner()
inOwnedUpgradeabilityProxy.sol
were directly replaced by calls toupgradeabilityOwner()
, in order to avoid possible ambiguity. See #195. - Functions modifier
public
was replaced byexternal
where possible. - Version field type was changed from
string
touint256
, as it reduces possible complexity and allows to easily introduce a version mutability requirement (require(version > _version);
inUpgradeabilityProxy.sol
). - Additional assembly operation was introduced in
Proxy.sol
, opcodes in linemstore(0x40, add(ptr, returndatasize))
guarantee the correct value of free memory pointer for execution of next instructions. - Additional check in
UpgradeabilityProxy.sol
was added,require(AddressUtils.isContract(implementation))
verifies that new implementation is not a regular address, but a contract. See #256.