Migration

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"
        ]
      }
    }
  }
}}

Tags:
Proxy, Upgradeable, Factory|addr:0xc5afa0f0add0b6fcededc4af2280dc7c94f246e9|verified:true|block:23581086|tx:0x90522aa4c1adbce63e94c54557e759beb1840309ca87d950e1f89ff1e6bd57e1|first_check:1760519459

Submitted on: 2025-10-15 11:11:00

Comments

Log in to comment.

No comments yet.