Verified contractPartialMIT
OwnedStorageProxy
Address0xd2d15bf96d58a3e238ea1bb4897f6a557cfaa94a
- Balance
0 ETH
- Transactions
268
- Compiler
solc 0.8.28
- Same code
22 more contracts
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- Via IR
- yes
- License
- MIT
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,390,854
- Creation transaction
- 0xef5af129ad…0553621130
- Proxy implementation
- 0xe2ecad19…5127a673source code not verified
contracts/OwnedStorageProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;
/// @notice StorageV2 proxy with ownership assigned atomically at creation.
contract OwnedStorageProxy {
bytes32 private constant IMPLEMENTATION_SLOT =
0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
bytes32 private constant OWNER_SLOT =
0x296ff641f9f98e0f3cffd901df5623977f5fe79518952b1b3a2d2596cf3bc2a5;
constructor(address implementation_, address owner_) payable {
require(implementation_.code.length > 0, "implementation has no code");
require(owner_ != address(0) && owner_.code.length == 0, "invalid owner");
assembly {
sstore(IMPLEMENTATION_SLOT, implementation_)
sstore(OWNER_SLOT, owner_)
}
}
function implementation() external view returns (address impl) {
assembly { impl := sload(IMPLEMENTATION_SLOT) }
}
fallback() external payable { _delegate(); }
receive() external payable { _delegate(); }
function _delegate() private {
assembly {
let impl := sload(IMPLEMENTATION_SLOT)
calldatacopy(0, 0, calldatasize())
let ok := delegatecall(gas(), impl, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch ok
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}
Compiler settingsShow
{
"viaIR": true,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"forge-std/=lib/forge-std/src/",
"lib/=lib/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.