Forkchoice Ethereum Mainnet

Address Contract Verified

Address 0xd17b3c9784510E33cD5B87b490E79253BcD81e2E
Balance 0.552041 ETH ($1,084.58)
Nonce 1
Code Size 1077 bytes
Proxy EIP-1967 Proxy Implementation: 0xAf780dE0...1584
Indexed Transactions 0 (1 on-chain, 1.5% indexed)
External Etherscan · Sourcify

Contract Bytecode

1077 bytes
Copy Bytecode
0x6080604052600436106100435760003560e01c80635c60da1b1461005a578063704b6c0214610085578063d784d426146100a5578063f851a440146100c557610052565b36610052576100506100da565b005b6100506100da565b34801561006657600080fd5b5061006f61010a565b60405161007c9190610377565b60405180910390f35b34801561009157600080fd5b506100506100a0366004610349565b61012f565b3480156100b157600080fd5b506100506100c0366004610349565b6101d2565b3480156100d157600080fd5b5061006f6102c4565b60006100e461010a565b90503660008037600080366000845af43d6000803e808015610105573d6000f35b3d6000fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b60006101396102c4565b9050336001600160a01b0382161461016c5760405162461bcd60e51b8152600401610163906103e1565b60405180910390fd5b806001600160a01b0316826001600160a01b0316141561019e5760405162461bcd60e51b8152600401610163906103a5565b6001600160a01b0382166101c45760405162461bcd60e51b8152600401610163906103c3565b6101ce81836102e9565b5050565b6101da6102c4565b6001600160a01b0316336001600160a01b03161461020a5760405162461bcd60e51b8152600401610163906103e1565b61021261010a565b6001600160a01b0316816001600160a01b031614156102435760405162461bcd60e51b8152600401610163906103a5565b6001600160a01b0381166102695760405162461bcd60e51b8152600401610163906103c3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8190556040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103557f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f828260405161033d92919061038b565b60405180910390a15050565b60006020828403121561035a578081fd5b81356001600160a01b0381168114610370578182fd5b9392505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6020808252600490820152635058303160e01b604082015260600190565b602080825260049082015263282c181960e11b604082015260600190565b6020808252600490820152630505830360e41b60408201526060019056fea2646970667358221220d6c3294d68fd1d5446e9fba39af9bc11a18f86e1922c29f64dc70e4f0eef283064736f6c63430007060033

Verified Source Code Full Match

Compiler: v0.7.6+commit.7338295f EVM: istanbul Optimization: Yes (200 runs)
Proxy.sol 103 lines
// SPDX-License-Identifier: GPL-3.0-or-later
// Deployed with donations via Gitcoin GR9

pragma solidity 0.7.6;
pragma abicoder v2;

contract Proxy {
    // EIP1967
    // bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)
    bytes32 private constant adminPosition = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    // EIP1967
    // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)
    bytes32 private constant implementationPosition =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    // EIP1967
    event AdminChanged(address previousAdmin, address newAdmin);
    event Upgraded(address indexed implementation);

    constructor(address _implementation) {
        _setAdmin(address(0), msg.sender);
        setImplementation(_implementation);
    }

    function implementation() public view returns (address _implementation) {
        assembly {
            _implementation := sload(implementationPosition)
        }
    }

    function setImplementation(address _implementation) public {
        require(msg.sender == admin(), 'PX00');
        require(_implementation != implementation(), 'PX01');
        require(_implementation != address(0), 'PX02');

        assembly {
            sstore(implementationPosition, _implementation)
        }

        emit Upgraded(_implementation);
    }

    function admin() public view returns (address _admin) {
        assembly {
            _admin := sload(adminPosition)
        }
    }

    function setAdmin(address _admin) external {
        address currentAdmin = admin();
        require(msg.sender == currentAdmin, 'PX00');
        require(_admin != currentAdmin, 'PX01');
        require(_admin != address(0), 'PX02');

        _setAdmin(currentAdmin, _admin);
    }

    function _setAdmin(address currentAdmin, address newAdmin) internal {
        assembly {
            sstore(adminPosition, newAdmin)
        }

        emit AdminChanged(currentAdmin, newAdmin);
    }

    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internal call site, it will return directly to the external caller.
     */
    function _fallback() internal {
        address _implementation = implementation();

        assembly {
            // Copy msg.data.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            let result := delegatecall(gas(), _implementation, 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())
            }
        }
    }

    fallback() external payable {
        _fallback();
    }

    receive() external payable {
        _fallback();
    }
}

Read Contract

admin 0xf851a440 → address
implementation 0x5c60da1b → address

Write Contract 2 functions

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

setAdmin 0x704b6c02
address _admin
setImplementation 0xd784d426
address _implementation

Token Balances (5) $115,539.97

View Transfers →
TokenBalancePriceValue
WETH 33.5533 $1,963.80 $65,891.97
USDC 27965.4093 $1.0000 $27,965.33
WBTC 0.3 $67,024.00 $20,107.20
USDT 1575.5404 $1.0000 $1,575.47
UNI 0.0001 $3.74

Recent Transactions

This address has 1 on-chain transactions, but only 1.5% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →