Contract Address Details

0x468758926C796722D85BdeD792d1831F0839cAA6


Implementation: 0x9317850eb687de88273ee35aa00333761ae68871
EternalStorageProxy Last Balance Update: Block #23831928
Created by 0x48a1b2–21d69f at 0x520a73–1fbd25

Balance

0 POA

(@ /POA)

Fetching tokens...

Contract name:
EternalStorageProxy




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




Verified at
2018-10-24 15:41:04.804483Z

Contract source code

pragma solidity ^0.4.24;
interface IEternalStorageProxy {
function upgradeTo(address) external returns(bool);
}
/**
* @title EternalStorage
* @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 => bytes32) internal bytes32Storage;
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;
}
/**
* @title EternalStorageProxy
* @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, IEternalStorageProxy {
bytes32 internal constant OWNER = keccak256("owner");
bytes32 internal constant PROXY_STORAGE = keccak256("proxyStorage");
/**
* @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);
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
modifier onlyProxyStorage() {
require(msg.sender == getProxyStorage());
_;
}
modifier onlyOwner() {
require(msg.sender == getOwner());
_;
}
constructor(address _proxyStorage, address _implementationAddress) public {
require(_implementationAddress != address(0));
if (_proxyStorage != address(0)) {
_setProxyStorage(_proxyStorage);
} else {
_setProxyStorage(address(this));
}
_implementation = _implementationAddress;
_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() external {
address _impl = _implementation;
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
function getOwner() public view returns(address) {
return addressStorage[OWNER];
}
function getProxyStorage() public view returns(address) {
return addressStorage[PROXY_STORAGE];
}
/**
* @dev Tells the address of the current implementation
* @return address of the current implementation
*/
function implementation() public view returns(address) {
return _implementation;
}
/**
* @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);
}
/**
* @dev Allows ProxyStorage contract 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 (_implementation == newImplementation) return false;
uint256 newVersion = _version + 1;
if (newVersion <= _version) return false;
_version = newVersion;
_implementation = newImplementation;
emit Upgraded(newVersion, newImplementation);
return true;
}
/**
* @dev Tells the version number of the current implementation
* @return uint representing the number of the current version
*/
function version() public view returns(uint256) {
return _version;
}
function _setProxyStorage(address _proxyStorage) private {
addressStorage[PROXY_STORAGE] = _proxyStorage;
}
function _setOwner(address _owner) private {
addressStorage[OWNER] = _owner;
}
}

Contract ABI

[{"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":"uint256","name":""}],"name":"version","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"implementation","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":"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":"_implementationAddress"}]},{"type":"fallback","stateMutability":"nonpayable","payable":false},{"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 Creation Code

0x608060405234801561001057600080fd5b50604051604080610636833981016040528051602090910151600160a060020a038116151561003e57600080fd5b600160a060020a038216156100645761005f826401000000006100aa810204565b610076565b610076306401000000006100aa810204565b60018054600160a060020a031916600160a060020a0383161790556100a333640100000000610108810204565b5050610166565b604080517f70726f787953746f7261676500000000000000000000000000000000000000008152815190819003600c01902060009081526004602052208054600160a060020a03909216600160a060020a0319909216919091179055565b604080517f6f776e65720000000000000000000000000000000000000000000000000000008152815190819003600501902060009081526004602052208054600160a060020a03909216600160a060020a0319909216919091179055565b6104c1806101756000396000f3006080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633659cfe681146100cb57806354fd4d50146101005780635c60da1b14610127578063715018a614610158578063893d20e81461016f578063ec15a5e614610184578063f2fde38b14610199575b34801561008e57600080fd5b50600154600160a060020a03168015156100a757600080fd5b3660008037600080366000845af43d6000803e8080156100c6573d6000f35b3d6000fd5b3480156100d757600080fd5b506100ec600160a060020a03600435166101ba565b604080519115158252519081900360200190f35b34801561010c57600080fd5b50610115610298565b60408051918252519081900360200190f35b34801561013357600080fd5b5061013c61029e565b60408051600160a060020a039092168252519081900360200190f35b34801561016457600080fd5b5061016d6102ad565b005b34801561017b57600080fd5b5061013c610312565b34801561019057600080fd5b5061013c61035c565b3480156101a557600080fd5b5061016d600160a060020a03600435166103a6565b6000806101c561035c565b600160a060020a031633146101d957600080fd5b600160a060020a03831615156101f25760009150610292565b600154600160a060020a03848116911614156102115760009150610292565b50600054600181019081116102295760009150610292565b600081905560018054600160a060020a03851673ffffffffffffffffffffffffffffffffffffffff1990911681179091556040805183815290517f4289d6195cf3c2d2174adf98d0e19d4d2d08887995b99cb7b100e7ffe795820e9181900360200190a2600191505b50919050565b60005490565b600154600160a060020a031690565b6102b5610312565b600160a060020a031633146102c957600080fd5b6102d1610312565b600160a060020a03167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a2610310600061042a565b565b604080517f6f776e657200000000000000000000000000000000000000000000000000000081528151908190036005019020600090815260046020522054600160a060020a031690565b604080517f70726f787953746f7261676500000000000000000000000000000000000000008152815190819003600c019020600090815260046020522054600160a060020a031690565b6103ae610312565b600160a060020a031633146103c257600080fd5b600160a060020a03811615156103d757600080fd5b80600160a060020a03166103e9610312565b600160a060020a03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36104278161042a565b50565b604080517f6f776e65720000000000000000000000000000000000000000000000000000008152815190819003600501902060009081526004602052208054600160a060020a0390921673ffffffffffffffffffffffffffffffffffffffff199092169190911790555600a165627a7a72305820cf4bae06183caf723f3415bb3b645eae9e37d803a7dea54461d15f1ea692c4f4002900000000000000000000000082716162cd02a2c82ad4a65ccf84e22075b132960000000000000000000000009317850eb687de88273ee35aa00333761ae68871

Deployed ByteCode

0x6080604052600436106100825763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633659cfe681146100cb57806354fd4d50146101005780635c60da1b14610127578063715018a614610158578063893d20e81461016f578063ec15a5e614610184578063f2fde38b14610199575b34801561008e57600080fd5b50600154600160a060020a03168015156100a757600080fd5b3660008037600080366000845af43d6000803e8080156100c6573d6000f35b3d6000fd5b3480156100d757600080fd5b506100ec600160a060020a03600435166101ba565b604080519115158252519081900360200190f35b34801561010c57600080fd5b50610115610298565b60408051918252519081900360200190f35b34801561013357600080fd5b5061013c61029e565b60408051600160a060020a039092168252519081900360200190f35b34801561016457600080fd5b5061016d6102ad565b005b34801561017b57600080fd5b5061013c610312565b34801561019057600080fd5b5061013c61035c565b3480156101a557600080fd5b5061016d600160a060020a03600435166103a6565b6000806101c561035c565b600160a060020a031633146101d957600080fd5b600160a060020a03831615156101f25760009150610292565b600154600160a060020a03848116911614156102115760009150610292565b50600054600181019081116102295760009150610292565b600081905560018054600160a060020a03851673ffffffffffffffffffffffffffffffffffffffff1990911681179091556040805183815290517f4289d6195cf3c2d2174adf98d0e19d4d2d08887995b99cb7b100e7ffe795820e9181900360200190a2600191505b50919050565b60005490565b600154600160a060020a031690565b6102b5610312565b600160a060020a031633146102c957600080fd5b6102d1610312565b600160a060020a03167ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482060405160405180910390a2610310600061042a565b565b604080517f6f776e657200000000000000000000000000000000000000000000000000000081528151908190036005019020600090815260046020522054600160a060020a031690565b604080517f70726f787953746f7261676500000000000000000000000000000000000000008152815190819003600c019020600090815260046020522054600160a060020a031690565b6103ae610312565b600160a060020a031633146103c257600080fd5b600160a060020a03811615156103d757600080fd5b80600160a060020a03166103e9610312565b600160a060020a03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36104278161042a565b50565b604080517f6f776e65720000000000000000000000000000000000000000000000000000008152815190819003600501902060009081526004602052208054600160a060020a0390921673ffffffffffffffffffffffffffffffffffffffff199092169190911790555600a165627a7a72305820cf4bae06183caf723f3415bb3b645eae9e37d803a7dea54461d15f1ea692c4f40029