Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x355C665e101B9DA58704A8fDDb5FeeF210eF20c0
Balance 0 ETH
Nonce 1
Code Size 2217 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2217 bytes
0x6080604052600436106100705760003560e01c80635c60da1b1161004e5780635c60da1b1461015e5780638f28397014610173578063d3b2f598146101a6578063f851a440146101bb57610070565b8063267822471461007a5780633659cfe6146100ab5780634f1ef286146100de575b6100786101d0565b005b34801561008657600080fd5b5061008f6101ea565b604080516001600160a01b039092168252519081900360200190f35b3480156100b757600080fd5b50610078600480360360208110156100ce57600080fd5b50356001600160a01b031661021b565b610078600480360360408110156100f457600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561011f57600080fd5b82018360208201111561013157600080fd5b8035906020019184600183028401116401000000008311171561015357600080fd5b509092509050610248565b34801561016a57600080fd5b5061008f61032d565b34801561017f57600080fd5b506100786004803603602081101561019657600080fd5b50356001600160a01b0316610358565b3480156101b257600080fd5b506100786104c5565b3480156101c757600080fd5b5061008f6105af565b6101d86105da565b6101e86101e36105e2565b610607565b565b60006101f461062b565b6001600160a01b0316336001600160a01b0316141561021857610215610650565b90505b90565b61022361062b565b6001600160a01b0316336001600160a01b031614156102455761024581610675565b50565b61025061062b565b6001600160a01b0316336001600160a01b031614156103285761027283610675565b6000306001600160a01b0316348484604051808383808284376040519201945060009350909150508083038185875af1925050503d80600081146102d2576040519150601f19603f3d011682016040523d82523d6000602084013e6102d7565b606091505b5050905080610326576040805162461bcd60e51b81526020600482015260166024820152753ab833b930b232aa37a0b73221b0b63616b2b93937b960511b604482015290519081900360640190fd5b505b505050565b600061033761062b565b6001600160a01b0316336001600160a01b03161415610218576102156105e2565b61036061062b565b6001600160a01b0316336001600160a01b03161415610245576001600160a01b0381166103be5760405162461bcd60e51b815260040180806020018281038252603681526020018061079e6036913960400191505060405180910390fd5b6103c661062b565b6001600160a01b0316816001600160a01b031614156104165760405162461bcd60e51b815260040180806020018281038252602e81526020018061080f602e913960400191505060405180910390fd5b61041e610650565b6001600160a01b0316816001600160a01b0316141561046e5760405162461bcd60e51b815260040180806020018281038252603881526020018061083d6038913960400191505060405180910390fd5b610477816106bd565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104a061062b565b604080516001600160a01b03928316815291841660208301528051918290030190a150565b60006104cf610650565b90506001600160a01b0381166105165760405162461bcd60e51b815260040180806020018281038252603681526020018061079e6036913960400191505060405180910390fd5b336001600160a01b0382161461055d5760405162461bcd60e51b815260040180806020018281038252602a815260200180610774602a913960400191505060405180910390fd5b610566816106e1565b61057060006106bd565b604080516001600160a01b038316815290517f54e4612788f90384e6843298d7854436f3a585b2c3831ab66abf1de63bfa6c2d9181900360200190a150565b60006105b961062b565b6001600160a01b0316336001600160a01b031614156102185761021561062b565b6101e86101e8565b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c35490565b3660008037600080366000845af43d6000803e808015610626573d6000f35b3d6000fd5b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b5490565b7f54ac2bd5363dfe95a011c5b5a153968d77d153d212e900afce8624fdad74525c5490565b61067e81610705565b604080516001600160a01b038316815290517fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b9181900360200190a150565b7f54ac2bd5363dfe95a011c5b5a153968d77d153d212e900afce8624fdad74525c55565b7f10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b55565b61070e8161076d565b6107495760405162461bcd60e51b815260040180806020018281038252603b8152602001806107d4603b913960400191505060405180910390fd5b7f7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c355565b3b15159056fe6d73672e73656e64657220616e64206e657741646d696e206d757374206265207468652073616d65202e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e747261637420616464726573735468652063757272656e7420616e64206e65772061646d696e2063616e6e6f74206265207468652073616d65202e43616e6e6f742073657420746865206e657741646d696e206f6620612070726f787920746f207468652073616d652061646472657373202ea265627a7a72315820a47883efa640de2cec1280c0b7588b12278fc1a6d8d02ea249b6155f274682d264736f6c63430005100032

Verified Source Code Partial Match

Compiler: v0.5.16+commit.9c3226ce EVM: istanbul Optimization: Yes (200 runs)
GOLDxProxy.sol 177 lines
pragma solidity 0.5.16;

contract Proxy {
    function () payable external {
        _fallback();
    }

    function _implementation() internal view returns (address);

    function _delegate(address implementation) internal {
        assembly {
            calldatacopy(0, 0, calldatasize)

            let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0)
            returndatacopy(0, 0, returndatasize)

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

    function _willFallback() internal {
    }

    function _fallback() internal {
        _willFallback();
        _delegate(_implementation());
    }
}

library AddressUtils {

    function isContract(address addr) internal view returns (bool) {
        uint256 size;

        assembly { size := extcodesize(addr) }
        return size > 0;
    }

}

contract UpgradeabilityProxy is Proxy {
    event Upgraded(address implementation);

    bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3;

    constructor(address _implementation) public {
        assert(IMPLEMENTATION_SLOT == keccak256("org.zeppelinos.proxy.implementation"));

        _setImplementation(_implementation);
    }

    function _implementation() internal view returns (address impl) {
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
            impl := sload(slot)
        }
    }

    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    function _setImplementation(address newImplementation) private {
        require(AddressUtils.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");

        bytes32 slot = IMPLEMENTATION_SLOT;

        assembly {
            sstore(slot, newImplementation)
        }
    }
}

contract AdminUpgradeabilityProxy is UpgradeabilityProxy {

    event AdminChanged(address previousAdmin, address newAdmin);
    event AdminUpdated(address newAdmin);

    bytes32 private constant ADMIN_SLOT = 0x10d6a54a4754c8869d6886b5f5d7fbfa5b4522237ea5c60d11bc4e7a1ff9390b;
    bytes32 private constant PENDING_ADMIN_SLOT = 0x54ac2bd5363dfe95a011c5b5a153968d77d153d212e900afce8624fdad74525c;

    modifier ifAdmin() {
        if (msg.sender == _admin()) {
            _;
        }/* else {
        _fallback();
        }*/
    }

    constructor(address _implementation) UpgradeabilityProxy(_implementation) public {
        assert(ADMIN_SLOT == keccak256("org.zeppelinos.proxy.admin"));

        _setAdmin(msg.sender);
    }

    function admin() external view ifAdmin returns (address) {
        return _admin();
    }

    function pendingAdmin() external view ifAdmin returns (address) {
        return _pendingAdmin();
    }

    function implementation() external view ifAdmin returns (address) {
        return _implementation();
    }

    function changeAdmin(address _newAdmin) external ifAdmin {
        require(_newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
        require(_newAdmin != _admin(), "The current and new admin cannot be the same .");
        require(_newAdmin != _pendingAdmin(), "Cannot set the newAdmin of a proxy to the same address .");
        _setPendingAdmin(_newAdmin);
        emit AdminChanged(_admin(), _newAdmin);
    }

    function updateAdmin() external {
        address _newAdmin = _pendingAdmin();
        require(_newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
        require(msg.sender == _newAdmin, "msg.sender and newAdmin must be the same .");
        _setAdmin(_newAdmin);
        _setPendingAdmin(address(0));
        emit AdminUpdated(_newAdmin);
    }

    function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeTo(newImplementation);
    }

    function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
        _upgradeTo(newImplementation);
        (bool success,) = address(this).call.value(msg.value)(data);
        require(success, "upgradeToAndCall-error");
    }

    function _admin() internal view returns (address adm) {
        bytes32 slot = ADMIN_SLOT;
        assembly {
            adm := sload(slot)
        }
    }

    function _pendingAdmin() internal view returns (address pendingAdm) {
        bytes32 slot = PENDING_ADMIN_SLOT;
        assembly {
            pendingAdm := sload(slot)
        }
    }

    function _setAdmin(address newAdmin) internal {
        bytes32 slot = ADMIN_SLOT;

        assembly {
            sstore(slot, newAdmin)
        }
    }

    function _setPendingAdmin(address pendingAdm) internal {
        bytes32 slot = PENDING_ADMIN_SLOT;

        assembly {
            sstore(slot, pendingAdm)
        }
    }

    function _willFallback() internal {
        // require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
        super._willFallback();
    }
}

contract GOLDxProxy is AdminUpgradeabilityProxy {
    constructor(address _implementation) public AdminUpgradeabilityProxy(_implementation) {
    }
}

Read Contract

admin 0xf851a440 → address
implementation 0x5c60da1b → address
pendingAdmin 0x26782247 → address

Write Contract 4 functions

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

changeAdmin 0x8f283970
address _newAdmin
updateAdmin 0xd3b2f598
No parameters
upgradeTo 0x3659cfe6
address newImplementation
upgradeToAndCall 0x4f1ef286
address newImplementation
bytes data

Recent Transactions

No transactions found for this address