Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xBe10aDcE8B6E3E02Db384E7FaDA5395DD113D8b3
Balance 0 ETH
Nonce 1
Code Size 593 bytes
Proxy EIP-1967 Proxy Implementation: 0xC3530358...1753
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

593 bytes
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063d784d426146100b7575b60006100356100cc565b90506001600160a01b0381163b6100935760405162461bcd60e51b815260206004820152601f60248201527f4e54503a463a4e4f5f434f44455f4f4e5f494d504c454d454e544154494f4e0060448201526064015b60405180910390fd5b3660008037600080366000845af43d6000803e8080156100b2573d6000f35b3d6000fd5b6100ca6100c53660046101c6565b610105565b005b60006101006100fc60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6101f6565b5490565b905090565b61010d610196565b6001600160a01b0316336001600160a01b0316146101605760405162461bcd60e51b815260206004820152601060248201526f272a281d29a49d2727aa2fa0a226a4a760811b604482015260640161008a565b61019361018e60017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd6101f6565b829055565b50565b60006101006100fc60017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61046101f6565b6000602082840312156101d857600080fd5b81356001600160a01b03811681146101ef57600080fd5b9392505050565b60008282101561021657634e487b7160e01b600052601160045260246000fd5b50039056fea264697066735822122080034735f4292f227400d1127744aebc7ce4661d4f515439dae76d4ac4a5436064736f6c63430008070033

Verified Source Code Full Match

Compiler: v0.8.7+commit.e28d00a7 EVM: london Optimization: Yes (200 runs)
NonTransparentProxy.sol 79 lines
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.7;

import { INonTransparentProxy } from "./interfaces/INonTransparentProxy.sol";

contract NonTransparentProxy is INonTransparentProxy {

    bytes32 private constant ADMIN_SLOT          = bytes32(uint256(keccak256("eip1967.proxy.admin"))          - 1);
    bytes32 private constant IMPLEMENTATION_SLOT = bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1);

    constructor(address admin_, address implementation_) {
        _setAddress(ADMIN_SLOT,          admin_);
        _setAddress(IMPLEMENTATION_SLOT, implementation_);
    }

    /**************************************************************************************************************************************/
    /*** Admin Functions                                                                                                                ***/
    /**************************************************************************************************************************************/

    function setImplementation(address newImplementation_) override external {
        require(msg.sender == _admin(), "NTP:SI:NOT_ADMIN");
        _setAddress(IMPLEMENTATION_SLOT, newImplementation_);
    }

    /**************************************************************************************************************************************/
    /*** View Functions                                                                                                                 ***/
    /**************************************************************************************************************************************/

    function _admin() internal view returns (address admin_) {
        admin_ = _getAddress(ADMIN_SLOT);
    }

    function _implementation() internal view returns (address implementation_) {
        implementation_ = _getAddress(IMPLEMENTATION_SLOT);
    }

    /**************************************************************************************************************************************/
    /*** Utility Functions                                                                                                              ***/
    /**************************************************************************************************************************************/

    function _setAddress(bytes32 slot_, address value_) private {
        assembly {
            sstore(slot_, value_)
        }
    }

    function _getAddress(bytes32 slot_) private view returns (address value_) {
        assembly {
            value_ := sload(slot_)
        }
    }

    /**************************************************************************************************************************************/
    /*** Fallback Function                                                                                                              ***/
    /**************************************************************************************************************************************/

    fallback() external {
        address implementation_ = _implementation();

        require(implementation_.code.length != 0, "NTP:F:NO_CODE_ON_IMPLEMENTATION");

        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())
            }
        }
    }

}
INonTransparentProxy.sol 12 lines
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.8.7;

interface INonTransparentProxy {

    /**
     *  @dev   Sets the implementation address.
     *  @param newImplementation_ The address to set the implementation to.
     */
    function setImplementation(address newImplementation_) external;

}

Write Contract 1 functions

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

setImplementation 0xd784d426
address newImplementation_

Recent Transactions

No transactions found for this address