Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x77887Bee75eAeC95b1F2889c069615b131e7dbc8
Balance 0 ETH
Nonce 1
Code Size 788 bytes
Last Active
Indexed Transactions 69 (10,702,18010,732,255)
Gas Used (indexed) 2,230,965
External Etherscan · Sourcify

Contract Bytecode

788 bytes
0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632bc38f78146100bb5780635c60da1b1461018a575b60006100566101e1565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561009457600080fd5b60405136600082376000803683855af43d806000843e81600081146100b7578184f35b8184fd5b3480156100c757600080fd5b50610188600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061020b565b005b34801561019657600080fd5b5061019f6101e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561026657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156102a257600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505600a165627a7a72305820266e2105873a82d4af9bbdbebef4389e828d87a65cfb900790bcdc8c8c6bf18c0029

Verified Source Code Partial Match

Compiler: v0.4.24+commit.e67f0147 EVM: byzantium Optimization: No
UpgradeabilityProxy.sol 124 lines
pragma solidity ^0.4.24;

/**
 * @title IRegistry
 * @dev This contract represents the interface of a registry contract
 */
interface ITwoKeySingletonesRegistry {

    /**
    * @dev This event will be emitted every time a new proxy is created
    * @param proxy representing the address of the proxy created
    */
    event ProxyCreated(address proxy);


    /**
    * @dev This event will be emitted every time a new implementation is registered
    * @param version representing the version name of the registered implementation
    * @param implementation representing the address of the registered implementation
    * @param contractName is the name of the contract we added new version
    */
    event VersionAdded(string version, address implementation, string contractName);

    /**
    * @dev Registers a new version with its implementation address
    * @param version representing the version name of the new implementation to be registered
    * @param implementation representing the address of the new implementation to be registered
    */
    function addVersion(string _contractName, string version, address implementation) public;

    /**
    * @dev Tells the address of the implementation for a given version
    * @param _contractName is the name of the contract we're querying
    * @param version to query the implementation of
    * @return address of the implementation registered for the given version
    */
    function getVersion(string _contractName, string version) public view returns (address);
}


/**
 * @title Proxy
 */
contract Proxy {


    // Gives the possibility to delegate any call to a foreign implementation.


    /**
    * @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);

    /**
    * @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));

        assembly {
            let ptr := mload(0x40)
            calldatacopy(ptr, 0, calldatasize)
            let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)
            let size := returndatasize
            returndatacopy(ptr, 0, size)

            switch result
            case 0 { revert(ptr, size) }
            default { return(ptr, size) }
        }
    }
}


/**
 * @author Nikola Madjarevic
 * @dev This contract holds all the necessary state variables to support the upgrade functionality
 */
contract UpgradeabilityStorage {
    // Versions registry
    ITwoKeySingletonesRegistry internal registry;

    // Address of the current implementation
    address internal _implementation;

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

/**
 * @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 {

    //TODO: Add event through event source whenever someone calls upgradeTo
    /**
    * @dev Constructor function
    */
    constructor (string _contractName, string _version) public {
        registry = ITwoKeySingletonesRegistry(msg.sender);
        _implementation = registry.getVersion(_contractName, _version);
    }

    /**
    * @dev Upgrades the implementation to the requested version
    * @param _version representing the version name of the new implementation to be set
    */
    function upgradeTo(string _contractName, string _version, address _impl) public {
        require(msg.sender == address(registry));
        require(_impl != address(0));
        _implementation = _impl;
    }

}

Read Contract

implementation 0x5c60da1b → address

Write Contract 1 functions

These functions modify contract state and require a wallet transaction to execute.

upgradeTo 0x2bc38f78
string _contractName
string _version
address _impl

Recent Transactions

CSV View All 69 Transactions →
|
Hash Method Block Age From/To Value Txn Fee Type
0xfabdfe87...be4ab8 0xd23d1afb 10,732,255 IN 0x01dCFc4c...5c3a 0 ETH 0.01898032 ETH Legacy
0xb4c6c3ac...57b8b2 0xd23d1afb 10,731,446 IN 0xFC7DBD7e...8822 0 ETH 0.02536043 ETH Legacy
0xe1e6d973...20b9f3 0xd23d1afb 10,730,594 IN 0xF8F0E170...6bc1 0 ETH 0.03099393 ETH Legacy
0x40154260...af9bc4 0xd23d1afb 10,729,777 IN 0xa03d05fC...9541 0 ETH 0.02505297 ETH Legacy
0xd23ffaf5...423d14 0xd23d1afb 10,728,850 IN 0xD82F134F...3095 0 ETH 0.02440350 ETH Legacy
0x28dfbde0...26e7e6 0xd23d1afb 10,728,181 IN 0xc2a1ad99...4F80 0 ETH 0.02456941 ETH Legacy
0xdf3c159c...0ac3c1 0xd23d1afb 10,704,611 IN 0xed29f1aa...f479 0 ETH 0.04732396 ETH Legacy
0x02d05872...b869e7 0xd23d1afb 10,703,796 IN 0x3181dBb6...19D7 0 ETH 0.04443826 ETH Legacy
0xadacafdc...ce40a3 0xd23d1afb 10,702,983 IN 0x771Df29D...182a 0 ETH 0.04086663 ETH Legacy
0x23bdfd3d...c21334 0xd23d1afb 10,702,180 IN 0x9eE19F84...e1a3 0 ETH 0.03657278 ETH Legacy