Verified contractPartialMIT
UpgradeableProxy
Address0xbeb3bd07761ae20aef4f75bc0da392d6267d3bee
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.8.25
- Same code
Only this contract
Details
- Compiler
- solc 0.8.25+commit.b61c2a91
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,342,569
- Creation transaction
- 0x2e23da4158…1600453ccc
- Proxy implementation
- 0x0e1d62c1…6bfc952bsource code not verified
src/UpgradeableProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;
/// @notice Minimal ERC-1967 proxy shared by the oracle and liquidity manager.
contract UpgradeableProxy {
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
error InvalidImplementation();
error InitializationFailed();
constructor(address implementation, bytes memory initializationCall) payable {
if (implementation.code.length == 0) revert InvalidImplementation();
assembly ("memory-safe") {
sstore(IMPLEMENTATION_SLOT, implementation)
}
if (initializationCall.length != 0) {
(bool ok, bytes memory result) = implementation.delegatecall(initializationCall);
if (!ok) {
if (result.length == 0) revert InitializationFailed();
assembly ("memory-safe") {
revert(add(result, 32), mload(result))
}
}
}
}
fallback() external payable {
_delegate();
}
receive() external payable {
_delegate();
}
function _delegate() internal {
assembly ("memory-safe") {
let implementation := sload(IMPLEMENTATION_SLOT)
calldatacopy(0, 0, calldatasize())
let success := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch success
case 0 { revert(0, returndatasize()) }
default { return(0, returndatasize()) }
}
}
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"forge-std/=lib/forge-std/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.