ETH Price: $3,481.47 (+2.66%)

Contract

0x405c3D0d1A35dF85c57d1c34F308023567763d0f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
107342142020-08-26 5:36:301577 days ago1598420190  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x17B09b22...cadC29458
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
EternalStorageProxy

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-08-23
*/

// File: contracts/upgradeability/EternalStorage.sol

pragma solidity 0.4.24;

/**
 * @title EternalStorage
 * @dev This contract holds all the necessary state variables to carry out the storage of any contract.
 */
contract EternalStorage {

    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;
}

// File: contracts/upgradeability/Proxy.sol

pragma solidity 0.4.24;

/**
 * @title Proxy
 * @dev Gives the possibility to delegate any call to a foreign implementation.
 */
contract Proxy {

  /**
  * @dev Tells the address of the implementation where every call will be delegated.
  * @return address of the implementation to which it will be delegated
  */
    function implementation() public view returns (address);

    function setImplementation(address _newImplementation) external;

  /**
  * @dev Fallback function allowing to perform a delegatecall to the given implementation.
  * This function will return whatever the implementation call returns
  */
    function () payable public {
        address _impl = implementation();
        require(_impl != address(0));

        address _innerImpl;
        bytes4 sig;
        address thisAddress = address(this);
        if (_impl.call(0x5c60da1b)) { // bytes(keccak256("implementation()"))
            _innerImpl = Proxy(_impl).implementation();
            this.setImplementation(_innerImpl);
            sig = 0xd784d426; // bytes4(keccak256("setImplementation(address)"))
        }

        assembly {
            /*
                0x40 is the "free memory slot", meaning a pointer to next slot of empty memory. mload(0x40)
                loads the data in the free memory slot, so `ptr` is a pointer to the next slot of empty
                memory. It's needed because we're going to write the return data of delegatecall to the
                free memory slot.
            */
            let ptr := mload(0x40)
            /*
                `calldatacopy` is copy calldatasize bytes from calldata
                First argument is the destination to which data is copied(ptr)
                Second argument specifies the start position of the copied data.
                    Since calldata is sort of its own unique location in memory,
                    0 doesn't refer to 0 in memory or 0 in storage - it just refers to the zeroth byte of calldata.
                    That's always going to be the zeroth byte of the function selector.
                Third argument, calldatasize, specifies how much data will be copied.
                    calldata is naturally calldatasize bytes long (same thing as msg.data.length)
            */
            calldatacopy(ptr, 0, calldatasize)
            /*
                delegatecall params explained:
                gas: the amount of gas to provide for the call. `gas` is an Opcode that gives
                    us the amount of gas still available to execution

                _impl: address of the contract to delegate to

                ptr: to pass copied data

                calldatasize: loads the size of `bytes memory data`, same as msg.data.length

                0, 0: These are for the `out` and `outsize` params. Because the output could be dynamic,
                        these are set to 0, 0 so the output data will not be written to memory. The output
                        data will be read using `returndatasize` and `returdatacopy` instead.

                result: This will be 0 if the call fails and 1 if it succeeds
            */
            let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)
            /*

            */
            /*
                ptr current points to the value stored at 0x40,
                because we assigned it like ptr := mload(0x40).
                Because we use 0x40 as a free memory pointer,
                we want to make sure that the next time we want to allocate memory,
                we aren't overwriting anything important.
                So, by adding ptr and returndatasize,
                we get a memory location beyond the end of the data we will be copying to ptr.
                We place this in at 0x40, and any reads from 0x40 will now read from free memory
            */
            mstore(0x40, add(ptr, returndatasize))
            /*
                `returndatacopy` is an Opcode that copies the last return data to a slot. `ptr` is the
                    slot it will copy to, 0 means copy from the beginning of the return data, and size is
                    the amount of data to copy.
                `returndatasize` is an Opcode that gives us the size of the last return data. In this case, that is the size of the data returned from delegatecall
            */
            returndatacopy(ptr, 0, returndatasize)

            let retdatasize := returndatasize

            switch sig
            case 0 {}
            default {
                let x := mload(0x40)
                mstore(x, sig)
                mstore(add(x, 0x04), _impl)
                let success := call(gas, thisAddress, 0, x, 0x24, x, 0x0)
            }

            /*
                if `result` is 0, revert.
                if `result` is 1, return `size` amount of data from `ptr`. This is the data that was
                copied to `ptr` from the delegatecall return data
            */
            switch result
            case 0 { revert(ptr, retdatasize) }
            default { return(ptr, retdatasize) }
        }
    }
}

// File: contracts/upgradeability/UpgradeabilityStorage.sol

pragma solidity 0.4.24;

/**
 * @title UpgradeabilityStorage
 * @dev This contract holds all the necessary state variables to support the upgrade functionality
 */
contract UpgradeabilityStorage {
    // Version name of the current implementation
    uint256 internal _version;

    // Address of the current implementation
    address internal _implementation;

    /**
    * @dev Tells the version name of the current implementation
    * @return string representing the name of the current version
    */
    function version() public view returns (uint256) {
        return _version;
    }

    /**
    * @dev Tells the address of the current implementation
    * @return address of the current implementation
    */
    function implementation() public view returns (address) {
        return _implementation;
    }

    function setImplementation(address _newImplementation) external {
        require(msg.sender == address(this));
        _implementation = _newImplementation;
    }
}

// File: contracts/upgradeability/UpgradeabilityProxy.sol

pragma solidity 0.4.24;



/**
 * @title UpgradeabilityProxy
 * @dev This contract represents a proxy where the implementation address to which it will delegate can be upgraded
 */
contract UpgradeabilityProxy is Proxy, UpgradeabilityStorage {
    /**
    * @dev This event will be emitted every time the implementation gets upgraded
    * @param version representing the version name of the upgraded implementation
    * @param implementation representing the address of the upgraded implementation
    */
    event Upgraded(uint256 version, address indexed implementation);

    /**
    * @dev Upgrades the implementation address
    * @param version representing the version name of the new implementation to be set
    * @param implementation representing the address of the new implementation to be set
    */
    function _upgradeTo(uint256 version, address implementation) internal {
        require(_implementation != implementation);
        require(version > _version);
        _version = version;
        _implementation = implementation;
        emit Upgraded(version, implementation);
    }
}

// File: contracts/upgradeability/UpgradeabilityOwnerStorage.sol

pragma solidity 0.4.24;

/**
 * @title UpgradeabilityOwnerStorage
 * @dev This contract keeps track of the upgradeability owner
 */
contract UpgradeabilityOwnerStorage {
    // Owner of the contract
    address private _upgradeabilityOwner;

    /**
    * @dev Tells the address of the owner
    * @return the address of the owner
    */
    function upgradeabilityOwner() public view returns (address) {
        return _upgradeabilityOwner;
    }

    /**
    * @dev Sets the address of the owner
    */
    function setUpgradeabilityOwner(address newUpgradeabilityOwner) internal {
        _upgradeabilityOwner = newUpgradeabilityOwner;
    }
}

// File: contracts/upgradeability/OwnedUpgradeabilityProxy.sol

pragma solidity 0.4.24;



/**
 * @title OwnedUpgradeabilityProxy
 * @dev This contract combines an upgradeability proxy with basic authorization control functionalities
 */
contract OwnedUpgradeabilityProxy is UpgradeabilityOwnerStorage, UpgradeabilityProxy {
  /**
  * @dev Event to show ownership has been transferred
  * @param previousOwner representing the address of the previous owner
  * @param newOwner representing the address of the new owner
  */
    event ProxyOwnershipTransferred(address previousOwner, address newOwner);

    /**
    * @dev the constructor sets the original owner of the contract to the sender account.
    */
    constructor() public {
        setUpgradeabilityOwner(msg.sender);
    }

    /**
    * @dev Throws if called by any account other than the owner.
    */
    modifier onlyProxyOwner() {
        require(msg.sender == proxyOwner());
        _;
    }

    /**
    * @dev Tells the address of the proxy owner
    * @return the address of the proxy owner
    */
    function proxyOwner() public view returns (address) {
        return upgradeabilityOwner();
    }

    /**
    * @dev Allows the current owner to transfer control of the contract to a newOwner.
    * @param newOwner The address to transfer ownership to.
    */
    function transferProxyOwnership(address newOwner) public onlyProxyOwner {
        require(newOwner != address(0));
        emit ProxyOwnershipTransferred(proxyOwner(), newOwner);
        setUpgradeabilityOwner(newOwner);
    }

    /**
    * @dev Allows the upgradeability owner to upgrade the current version of the proxy.
    * @param version representing the version name of the new implementation to be set.
    * @param implementation representing the address of the new implementation to be set.
    */
    function upgradeTo(uint256 version, address implementation) public onlyProxyOwner {
        _upgradeTo(version, implementation);
    }

    /**
    * @dev Allows the upgradeability owner to upgrade the current version of the proxy and call the new implementation
    * to initialize whatever is needed through a low level call.
    * @param version representing the version name of the new implementation to be set.
    * @param implementation representing the address of the new implementation to be set.
    * @param data represents the msg.data to bet sent in the low level call. This parameter may include the function
    * signature of the implementation to be called with the needed payload
    */
    function upgradeToAndCall(uint256 version, address implementation, bytes data) payable public onlyProxyOwner {
        upgradeTo(version, implementation);
        require(address(this).call.value(msg.value)(data));
    }
}

// File: contracts/upgradeability/EternalStorageProxy.sol

pragma solidity 0.4.24;



/**
 * @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 basic
 * authorization control functionalities
 */
contract EternalStorageProxy is OwnedUpgradeabilityProxy, EternalStorage {}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"version","type":"uint256"},{"name":"implementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"upgradeabilityOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"version","type":"uint256"},{"name":"implementation","type":"address"},{"name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_newImplementation","type":"address"}],"name":"setImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferProxyOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"ProxyOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"version","type":"uint256"},{"indexed":true,"name":"implementation","type":"address"}],"name":"Upgraded","type":"event"}]

Deployed Bytecode

0x6080604052600436106100745763ffffffff60e060020a600035041663025313a2811461022e5780633ad06d161461025f57806354fd4d50146102855780635c60da1b146102ac5780636fde8202146102c1578063a9c45fcb146102d6578063d784d42614610332578063f1739cae14610353575b600080600080610082610374565b9350600160a060020a038416151561009957600080fd5b30905083600160a060020a0316635c60da1b6040518163ffffffff1660e060020a0281526004016000604051808303816000875af192505050156101e15783600160a060020a0316635c60da1b6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561011557600080fd5b505af1158015610129573d6000803e3d6000fd5b505050506040513d602081101561013f57600080fd5b5051604080517fd784d426000000000000000000000000000000000000000000000000000000008152600160a060020a03831660048201529051919450309163d784d4269160248082019260009290919082900301818387803b1580156101a557600080fd5b505af11580156101b9573d6000803e3d6000fd5b507fd784d4260000000000000000000000000000000000000000000000000000000094505050505b60405136600082376000803683885af43d82016040523d6000833e3d84801561021e5760405186815288600482015260008160248360008a5af150505b5081801561022a578184f35b8184fd5b34801561023a57600080fd5b50610243610383565b60408051600160a060020a039092168252519081900360200190f35b34801561026b57600080fd5b50610283600435600160a060020a0360243516610392565b005b34801561029157600080fd5b5061029a6103bc565b60408051918252519081900360200190f35b3480156102b857600080fd5b50610243610374565b3480156102cd57600080fd5b506102436103c2565b604080516020600460443581810135601f81018490048402850184019095528484526102839482359460248035600160a060020a0316953695946064949201919081908401838280828437509497506103d19650505050505050565b34801561033e57600080fd5b50610283600160a060020a036004351661047f565b34801561035f57600080fd5b50610283600160a060020a03600435166104ba565b600254600160a060020a031690565b600061038d6103c2565b905090565b61039a610383565b600160a060020a031633146103ae57600080fd5b6103b88282610542565b5050565b60015490565b600054600160a060020a031690565b6103d9610383565b600160a060020a031633146103ed57600080fd5b6103f78383610392565b30600160a060020a0316348260405180828051906020019080838360005b8381101561042d578181015183820152602001610415565b50505050905090810190601f16801561045a5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af192505050151561047a57600080fd5b505050565b33301461048b57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6104c2610383565b600160a060020a031633146104d657600080fd5b600160a060020a03811615156104eb57600080fd5b7f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd9610514610383565b60408051600160a060020a03928316815291841660208301528051918290030190a161053f816105d3565b50565b600254600160a060020a038281169116141561055d57600080fd5b600154821161056b57600080fd5b600182905560028054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff1990911681179091556040805184815290517f4289d6195cf3c2d2174adf98d0e19d4d2d08887995b99cb7b100e7ffe795820e9181900360200190a25050565b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820fa8f539b6dd35da8aeec0aa8d25319983a97bd200377ca3a8ae10006d2a85a5c0029

Deployed Bytecode Sourcemap

12585:75:0:-;;;;;;;;;-1:-1:-1;;;12585:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1756:13;1840:18;1869:10;1890:19;1772:16;:14;:16::i;:::-;1756:32;-1:-1:-1;;;;;;1807:19:0;;;;1799:28;;;;;;1920:4;1890:35;;1940:5;-1:-1:-1;;;;;1940:10:0;1951;1940:22;;;;;-1:-1:-1;;;1940:22:0;;;;;;;;;;;;;;;;;;;;1936:268;;;2038:5;-1:-1:-1;;;;;2032:27:0;;:29;;;;;-1:-1:-1;;;2032:29:0;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2032:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2032:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2032:29:0;2076:34;;;;;;-1:-1:-1;;;;;2076:34:0;;;;;;;;2032:29;;-1:-1:-1;2076:4:0;;:22;;:34;;;;;-1:-1:-1;;2076:34:0;;;;;;;;-1:-1:-1;2076:4:0;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;2076:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;2125:16:0;;-1:-1:-1;;;;1936:268:0;2643:4;2637:11;3424:12;3421:1;3416:3;3403:34;4355:1;4352;4338:12;4333:3;4326:5;4321:3;4308:49;5045:14;5040:3;5036:24;5030:4;5023:38;5555:14;5552:1;5547:3;5532:38;5605:14;5642:3;5659:9;;;;5724:4;5718:11;5757:3;5754:1;5747:14;5800:5;5793:4;5790:1;5786:12;5779:27;5877:3;5874:1;5868:4;5865:1;5862;5849:11;5844:3;5839:42;5690:206;;5659:9;-1:-1:-1;6163:6:0;6183:35;;;;6254:11;6249:3;6242:24;6183:35;6204:11;6199:3;6192:24;10434:99;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10434:99:0;;;;;;;;-1:-1:-1;;;;;10434:99:0;;;;;;;;;;;;;;11231:136;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;11231:136:0;;;-1:-1:-1;;;;;11231:136:0;;;;;;;6885:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6885:83:0;;;;;;;;;;;;;;;;;;;;7106:97;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7106:97:0;;;;9006:107;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9006:107:0;;;;11952:223;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11952:223:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11952:223:0;;-1:-1:-1;11952:223:0;;-1:-1:-1;;;;;;;11952:223:0;7211:166;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;7211:166:0;-1:-1:-1;;;;;7211:166:0;;;;;10707:230;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;10707:230:0;-1:-1:-1;;;;;10707:230:0;;;;;7106:97;7180:15;;-1:-1:-1;;;;;7180:15:0;7106:97;:::o;10434:99::-;10477:7;10504:21;:19;:21::i;:::-;10497:28;;10434:99;:::o;11231:136::-;10281:12;:10;:12::i;:::-;-1:-1:-1;;;;;10267:26:0;:10;:26;10259:35;;;;;;11324;11335:7;11344:14;11324:10;:35::i;:::-;11231:136;;:::o;6885:83::-;6952:8;;6885:83;:::o;9006:107::-;9058:7;9085:20;-1:-1:-1;;;;;9085:20:0;9006:107;:::o;11952:223::-;10281:12;:10;:12::i;:::-;-1:-1:-1;;;;;10267:26:0;:10;:26;10259:35;;;;;;12072:34;12082:7;12091:14;12072:9;:34::i;:::-;12133:4;-1:-1:-1;;;;;12125:18:0;12150:9;12161:4;12125:41;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;12125:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12117:50;;;;;;;;11952:223;;;:::o;7211:166::-;7294:10;7316:4;7294:27;7286:36;;;;;;7333:15;:36;;-1:-1:-1;;7333:36:0;-1:-1:-1;;;;;7333:36:0;;;;;;;;;;7211:166::o;10707:230::-;10281:12;:10;:12::i;:::-;-1:-1:-1;;;;;10267:26:0;:10;:26;10259:35;;;;;;-1:-1:-1;;;;;10798:22:0;;;;10790:31;;;;;;10837:49;10863:12;:10;:12::i;:::-;10837:49;;;-1:-1:-1;;;;;10837:49:0;;;;;;;;;;;;;;;;;;;;;10897:32;10920:8;10897:22;:32::i;:::-;10707:230;:::o;8285:290::-;8374:15;;-1:-1:-1;;;;;8374:33:0;;;:15;;:33;;8366:42;;;;;;8437:8;;8427:18;;8419:27;;;;;;8457:8;:18;;;8486:15;:32;;-1:-1:-1;;;;;8486:32:0;;-1:-1:-1;;8486:32:0;;;;;;;;8534:33;;;;;;;;;;;;;;;;;8285:290;;:::o;9180:137::-;9264:20;:45;;-1:-1:-1;;9264:45:0;-1:-1:-1;;;;;9264:45:0;;;;;;;;;;9180:137::o

Swarm Source

bzzr://fa8f539b6dd35da8aeec0aa8d25319983a97bd200377ca3a8ae10006d2a85a5c

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.