creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/migrator.sol": {
        "content": "// SPDX-License-Identifier: LGPL-3.0-only\r\npragma solidity ^0.7.0;\r\n/**\r\n * @title SafeStorage - Storage layout of the Safe Smart Account contracts to be used in libraries.\r\n * @dev Should be always the first base contract of a library that is used with a Safe.\r\n * @author Richard Meissner - @rmeissner\r\n */\r\ncontract SafeStorage {\r\n    // From /common/Singleton.sol\r\n    address internal singleton;\r\n    // From /common/ModuleManager.sol\r\n    mapping(address => address) internal modules;\r\n    // From /common/OwnerManager.sol\r\n    mapping(address => address) internal owners;\r\n    uint256 internal ownerCount;\r\n    uint256 internal threshold;\r\n    // From /Safe.sol\r\n    uint256 internal nonce;\r\n    bytes32 internal _deprecatedDomainSeparator;\r\n    mapping(bytes32 => uint256) internal signedMessages;\r\n    mapping(address => mapping(bytes32 => uint256)) internal approvedHashes;\r\n}\r\n\r\ncontract Migration is SafeStorage {\r\n    bytes32 private constant DOMAIN_SEPARATOR_TYPEHASH = 0x035aff83d86937d35b32e04f0ddc6ff469290eef2f1b692d8a815c89404d4749;\r\n\r\n    address public immutable MIGRATION_SINGLETON;\r\n    address public immutable SAFE_120_SINGLETON;\r\n\r\n    constructor(address targetSingleton) {\r\n        // Singleton address cannot be zero address.\r\n        require(targetSingleton != address(0), \"Invalid singleton address provided\");\r\n        SAFE_120_SINGLETON = targetSingleton;\r\n        MIGRATION_SINGLETON = address(this);\r\n    }\r\n\r\n    event ChangedMasterCopy(address singleton);\r\n\r\n    /**\r\n     * @notice Migrates the Safe to the Singleton contract at `migrationSingleton`.\r\n     * @dev This can only be called via a delegatecall.\r\n     */\r\n    function migrate() public {\r\n        require(address(this) != MIGRATION_SINGLETON, \"Migration should only be called via delegatecall\");\r\n\r\n        singleton = SAFE_120_SINGLETON;\r\n        _deprecatedDomainSeparator = keccak256(abi.encode(DOMAIN_SEPARATOR_TYPEHASH, this));\r\n        emit ChangedMasterCopy(singleton);\r\n    }\r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}