Description:
Proxy contract enabling upgradeable smart contract patterns. Delegates calls to an implementation contract.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/multisig/base/Singleton.sol": {
"content": "// SPDX-License-Identifier: UNLICENSED
pragma solidity ~0.8.20;
/// @title Singleton
contract Singleton {
address internal singleton;
}
"
},
"contracts/multisig/migrate/migrate_100_to_101.sol": {
"content": "// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ~0.8.20;
import {Singleton} from "../base/Singleton.sol";
contract Migration is Singleton {
address public immutable MIGRATION;
address public immutable NEW_SINGLETON;
constructor(address newSingleton) {
NEW_SINGLETON = newSingleton;
MIGRATION = address(this);
}
event Upgraded(address indexed implementation);
function upgrade() public {
require(address(this) != MIGRATION, "only delegatecall allowed");
singleton = NEW_SINGLETON;
emit Upgraded(singleton);
}
}"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 1337
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}
}}
Submitted on: 2025-10-15 11:11:00
Comments
Log in to comment.
No comments yet.