Contract Address Details

0x3014ca10b91cb3D0AD85fEf7A3Cb95BCAc9c0f79

EternalStorageProxy Last Balance Update: Block #13586316
Created by 0xd917–3d96c3 at 0xa0db–386c9f

Balance

55,720,098.146600730649641673 Fuse

(@ /Fuse)

Fetching tokens...

Contract name:
EternalStorageProxy




Optimization enabled
false
Compiler version
v0.4.24+commit.e67f0147




EVM Version
default

Constructor Arguments

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000002b59a9ed4955ed22a7609d1bb2f0c7321a56fbed

Arg [0] (address) : 0x0000000000000000000000000000000000000000
Arg [1] (address) : 0x2b59a9ed4955ed22a7609d1bb2f0c7321a56fbed

              

Contract source code

/**
* Submitted for verification at blockscout.com on 2020-10-05 18:13:29.231350Z
*/
// File: contracts/eternal-storage/EternalStorage.sol
pragma solidity ^0.4.24;
/**
* @title EternalStorage
* @author LiorRabin
* @dev This contract holds all the necessary state variables to carry out the storage of any contract and to support the upgrade functionality.
*/
contract EternalStorage {
// Version number of the current implementation
uint256 internal version;
// Address of the current implementation
address internal implementation;
// Storage mappings
mapping(bytes32 => uint256) internal uintStorage;
mapping(bytes32 => string) internal stringStorage;
mapping(bytes32 => address) internal addressStorage;
mapping(bytes32 => bytes) internal bytesStorage;
mapping(bytes32 => bool) internal boolStorage;
mapping(bytes32 => int256) internal intStorage;
mapping(bytes32 => uint256[]) internal uintArrayStorage;
mapping(bytes32 => string[]) internal stringArrayStorage;
mapping(bytes32 => address[]) internal addressArrayStorage;
mapping(bytes32 => bytes[]) internal bytesArrayStorage;
mapping(bytes32 => bool[]) internal boolArrayStorage;
mapping(bytes32 => int256[]) internal intArrayStorage;
mapping(bytes32 => bytes32[]) internal bytes32ArrayStorage;
function isInitialized() public view returns(bool) {
return boolStorage[keccak256(abi.encodePacked("isInitialized"))];
}
function setInitialized(bool _status) internal {
boolStorage[keccak256(abi.encodePacked("isInitialized"))] = _status;
}
}
// File: contracts/eternal-storage/EternalStorageProxy.sol
pragma solidity ^0.4.24;
/**
* @title EternalStorageProxy
* @author LiorRabin
* @dev This proxy holds the storage of the token contract and delegates every call to the current implementation set.
* Besides, it allows to upgrade the token's behaviour towards further implementations, and provides authorization control functionalities
*/
contract EternalStorageProxy is EternalStorage {
/**
* @dev This event will be emitted every time the implementation gets upgraded
* @param version representing the version number of the upgraded implementation
* @param implementation representing the address of the upgraded implementation
*/
event Upgraded(uint256 version, address indexed implementation);
/**
* @dev This event will be emitted when ownership is renounces
* @param previousOwner address which is renounced from ownership
*/
event OwnershipRenounced(address indexed previousOwner);
/**
* @dev This event will be emitted when ownership is transferred
* @param previousOwner address which represents the previous owner
* @param newOwner address which represents the new owner
*/
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev This modifier verifies that msg.sender is the ProxyStorage contract
*/
modifier onlyProxyStorage() {
require(msg.sender == getProxyStorage());
_;
}
/**
* @dev This modifier verifies that msg.sender is the owner of the contract
*/
modifier onlyOwner() {
require(msg.sender == getOwner());
_;
}
/**
* @dev Constructor
* @param _proxyStorage address representing the ProxyStorage contract
* @param _implementation address representing the implementation contract
*/
constructor(address _proxyStorage, address _implementation) public {
require(_implementation != address(0));
if (_proxyStorage != address(0)) {
_setProxyStorage(_proxyStorage);
} else {
_setProxyStorage(address(this));
}
_setImplementation(_implementation);
_setOwner(msg.sender);
}
/**
* @dev Fallback function allowing to perform a delegatecall to the given implementation.
* This function will return whatever the implementation call returns
*/
// solhint-disable no-complex-fallback, no-inline-assembly
function() payable public {
address _impl = getImplementation();
require(_impl != address(0));
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0
calldatacopy(0, 0, calldatasize)
// Call the implementation.
// out and outsize are 0 because we don't know the size yet
let result := delegatecall(gas, _impl, 0, calldatasize, 0, 0)
// Copy the returned data
returndatacopy(0, 0, returndatasize)
switch result
// delegatecall returns 0 on error
case 0 { revert(0, returndatasize) }
default { return(0, returndatasize) }
}
}
// solhint-enable no-complex-fallback, no-inline-assembly
/**
* @dev Allows ProxyStorage contract (only) to upgrade the current implementation.
* @param _newImplementation representing the address of the new implementation to be set.
*/
function upgradeTo(address _newImplementation) public onlyProxyStorage returns(bool) {
if (_newImplementation == address(0)) return false;
if (getImplementation() == _newImplementation) return false;
uint256 _newVersion = getVersion() + 1;
_setVersion(_newVersion);
_setImplementation(_newImplementation);
emit Upgraded(_newVersion, _newImplementation);
return true;
}
/**
* @dev Allows the current owner to relinquish ownership.
*/
function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(getOwner());
_setOwner(address(0));
}
/**
* @dev Allows the current owner to transfer control of the contract to a _newOwner.
* @param _newOwner The address to transfer ownership to.
*/
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != address(0));
emit OwnershipTransferred(getOwner(), _newOwner);
_setOwner(_newOwner);
}
function getOwner() public view returns(address) {
return addressStorage[keccak256(abi.encodePacked("owner"))];
}
function _setOwner(address _owner) private {
addressStorage[keccak256(abi.encodePacked("owner"))] = _owner;
}
function getVersion() public view returns(uint256) {
return version;
}
function _setVersion(uint256 _newVersion) private {
version = _newVersion;
}
function getImplementation() public view returns(address) {
return implementation;
}
function _setImplementation(address _newImplementation) private {
implementation = _newImplementation;
}
function getProxyStorage() public view returns(address) {
return addressStorage[keccak256(abi.encodePacked("proxyStorage"))];
}
function _setProxyStorage(address _proxyStorage) private {
addressStorage[keccak256(abi.encodePacked("proxyStorage"))] = _proxyStorage;
}
}

Contract ABI

[{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"getVersion","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":""}],"name":"upgradeTo","inputs":[{"type":"address","name":"_newImplementation"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isInitialized","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"renounceOwnership","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"getOwner","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"getImplementation","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"getProxyStorage","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"_newOwner"}],"constant":false},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"address","name":"_proxyStorage"},{"type":"address","name":"_implementation"}]},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"event","name":"Upgraded","inputs":[{"type":"uint256","name":"version","indexed":false},{"type":"address","name":"implementation","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipRenounced","inputs":[{"type":"address","name":"previousOwner","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false}]
            

Contract Byte Code

0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630d8e6e2c146100fc5780633659cfe614610127578063392e53cd14610182578063715018a6146101b1578063893d20e8146101c8578063aaf10f421461021f578063ec15a5e614610276578063f2fde38b146102cd575b6000610098610310565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156100d657600080fd5b3660008037600080366000845af43d6000803e80600081146100f7573d6000f35b3d6000fd5b34801561010857600080fd5b5061011161033a565b6040518082815260200191505060405180910390f35b34801561013357600080fd5b50610168600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610343565b604051808215151515815260200191505060405180910390f35b34801561018e57600080fd5b50610197610481565b604051808215151515815260200191505060405180910390f35b3480156101bd57600080fd5b506101c6610552565b005b3480156101d457600080fd5b506101dd6105e9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561022b57600080fd5b50610234610310565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028257600080fd5b5061028b6106cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156102d957600080fd5b5061030e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107b1565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008054905090565b60008061034e6106cd565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561038757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156103c5576000915061047b565b8273ffffffffffffffffffffffffffffffffffffffff166103e4610310565b73ffffffffffffffffffffffffffffffffffffffff161415610409576000915061047b565b600161041361033a565b01905061041f8161089b565b610428836108a5565b8273ffffffffffffffffffffffffffffffffffffffff167f4289d6195cf3c2d2174adf98d0e19d4d2d08887995b99cb7b100e7ffe795820e826040518082815260200191505060405180910390a2600191505b50919050565b60006006600060405160200180807f6973496e697469616c697a656400000000000000000000000000000000000000815250600d0190506040516020818303038152906040526040518082805190602001908083835b6020831015156104fc57805182526020820191506020810190506020830392506104d7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660001916815260200190815260200160002060009054906101000a900460ff16905090565b61055a6105e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561059357600080fd5b61059b6105e9565b73ffffffffffffffffffffffffffffffffffffffff167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a26105e760006108e9565b565b60006004600060405160200180807f6f776e657200000000000000000000000000000000000000000000000000000081525060050190506040516020818303038152906040526040518082805190602001908083835b602083101515610664578051825260208201915060208101905060208303925061063f565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006004600060405160200180807f70726f787953746f726167650000000000000000000000000000000000000000815250600c0190506040516020818303038152906040526040518082805190602001908083835b6020831015156107485780518252602082019150602081019050602083039250610723565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660001916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6107b96105e9565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156107f257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561082e57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1661084d6105e9565b73ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3610898816108e9565b50565b8060008190555050565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b806004600060405160200180807f6f776e657200000000000000000000000000000000000000000000000000000081525060050190506040516020818303038152906040526040518082805190602001908083835b602083101515610963578051825260208201915060208101905060208303925061093e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505600a165627a7a72305820368df5c2117c1085007145c86026a341844e18530505c16623ff200ec76604c30029