{
    "Function": "requireAuthorizedAccountMigration",
    "File": "contracts/libraries/AccountMigrationLibrary.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "ECDSA",
        "SignatureChecker"
    ],
    "Internal Calls": [
        "_toAsciiString",
        "revert AccountMigrationLibrary_Cannot_Migrate_Account_To_Itself()",
        "abi.encodePacked()",
        "revert AccountMigrationLibrary_Signature_Verification_Failed()"
    ],
    "Library Calls": [
        "isValidSignatureNow",
        "toEthSignedMessageHash"
    ],
    "Low-Level Calls": [],
    "Code": "function requireAuthorizedAccountMigration(\n    address originalAddress,\n    address newAddress,\n    bytes memory signature\n  ) internal view {\n    if (originalAddress == newAddress) {\n      revert AccountMigrationLibrary_Cannot_Migrate_Account_To_Itself();\n    }\n    bytes32 hash = abi\n      .encodePacked(\"I authorize Foundation to migrate my account to \", _toAsciiString(newAddress))\n      .toEthSignedMessageHash();\n    if (!originalAddress.isValidSignatureNow(hash, signature)) {\n      revert AccountMigrationLibrary_Signature_Verification_Failed();\n    }\n  }"
}