Commit c99e0214 authored by smartcontracts's avatar smartcontracts Committed by GitHub

cleanup: Minor cleanup to ResolvedDelegateProxy (#374)

parent 91a9a3dc
...@@ -13,7 +13,6 @@ contract Lib_ResolvedDelegateProxy { ...@@ -13,7 +13,6 @@ contract Lib_ResolvedDelegateProxy {
* Variables * * Variables *
*************/ *************/
// Using mappings to store fields to avoid overwriting storage slots in the // Using mappings to store fields to avoid overwriting storage slots in the
// implementation contract. For example, instead of storing these fields at // implementation contract. For example, instead of storing these fields at
// storage slot `0` & `1`, they are stored at `keccak256(key + slot)`. // storage slot `0` & `1`, they are stored at `keccak256(key + slot)`.
...@@ -22,8 +21,8 @@ contract Lib_ResolvedDelegateProxy { ...@@ -22,8 +21,8 @@ contract Lib_ResolvedDelegateProxy {
// There is a known flaw in this contract, and we will remove it from the repository // There is a known flaw in this contract, and we will remove it from the repository
// in the near future. Due to the very limited way that we are using it, this flaw is // in the near future. Due to the very limited way that we are using it, this flaw is
// not an issue in our system. // not an issue in our system.
mapping(address=>string) private implementationName; mapping (address => string) private implementationName;
mapping(address=>Lib_AddressManager) private addressManager; mapping (address => Lib_AddressManager) private addressManager;
/*************** /***************
...@@ -52,7 +51,10 @@ contract Lib_ResolvedDelegateProxy { ...@@ -52,7 +51,10 @@ contract Lib_ResolvedDelegateProxy {
external external
payable payable
{ {
address target = addressManager[address(this)].getAddress((implementationName[address(this)])); address target = addressManager[address(this)].getAddress(
(implementationName[address(this)])
);
require( require(
target != address(0), target != address(0),
"Target address must be initialized." "Target address must be initialized."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment