Skip to content
Verified contractPartialMIT

ERC1967Proxy

Address0x55a40d4bd8941de7cbe0262a98c213d1fd39e9ee
Balance

0 ETH

 

Transactions

204

 

Compiler

solc 0.8.29

 

Same code

15 more contracts

 

Details

Compiler
solc 0.8.29+commit.ab55807c
Language
solidity
Optimization
Yes, 100 runs
EVM version
prague
Via IR
yes
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
25,843,727
Creation transaction
0x4289eb751d…5b2169cc8b
Proxy implementation
0x8e89856d…ad33db0dsource code not verified
Main copy (most transactions)
0x00000000…71d6acd6

176 files

The source code is large: one file is shown at a time. Choose a file in the list.

lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Proxy.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol)

pragma solidity ^0.8.0;

import "../Proxy.sol";
import "./ERC1967Upgrade.sol";

/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 */
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializing the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        _upgradeToAndCall(_logic, _data, false);
    }

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        return ERC1967Upgrade._getImplementation();
    }
}
Compiler settingsShow
{
  "viaIR": true,
  "metadata": {
    "appendCBOR": true,
    "bytecodeHash": "ipfs",
    "useLiteralContent": false
  },
  "optimizer": {
    "runs": 100,
    "enabled": true
  },
  "evmVersion": "prague",
  "remappings": [
    "ethereum-vault-connector/=lib/ethereum-vault-connector/src/",
    "permit2/=lib/permit2/",
    "ds-test/=lib/ethereum-vault-connector/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "dto/escrow/=contracts/dto/escrow/",
    "dto/factory/=contracts/dto/factory/",
    "dto/token/=contracts/dto/token/",
    "dto/helpers/=contracts/dto/helpers/",
    "dto/interfaces/=contracts/dto/interfaces/",
    "dto/mocks/=contracts/dto/mocks/",
    "sto/escrow/=contracts/sto/escrow/",
    "sto/factory/=contracts/sto/factory/",
    "sto/token/=contracts/sto/token/",
    "sto/helpers/=contracts/sto/helpers/",
    "sto/interfaces/=contracts/sto/interfaces/",
    "sto/mocks/=contracts/sto/mocks/",
    "brickken/=contracts/brickken/",
    "@ensdomains/=node_modules/@ensdomains/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "hardhat/=node_modules/hardhat/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ]
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.