Overview
TokenID:
1720949
Transfers:
-
Contract:
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ERC1967Proxy
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 10000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Proxy.sol)pragma solidity ^0.8.20;import {Proxy} from "../Proxy.sol";import {ERC1967Utils} from "./ERC1967Utils.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 {/*** @dev Initializes the upgradeable proxy with an initial implementation specified by `implementation`.** If `_data` is nonempty, it's used as data in a delegate call to `implementation`. This will typically be an* encoded function call, and allows initializing the storage of the proxy like a Solidity constructor.** Requirements:** - If `data` is empty, `msg.value` must be zero.*/constructor(address implementation, bytes memory _data) payable {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/Proxy.sol)pragma solidity ^0.8.20;/*** @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to* be specified by overriding the virtual {_implementation} function.** Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a* different contract through the {_delegate} function.** The success and return data of the delegated call will be returned back to the caller of the proxy.*/abstract contract Proxy {/*** @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 _delegate(address implementation) internal virtual {assembly {// Copy msg.data. We take full control of memory in this inline assembly// block because it will not return to Solidity code. We overwrite the// Solidity scratch pad at memory position 0.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/ERC1967/ERC1967Utils.sol)pragma solidity ^0.8.20;import {IBeacon} from "../beacon/IBeacon.sol";import {Address} from "../../utils/Address.sol";import {StorageSlot} from "../../utils/StorageSlot.sol";/*** @dev This abstract contract provides getters and event emitting update functions for* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.*/library ERC1967Utils {// We re-declare ERC-1967 events here because they can't be used directly from IERC1967.// This will be fixed in Solidity 0.8.21. At that point we should remove these events./*** @dev Emitted when the implementation is upgraded.*/event Upgraded(address indexed implementation);/*** @dev Emitted when the admin account has changed.*/event AdminChanged(address previousAdmin, address newAdmin);
12345678910111213141516// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol)pragma solidity ^0.8.20;/*** @dev This is the interface that {BeaconProxy} expects of its beacon.*/interface IBeacon {/*** @dev Must return an address that can be used as a delegate call target.** {UpgradeableBeacon} will check that this address is a contract.*/function implementation() external view returns (address);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)pragma solidity ^0.8.20;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev The ETH balance of the account is not enough to perform the operation.*/error AddressInsufficientBalance(address account);/*** @dev There's no code at `target` (it is not a contract).*/error AddressEmptyCode(address target);/*** @dev A call to an address target failed. The target may have reverted.*/error FailedInnerCall();/*** @dev Replacement for Solidity's `transfer`: sends `amount` wei to
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.pragma solidity ^0.8.20;/*** @dev Library for reading and writing primitive types to specific storage slots.** Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.* This library helps with reading and writing to such slots without the need for inline assembly.** The functions in this library return Slot structs that contain a `value` member that can be used to read or write.** Example usage to set ERC1967 implementation slot:* ```solidity* contract ERC1967 {* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;** function _getImplementation() internal view returns (address) {* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;* }** function _setImplementation(address newImplementation) internal {* require(newImplementation.code.length > 0);* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
1234567891011121314151617181920212223242526{"remappings": ["@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/","@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/","ds-test/=lib/forge-std/lib/ds-test/src/","erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/","forge-std/=lib/forge-std/src/","foundry-devops/=lib/foundry-devops/","openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/","openzeppelin-contracts/=lib/openzeppelin-contracts/","openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/","solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/"],"optimizer": {"enabled": true,"runs": 10000},"metadata": {"bytecodeHash": "ipfs","appendCBOR": true},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode",
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
608060405260405161041738038061041783398101604081905261002291610268565b61002c8282610033565b5050610352565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b9190610336565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b03808211156102af57600080fd5b818501915085601f8301126102c357600080fd5b8151818111156102d5576102d561022e565b604051601f8201601f19908116603f011681019083821181831017156102fd576102fd61022e565b8160405282815288602084870101111561031657600080fd5b610327836020830160208801610244565b80955050505050509250929050565b60008251610348818460208701610244565b9190910192915050565b60b7806103606000396000f3fe6080604052600a600c565b005b60186014601a565b605e565b565b600060597f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015607c573d6000f35b3d6000fdfea2646970667358221220f254e3b8ad483091df955b828abe631a700fa6d64b27a4227cff0e8dc932b27464736f6c63430008140033000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a42e64002400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f1c0df2381ac4a6cac9c866ddbde3c3d641a1337000000000000000000000000000000000000000000000000000000000000000b4c617965723320435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064c415945523300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600a600c565b005b60186014601a565b605e565b565b600060597f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015607c573d6000f35b3d6000fdfea2646970667358221220f254e3b8ad483091df955b828abe631a700fa6d64b27a4227cff0e8dc932b27464736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b5000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a42e64002400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f1c0df2381ac4a6cac9c866ddbde3c3d641a1337000000000000000000000000000000000000000000000000000000000000000b4c617965723320435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064c415945523300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : implementation (address): 0xd0aB2d3621DC8A862389f89F52F08c097e3Fe8B5
Arg [1] : _data (bytes): 0x2e64002400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000f1c0df2381ac4a6cac9c866ddbde3c3d641a1337000000000000000000000000000000000000000000000000000000000000000b4c617965723320435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004435542450000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064c4159455233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000
-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 000000000000000000000000d0ab2d3621dc8a862389f89f52f08c097e3fe8b5
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a4
Arg [3] : 2e64002400000000000000000000000000000000000000000000000000000000
Arg [4] : 000000a000000000000000000000000000000000000000000000000000000000
Arg [5] : 000000e000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000012000000000000000000000000000000000000000000000000000000000
Arg [7] : 00000160000000000000000000000000f1c0df2381ac4a6cac9c866ddbde3c3d
Arg [8] : 641a133700000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000b4c617965723320435542450000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000443554245000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 000000064c415945523300000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [15] : 0000000131000000000000000000000000000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000