POL Price: $0.697191 (-0.91%)
Gas: 31 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize Proxy...288302842022-05-27 11:29:03923 days ago1653650943IN
0x1432c355...643cbf7a2
0 POL0.0742589393.12633129

Latest 1 internal transaction

Parent Transaction Hash Block From To
288293222022-05-27 10:55:59923 days ago1653648959  Contract Creation0 POL
Loading...
Loading

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

Contract Name:
PenroseProxy

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : PenroseProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;

/**
 * @title Penrose governance killable proxy
 * @author Penrose
 * @notice EIP-1967 upgradeable proxy with the ability to kill governance and render the contract immutable
 */
contract PenroseProxy {
    bytes32 constant IMPLEMENTATION_SLOT =
        0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; // keccak256('eip1967.proxy.implementation')
    bytes32 constant GOVERNANCE_SLOT =
        0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; // keccak256('eip1967.proxy.admin')
    bytes32 constant INITIALIZED_SLOT =
        0x834ce84547018237034401a09067277cdcbe7bbf7d7d30f6b382b0a102b7b4a3; // keccak256('eip1967.proxy.initialized')

    /**
     * @notice Initialize governance (this can only be done once)
     * @param _governanceAddress New governance address
     */
    function initialize(address _governanceAddress) public {
        bool initialized;
        assembly {
            initialized := sload(INITIALIZED_SLOT)
            if eq(initialized, 1) {
                revert(0, 0)
            }
            sstore(INITIALIZED_SLOT, 1)
            sstore(GOVERNANCE_SLOT, _governanceAddress)
        }
    }

    /**
     * @notice Detect whether or not governance is killed
     * @return Return true if governance is killed, false if not
     * @dev If governance is killed this contract becomes immutable
     */
    function governanceIsKilled() external view returns (bool) {
        return governanceAddress() == address(0);
    }

    /**
     * @notice Kill governance, making this contract immutable
     * @dev Only governance can kil governance
     */
    function killGovernance() external {
        require(msg.sender == governanceAddress(), "Only governance");
        updateGovernanceAddress(address(0));
    }

    /**
     * @notice Update implementation address
     * @param _implementationAddress Address of the new implementation
     * @dev Only governance can update implementation
     */
    function updateImplementationAddress(address _implementationAddress)
        external
    {
        require(msg.sender == governanceAddress(), "Only governance");
        assembly {
            sstore(IMPLEMENTATION_SLOT, _implementationAddress)
        }
    }

    /**
     * @notice Update governance address
     * @param _governanceAddress New governance address
     * @dev Only governance can update governance
     */
    function updateGovernanceAddress(address _governanceAddress) public {
        require(msg.sender == governanceAddress(), "Only governance");
        assembly {
            sstore(GOVERNANCE_SLOT, _governanceAddress)
        }
    }

    /**
     * @notice Fetch the current implementation address
     * @return _implementationAddress Returns the current implementation address
     */
    function implementationAddress()
        external
        view
        returns (address _implementationAddress)
    {
        assembly {
            _implementationAddress := sload(IMPLEMENTATION_SLOT)
        }
    }

    /**
     * @notice Fetch current governance address
     * @return _governanceAddress Returns current governance address
     */
    function governanceAddress()
        public
        view
        returns (address _governanceAddress)
    {
        assembly {
            _governanceAddress := sload(GOVERNANCE_SLOT)
        }
    }

    /**
     * @notice Delegatecall fallback proxy
     */
    fallback() external {
        assembly {
            let contractLogic := sload(IMPLEMENTATION_SLOT)
            calldatacopy(0x0, 0x0, calldatasize())
            let success := delegatecall(
                gas(),
                contractLogic,
                0x0,
                calldatasize(),
                0,
                0
            )
            let returnDataSize := returndatasize()
            returndatacopy(0, 0, returnDataSize)
            switch success
            case 0 {
                revert(0, returnDataSize)
            }
            default {
                return(0, returnDataSize)
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"governanceAddress","outputs":[{"internalType":"address","name":"_governanceAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governanceIsKilled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementationAddress","outputs":[{"internalType":"address","name":"_implementationAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_governanceAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"killGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governanceAddress","type":"address"}],"name":"updateGovernanceAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_implementationAddress","type":"address"}],"name":"updateImplementationAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063b90d89301161005b578063b90d893014610116578063b97a231914610129578063c4d66de814610150578063eb5ee83a146101635761007d565b8063179781c4146100c6578063654ea5e7146100e3578063795053d3146100ed575b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af490503d806000803e8180156100c157816000f35b816000fd5b6100ce610176565b60405190151581526020015b60405180910390f35b6100eb61019e565b005b60008051602061036a833981519152545b6040516001600160a01b0390911681526020016100da565b6100eb610124366004610310565b6101f3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546100fe565b6100eb61015e366004610310565b610245565b6100eb610171366004610310565b6102ac565b60008061018f60008051602061036a8339815191525490565b6001600160a01b031614905090565b60008051602061036a833981519152546001600160a01b0316336001600160a01b0316146101e75760405162461bcd60e51b81526004016101de90610340565b60405180910390fd5b6101f160006101f3565b565b60008051602061036a833981519152546001600160a01b0316336001600160a01b0316146102335760405162461bcd60e51b81526004016101de90610340565b60008051602061036a83398151915255565b7f834ce84547018237034401a09067277cdcbe7bbf7d7d30f6b382b0a102b7b4a354600181141561027557600080fd5b5060017f834ce84547018237034401a09067277cdcbe7bbf7d7d30f6b382b0a102b7b4a35560008051602061036a83398151915255565b60008051602061036a833981519152546001600160a01b0316336001600160a01b0316146102ec5760405162461bcd60e51b81526004016101de90610340565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b60006020828403121561032257600080fd5b81356001600160a01b038116811461033957600080fd5b9392505050565b6020808252600f908201526e4f6e6c7920676f7665726e616e636560881b60408201526060019056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103a264697066735822122058d5e3257132fafb2cf7789f3e2bd7a450d1b2b3d2b8b9d60be79b2e6d21bfeb64736f6c634300080b0033

Block Transaction 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
[ Download: CSV Export  ]
[ 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.