diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 38ff3395..2d8bff80 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -8,8 +8,8 @@ "lint": "solhint 'src/**/*.sol'" }, "dependencies": { - "@openzeppelin/contracts": "^4.9.2", - "@openzeppelin/contracts-upgradeable": "^4.9.2", + "@openzeppelin/contracts": "^5.0.0", + "@openzeppelin/contracts-upgradeable": "^5.0.0", "@safe-global/safe-contracts": "1.4.1", "@uniswap/v3-core": "https://github.com/Uniswap/v3-core#0.8", "@uniswap/v3-periphery": "https://github.com/Uniswap/v3-periphery.git", diff --git a/packages/contracts/remappings.txt b/packages/contracts/remappings.txt index 0e70ebae..5284b4c1 100644 --- a/packages/contracts/remappings.txt +++ b/packages/contracts/remappings.txt @@ -1,4 +1,5 @@ -@openzeppelin/=../../node_modules/@openzeppelin +@openzeppelin/=node_modules/@openzeppelin +@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable @zk-email/=../../node_modules/@zk-email @uniswap/=../../node_modules/@uniswap forge-std/=../../node_modules/forge-std/src diff --git a/packages/contracts/script/03_DeployDKIMRegistry.s.sol b/packages/contracts/script/03_DeployDKIMRegistry.s.sol index b2c2ba6d..d1b2330e 100644 --- a/packages/contracts/script/03_DeployDKIMRegistry.s.sol +++ b/packages/contracts/script/03_DeployDKIMRegistry.s.sol @@ -14,7 +14,7 @@ contract Deploy is Script { } vm.startBroadcast(deployerPrivateKey); - DKIMRegistry dkim = new DKIMRegistry(); + DKIMRegistry dkim = new DKIMRegistry(msg.sender); vm.stopBroadcast(); console.log("DKIMRegistry deployed at: %s", address(dkim)); diff --git a/packages/contracts/script/MintTestNFT.s.sol b/packages/contracts/script/MintTestNFT.s.sol index 99174623..9bbdba97 100644 --- a/packages/contracts/script/MintTestNFT.s.sol +++ b/packages/contracts/script/MintTestNFT.s.sol @@ -7,7 +7,7 @@ import "forge-std/Script.sol"; contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable, Ownable { constructor() ERC721("MyToken", "MTK") - Ownable() + Ownable(msg.sender) {} function safeMint(address to, uint256 tokenId, string memory uri) @@ -37,10 +37,6 @@ contract MyToken is ERC721, ERC721URIStorage, ERC721Burnable, Ownable { { return super.supportsInterface(interfaceId); } - - function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { - super._burn(tokenId); - } } contract Deploy is Script { diff --git a/packages/contracts/script/UpgradeCore.s.sol b/packages/contracts/script/UpgradeCore.s.sol index b24316d7..0c6f956c 100644 --- a/packages/contracts/script/UpgradeCore.s.sol +++ b/packages/contracts/script/UpgradeCore.s.sol @@ -27,7 +27,7 @@ contract Upgrade is Script { EmailWalletCore coreImpl = new EmailWalletCore(); EmailWalletCore coreProxy = EmailWalletCore(payable(core)); - coreProxy.upgradeTo(address(coreImpl)); + coreProxy.upgradeToAndCall(address(coreImpl), new bytes(0)); // If you want to call some v2 function, refer to the following steps // diff --git a/packages/contracts/script/UpgradeTokenRegistry.s.sol b/packages/contracts/script/UpgradeTokenRegistry.s.sol index d0d07313..aea02c64 100644 --- a/packages/contracts/script/UpgradeTokenRegistry.s.sol +++ b/packages/contracts/script/UpgradeTokenRegistry.s.sol @@ -27,7 +27,7 @@ contract Upgrade is Script { TokenRegistry tokenRegistryImpl = new TokenRegistry(); TokenRegistry tokenRegistryProxy = TokenRegistry(payable(address(tokenRegistry))); - tokenRegistryProxy.upgradeTo(address(tokenRegistryImpl)); + tokenRegistryProxy.upgradeToAndCall(address(tokenRegistryImpl), new bytes(0)); // If you want to call some v2 function, refer to the following steps // diff --git a/packages/contracts/src/EmailWalletCore.sol b/packages/contracts/src/EmailWalletCore.sol index e94e6b3c..7d390337 100644 --- a/packages/contracts/src/EmailWalletCore.sol +++ b/packages/contracts/src/EmailWalletCore.sol @@ -5,7 +5,6 @@ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Ini import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import {Create2Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {IERC20, ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; @@ -27,6 +26,35 @@ import "./interfaces/Types.sol"; import "./interfaces/Commands.sol"; import "./interfaces/Events.sol"; +/// @notice Struct to store initialization parameters +/// @dev This struct is used to initialize the EmailWalletCore contract +/// @param _relayerHandler Address of the relayer handler contract +/// @param _accountHandler Address of the account handler contract +/// @param _unclaimsHandler Address of the unclaims handler contract +/// @param _extensionHandler Address of the extension handler contract +/// @param _verifier Address of the ZK proof verifier +/// @param _tokenRegistry Address of the token registry contract +/// @param _priceOracle Address of the price oracle contract +/// @param _wethContract Address of the WETH contract +/// @param _maxFeePerGas Max fee per gas in wei that relayer can set in a UserOp +/// @param _emailValidityDuration Time period until which a email is valid for EmailOp based on the timestamp of the email signature +/// @param _unclaimedFundClaimGas Gas required to claim unclaimed funds +/// @param _unclaimedStateClaimGas Gas required to claim unclaimed state + +struct InitParams { + address relayerHandler; + address accountHandler; + address unclaimsHandler; + address extensionHandler; + address verifier; + address tokenRegistry; + address priceOracle; + address wethContract; + uint256 maxFeePerGas; + uint256 emailValidityDuration; + uint256 unclaimedFundClaimGas; + uint256 unclaimedStateClaimGas; +} contract EmailWalletCore is Initializable, UUPSUpgradeable, OwnableUpgradeable { using SafeERC20 for IERC20; // ZK proof verifier @@ -77,45 +105,24 @@ contract EmailWalletCore is Initializable, UUPSUpgradeable, OwnableUpgradeable { } /// @notice Constructor - /// @param _relayerHandler Address of the relayer handler contract - /// @param _accountHandler Address of the account handler contract - /// @param _unclaimsHandler Address of the unclaims handler contract - /// @param _extensionHandler Address of the extension handler contract - /// @param _verifier Address of the ZK proof verifier - /// @param _tokenRegistry Address of the token registry contract - /// @param _priceOracle Address of the price oracle contract - /// @param _wethContract Address of the WETH contract - /// @param _maxFeePerGas Max fee per gas in wei that relayer can set in a UserOp - /// @param _emailValidityDuration Time period until which a email is valid for EmailOp based on the timestamp of the email signature - /// @param _unclaimedFundClaimGas Gas required to claim unclaimed funds - /// @param _unclaimedStateClaimGas Gas required to claim unclaimed state + /// @param initParams Initialization parameters + /// @dev This function is called by the proxy contract during deployment function initialize( - address _relayerHandler, - address _accountHandler, - address _unclaimsHandler, - address _extensionHandler, - address _verifier, - address _tokenRegistry, - address _priceOracle, - address _wethContract, - uint256 _maxFeePerGas, - uint256 _emailValidityDuration, - uint256 _unclaimedFundClaimGas, - uint256 _unclaimedStateClaimGas + InitParams memory initParams ) public initializer { - __Ownable_init(); - relayerHandler = RelayerHandler(_relayerHandler); - accountHandler = AccountHandler(_accountHandler); - unclaimsHandler = UnclaimsHandler(payable(_unclaimsHandler)); - extensionHandler = ExtensionHandler(_extensionHandler); - verifier = IVerifier(_verifier); - tokenRegistry = TokenRegistry(_tokenRegistry); - priceOracle = IPriceOracle(_priceOracle); - wethContract = _wethContract; - maxFeePerGas = _maxFeePerGas; - emailValidityDuration = _emailValidityDuration; - unclaimedFundClaimGas = _unclaimedFundClaimGas; - unclaimedStateClaimGas = _unclaimedStateClaimGas; + __Ownable_init(msg.sender); + relayerHandler = RelayerHandler(initParams.relayerHandler); + accountHandler = AccountHandler(initParams.accountHandler); + unclaimsHandler = UnclaimsHandler(payable(initParams.unclaimsHandler)); + extensionHandler = ExtensionHandler(initParams.extensionHandler); + verifier = IVerifier(initParams.verifier); + tokenRegistry = TokenRegistry(initParams.tokenRegistry); + priceOracle = IPriceOracle(initParams.priceOracle); + wethContract = initParams.wethContract; + maxFeePerGas = initParams.maxFeePerGas; + emailValidityDuration = initParams.emailValidityDuration; + unclaimedFundClaimGas = initParams.unclaimedFundClaimGas; + unclaimedStateClaimGas = initParams.unclaimedStateClaimGas; } function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} @@ -374,7 +381,7 @@ contract EmailWalletCore is Initializable, UUPSUpgradeable, OwnableUpgradeable { // Prevent extension from calling ERC20 tokens directly (tokenName should be empty) require( - Address.isContract(target) && + address(target).code.length > 0 && target != currContext.walletAddr && bytes(tokenRegistry.getTokenNameOfAddress(target)).length == 0, "invalid target for executeAsExtension" @@ -547,9 +554,15 @@ contract EmailWalletCore is Initializable, UUPSUpgradeable, OwnableUpgradeable { } catch Error(string memory reason) { success = false; returnData = bytes(reason); - } catch { - success = false; - returnData = bytes("err executing extension"); + } catch (bytes memory lowLevelData) { + bytes4 selector; + assembly { + selector := mload(add(lowLevelData, 0x20)) + } + if (selector == bytes4(keccak256("ERC721NonexistentToken(uint256)"))) { + return (false, bytes("ERC721NonexistentToken")); + } + return (false, bytes("err executing extension")); } } } @@ -576,7 +589,14 @@ contract EmailWalletCore is Initializable, UUPSUpgradeable, OwnableUpgradeable { success = true; } catch Error(string memory reason) { return (false, bytes(reason)); - } catch { + } catch (bytes memory lowLevelData) { + bytes4 selector; + assembly { + selector := mload(add(lowLevelData, 0x20)) + } + if (selector == bytes4(keccak256("ERC20InsufficientBalance(address,uint256,uint256)"))) { + return (false, bytes("ERC20InsufficientBalance")); + } return (false, bytes("err unknown wallet exec")); } } diff --git a/packages/contracts/src/Wallet.sol b/packages/contracts/src/Wallet.sol index af2e17a1..fa448e28 100644 --- a/packages/contracts/src/Wallet.sol +++ b/packages/contracts/src/Wallet.sol @@ -45,7 +45,7 @@ contract Wallet is TokenCallbackHandler, OwnableUpgradeable, UUPSUpgradeable { /// @notice Initialize the contract function initialize() public initializer { - __Ownable_init(); + __Ownable_init(msg.sender); } /// @notice Execute a function on an external contract diff --git a/packages/contracts/src/extensions/NFTExtension.sol b/packages/contracts/src/extensions/NFTExtension.sol index c1bdf38e..69ccc8cb 100644 --- a/packages/contracts/src/extensions/NFTExtension.sol +++ b/packages/contracts/src/extensions/NFTExtension.sol @@ -30,7 +30,7 @@ contract NFTExtension is Extension, IERC721Receiver, Initializable, UUPSUpgradea } function initialize(address coreAddr) initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); core = EmailWalletCore(payable(coreAddr)); templates = new string[][](2); templates[0] = ["NFT", "Send", "{uint}", "of", "{string}", "to", "{recipient}"]; diff --git a/packages/contracts/src/extensions/Safe2FAExtension.sol b/packages/contracts/src/extensions/Safe2FAExtension.sol index a5e438ba..7232eaf8 100644 --- a/packages/contracts/src/extensions/Safe2FAExtension.sol +++ b/packages/contracts/src/extensions/Safe2FAExtension.sol @@ -25,7 +25,7 @@ contract Safe2FAExtension is Extension, Initializable, UUPSUpgradeable, OwnableU } function initialize(address coreAddr) public initializer { - __Ownable_init(); + __Ownable_init(msg.sender); core = EmailWalletCore(payable(coreAddr)); templates = new string[][](4); templates[0] = ["Safe", "Transaction:", "Approve", "{string}", "from", "{address}"]; diff --git a/packages/contracts/src/extensions/UniswapExtension.sol b/packages/contracts/src/extensions/UniswapExtension.sol index fd3706e2..8151839c 100644 --- a/packages/contracts/src/extensions/UniswapExtension.sol +++ b/packages/contracts/src/extensions/UniswapExtension.sol @@ -38,7 +38,7 @@ contract UniswapExtension is Extension, Initializable, UUPSUpgradeable, OwnableU } function initialize(address coreAddr, address _tokenReg, address _router, address _factory) initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); core = EmailWalletCore(payable(coreAddr)); tokenRegistry = TokenRegistry(_tokenReg); router = ISwapRouter(_router); diff --git a/packages/contracts/src/handlers/AccountHandler.sol b/packages/contracts/src/handlers/AccountHandler.sol index c5069a68..3628b813 100644 --- a/packages/contracts/src/handlers/AccountHandler.sol +++ b/packages/contracts/src/handlers/AccountHandler.sol @@ -6,7 +6,7 @@ import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeab import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IDKIMRegistry} from "@zk-email/contracts/interfaces/IDKIMRegistry.sol"; -import {Create2Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol"; +import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import {Wallet} from "../Wallet.sol"; import {RelayerHandler} from "./RelayerHandler.sol"; @@ -58,7 +58,7 @@ contract AccountHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable { address _walletImplementation, uint _emailValidityDuration ) public initializer { - __Ownable_init(); + __Ownable_init(msg.sender); deployer = _msgSender(); emailValidityDuration = _emailValidityDuration; defaultDkimRegistry = IDKIMRegistry(_defaultDkimRegistry); @@ -85,7 +85,7 @@ contract AccountHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable { /// @param emailProof Proof and instances of the email proof function createAccount(EmailProof calldata emailProof) public returns (Wallet wallet) { require(emailProof.accountSalt != bytes32(0), "invalid wallet salt"); - require(Address.isContract(getWalletOfSalt(emailProof.accountSalt)) == false, "wallet already deployed"); + require(address(getWalletOfSalt(emailProof.accountSalt)).code.length == 0, "wallet already deployed"); require(emailNullifiers[emailProof.emailNullifier] == false, "email already nullified"); require( isDKIMPublicKeyHashValid(emailProof.accountSalt, emailProof.emailDomain, emailProof.dkimPublicKeyHash), @@ -111,7 +111,7 @@ contract AccountHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable { /// @notice Return true iff the wallet is deployed for the given wallet salt /// @param accountSalt Salt used to deploy the wallet function isAccountSaltDeployed(bytes32 accountSalt) public view returns (bool) { - return Address.isContract(getWalletOfSalt(accountSalt)); + return address(getWalletOfSalt(accountSalt)).code.length > 0; } /// @notice Return the DKIM public key hash for a given email domain and accountSalt @@ -142,7 +142,7 @@ contract AccountHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable { /// @param salt Salt used to deploy the wallet function getWalletOfSalt(bytes32 salt) public view returns (address) { return - Create2Upgradeable.computeAddress( + Create2.computeAddress( salt, keccak256( abi.encodePacked( diff --git a/packages/contracts/src/handlers/ExtensionHandler.sol b/packages/contracts/src/handlers/ExtensionHandler.sol index 803c3b6c..35122cec 100644 --- a/packages/contracts/src/handlers/ExtensionHandler.sol +++ b/packages/contracts/src/handlers/ExtensionHandler.sol @@ -43,7 +43,7 @@ contract ExtensionHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable } function initialize() initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); deployer = _msgSender(); } diff --git a/packages/contracts/src/handlers/RelayerHandler.sol b/packages/contracts/src/handlers/RelayerHandler.sol index 24d8900f..f972fec6 100644 --- a/packages/contracts/src/handlers/RelayerHandler.sol +++ b/packages/contracts/src/handlers/RelayerHandler.sol @@ -27,7 +27,7 @@ contract RelayerHandler is Initializable, UUPSUpgradeable, OwnableUpgradeable { } function initialize() initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); deployer = _msgSender(); } diff --git a/packages/contracts/src/handlers/UnclaimsHandler.sol b/packages/contracts/src/handlers/UnclaimsHandler.sol index 6421edc4..45239cc1 100644 --- a/packages/contracts/src/handlers/UnclaimsHandler.sol +++ b/packages/contracts/src/handlers/UnclaimsHandler.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.12; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {UUPSUpgradeable} from "@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; -import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/Types.sol"; @@ -76,7 +76,7 @@ contract UnclaimsHandler is ReentrancyGuard, Initializable, UUPSUpgradeable, Own uint256 _unclaimsExpiryDuration, uint256 _maxFeePerGas ) public initializer { - __Ownable_init(); + __Ownable_init(msg.sender); deployer = _msgSender(); relayerHandler = RelayerHandler(_relayerHandler); accountHandler = AccountHandler(_accountHandler); @@ -294,7 +294,16 @@ contract UnclaimsHandler is ReentrancyGuard, Initializable, UUPSUpgradeable, Own try extension.registerUnclaimedState(us, false) {} catch Error(string memory reason) { revert(string.concat("unclaimed state reg err: ", reason)); - } catch { + } catch (bytes memory lowLevelData) { + // Handle specific ERC721NonexistentToken error + bytes4 selector; + assembly { + selector := mload(add(lowLevelData, 0x20)) + } + if (selector == bytes4(keccak256("ERC721NonexistentToken(uint256)"))) { + revert(string(abi.encodePacked("unclaimed state reg err: ERC721NonexistentToken()"))); + } + // Handle other low-level errors revert("unclaimed state reg err"); } diff --git a/packages/contracts/src/libraries/StringUtils.sol b/packages/contracts/src/libraries/StringUtils.sol index 18652b9d..6a79916b 100644 --- a/packages/contracts/src/libraries/StringUtils.sol +++ b/packages/contracts/src/libraries/StringUtils.sol @@ -75,7 +75,7 @@ library StringUtils { * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { - return Strings.toString(value); + return Strings.toStringSigned(value); } /** diff --git a/packages/contracts/src/libraries/SubjectUtils.sol b/packages/contracts/src/libraries/SubjectUtils.sol index fa4f1085..ceed80aa 100644 --- a/packages/contracts/src/libraries/SubjectUtils.sol +++ b/packages/contracts/src/libraries/SubjectUtils.sol @@ -135,7 +135,7 @@ library SubjectUtils { (address target, , bytes memory data) = abi.decode(emailOp.executeCallData, (address, uint256, bytes)); require(target != address(0), "invalid execute target"); - require(Address.isContract(target), "target is not a contract"); + require(address(target).code.length > 0, "target is not a contract"); require( target != address(core) && @@ -249,7 +249,7 @@ library SubjectUtils { // {int} for negative values else if (Strings.equal(matcher, Commands.INT_TEMPLATE)) { int256 num = abi.decode(emailOp.extensionParams.subjectParams[nextParamIndex], (int256)); - value = Strings.toString(num); + value = Strings.toStringSigned(num); nextParamIndex++; } // {addres} for wallet address diff --git a/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol b/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol index 0b2494c2..ce3d35ae 100644 --- a/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol +++ b/packages/contracts/src/utils/ECDSAOwnedDKIMRegistry.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@zk-email/contracts/DKIMRegistry.sol"; +import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; /// @title ECDSAOwnedDKIMRegistry /// @notice A DKIM Registry that could be updated by predefined ECDSA signer @@ -17,8 +18,10 @@ contract ECDSAOwnedDKIMRegistry is IDKIMRegistry { string public constant SET_PREFIX = "SET:"; string public constant REVOKE_PREFIX = "REVOKE:"; - constructor(address _signer) { - dkimRegistry = new DKIMRegistry(); + constructor( + address _signer + ) { + dkimRegistry = new DKIMRegistry(address(this)); signer = _signer; } @@ -39,10 +42,9 @@ contract ECDSAOwnedDKIMRegistry is IDKIMRegistry { require(dkimRegistry.revokedDKIMPublicKeyHashes(publicKeyHash) == false, "publicKeyHash is revoked"); string memory signedMsg = computeSignedMsg(SET_PREFIX, selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); address recoveredSigner = digest.recover(signature); require(recoveredSigner == signer, "Invalid signature"); - dkimRegistry.setDKIMPublicKeyHash(domainName, publicKeyHash); } @@ -59,7 +61,7 @@ contract ECDSAOwnedDKIMRegistry is IDKIMRegistry { require(dkimRegistry.revokedDKIMPublicKeyHashes(publicKeyHash) == false, "publicKeyHash is already revoked"); string memory signedMsg = computeSignedMsg(REVOKE_PREFIX, selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); address recoveredSigner = digest.recover(signature); require(recoveredSigner == signer, "Invalid signature"); diff --git a/packages/contracts/src/utils/TokenRegistry.sol b/packages/contracts/src/utils/TokenRegistry.sol index 60ad38c1..37bca25f 100644 --- a/packages/contracts/src/utils/TokenRegistry.sol +++ b/packages/contracts/src/utils/TokenRegistry.sol @@ -26,7 +26,7 @@ contract TokenRegistry is Initializable, UUPSUpgradeable, OwnableUpgradeable { } function initialize() initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); chainIdOfName["mainnet"] = 0; chainIdOfName["optimism"] = 10; chainIdOfName["arbitrum"] = 42161; diff --git a/packages/contracts/test/AccountHandler.t.sol b/packages/contracts/test/AccountHandler.t.sol index 1ac23cdf..bda08364 100644 --- a/packages/contracts/test/AccountHandler.t.sol +++ b/packages/contracts/test/AccountHandler.t.sol @@ -539,7 +539,7 @@ contract AccountTest is EmailWalletCoreTestHelper { AccountHandler implV2 = new AccountHandler(); vm.startPrank(deployer); - accountHandler.upgradeTo(address(implV2)); + accountHandler.upgradeToAndCall(address(implV2), new bytes(0)); vm.stopPrank(); } } diff --git a/packages/contracts/test/ECDSAOwnedDKIMRegistry.t.sol b/packages/contracts/test/ECDSAOwnedDKIMRegistry.t.sol index 973127b9..06cfedb6 100644 --- a/packages/contracts/test/ECDSAOwnedDKIMRegistry.t.sol +++ b/packages/contracts/test/ECDSAOwnedDKIMRegistry.t.sol @@ -26,7 +26,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_SetDKIMPublicKeyHash() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); bytes memory signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -36,7 +36,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_SetDKIMPublicKeyHashMultiDomain() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); bytes memory signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -46,7 +46,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { domainName = "example2.com"; publicKeyHash = bytes32(uint256(2)); signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - digest = bytes(signedMsg).toEthSignedMessageHash(); + digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (v, r, s) = vm.sign(1, digest); signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -56,7 +56,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_RevokeDKIMPublicKeyHash() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); bytes memory signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -68,7 +68,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { domainName, publicKeyHash ); - (uint8 v1, bytes32 r1, bytes32 s1) = vm.sign(1, bytes(revokeMsg).toEthSignedMessageHash()); + (uint8 v1, bytes32 r1, bytes32 s1) = vm.sign(1, MessageHashUtils.toEthSignedMessageHash(bytes(revokeMsg))); bytes memory revokeSig = abi.encodePacked(r1, s1, v1); registry.revokeDKIMPublicKeyHash(selector, domainName, publicKeyHash, revokeSig); @@ -78,7 +78,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_RevertIfDuplicated() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); bytes memory signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -93,7 +93,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_RevertIfRevorked() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(1, digest); bytes memory signature = abi.encodePacked(r, s, v); registry.setDKIMPublicKeyHash(selector, domainName, publicKeyHash, signature); @@ -106,7 +106,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { domainName, publicKeyHash ); - (uint8 v1, bytes32 r1, bytes32 s1) = vm.sign(1, bytes(revokeMsg).toEthSignedMessageHash()); + (uint8 v1, bytes32 r1, bytes32 s1) = vm.sign(1, MessageHashUtils.toEthSignedMessageHash(bytes(revokeMsg))); bytes memory revokeSig = abi.encodePacked(r1, s1, v1); registry.revokeDKIMPublicKeyHash(selector, domainName, publicKeyHash, revokeSig); require(!registry.isDKIMPublicKeyHashValid(domainName, publicKeyHash)); @@ -121,7 +121,7 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_RevertIfSignatureInvalid() public { // vm.chainId(1); string memory signedMsg = registry.computeSignedMsg(registry.SET_PREFIX(), selector, domainName, publicKeyHash); - bytes32 digest = bytes(signedMsg).toEthSignedMessageHash(); + bytes32 digest = MessageHashUtils.toEthSignedMessageHash(bytes(signedMsg)); (uint8 v, bytes32 r, bytes32 s) = vm.sign(2, digest); bytes memory signature = abi.encodePacked(r, s, v); vm.expectRevert("Invalid signature"); @@ -140,7 +140,8 @@ contract ECDSAOwnedDKIMRegistryTest is Test { function test_Dfinity_Oracle_Response() public { // vm.chainId(1); - registry = new ECDSAOwnedDKIMRegistry(0x69Bec2Dd161d6Bbcc91ec32AA44D9333EBc864c0); + vm.startPrank(vm.addr(9)); + registry = new ECDSAOwnedDKIMRegistry(vm.addr(9)); selector = "20230601"; domainName = "gmail.com"; publicKeyHash = 0x0ea9c777dc7110e5a9e89b13f0cfc540e3845ba120b2b6dc24024d61488d4788; @@ -149,9 +150,10 @@ contract ECDSAOwnedDKIMRegistryTest is Test { domainName, publicKeyHash, vm.parseBytes( - "0xe5fb9c45bd6468877e8ec7e04063b03e8ac89206354060e757b15d6269f7754e6c515b5825fbb6be4e939f92d1ad62dc7f548607fe4349033ed51f8da8a18c4c1c" + "0xc6d01bb1b4072405ddf68ffee128d9ff246538c532fea04a35df4b6337581310570cfd0f5d9c1f3f3ccba813c318090ec53ce24d85b60c6953e9457a8012425f1b" ) ); require(registry.isDKIMPublicKeyHashValid(domainName, publicKeyHash), "Invalid public key hash"); + vm.stopPrank(); } } diff --git a/packages/contracts/test/EmailWalletCore.cmd.extension.nft.t.sol b/packages/contracts/test/EmailWalletCore.cmd.extension.nft.t.sol index 9ac83df9..44885398 100644 --- a/packages/contracts/test/EmailWalletCore.cmd.extension.nft.t.sol +++ b/packages/contracts/test/EmailWalletCore.cmd.extension.nft.t.sol @@ -492,6 +492,6 @@ contract ExtensionCommandTest is EmailWalletCoreTestHelper { function testUpgradeability() public { NFTExtension implV2 = new NFTExtension(); - nftExtension.upgradeTo(address(implV2)); + nftExtension.upgradeToAndCall(address(implV2), new bytes(0)); } } diff --git a/packages/contracts/test/EmailWalletCore.cmd.extension.uniswap.t.sol b/packages/contracts/test/EmailWalletCore.cmd.extension.uniswap.t.sol index 6680eb99..e05021b4 100644 --- a/packages/contracts/test/EmailWalletCore.cmd.extension.uniswap.t.sol +++ b/packages/contracts/test/EmailWalletCore.cmd.extension.uniswap.t.sol @@ -438,6 +438,6 @@ contract UniswapExtensionCommandTest is EmailWalletCoreTestHelper { function testUpgradeability() public { UniswapExtension implV2 = new UniswapExtension(); - uniExtension.upgradeTo(address(implV2)); + uniExtension.upgradeToAndCall(address(implV2), new bytes(0)); } } diff --git a/packages/contracts/test/EmailWalletCore.emailOp.t.sol b/packages/contracts/test/EmailWalletCore.emailOp.t.sol index 1233fac2..f02abb17 100644 --- a/packages/contracts/test/EmailWalletCore.emailOp.t.sol +++ b/packages/contracts/test/EmailWalletCore.emailOp.t.sol @@ -357,7 +357,7 @@ contract EmailOpValidationTest is EmailWalletCoreTestHelper { emailOp.feePerGas = maxFeePerGas; vm.startPrank(relayer); - vm.expectRevert("fee reimbursement failed: ERC20: transfer amount exceeds balance"); + vm.expectRevert("fee reimbursement failed: ERC20InsufficientBalance"); core.handleEmailOp(emailOp); vm.stopPrank(); } diff --git a/packages/contracts/test/EmailWalletCore.t.sol b/packages/contracts/test/EmailWalletCore.t.sol index 6487ff77..01cf2ed9 100644 --- a/packages/contracts/test/EmailWalletCore.t.sol +++ b/packages/contracts/test/EmailWalletCore.t.sol @@ -15,7 +15,7 @@ contract EmailWalletCoreTest is EmailWalletCoreTestHelper { EmailWalletCore implV2 = new EmailWalletCore(); vm.startPrank(deployer); - core.upgradeTo(address(implV2)); + core.upgradeToAndCall(address(implV2), new bytes(0)); vm.stopPrank(); } } diff --git a/packages/contracts/test/EmailWalletCore.us.t.sol b/packages/contracts/test/EmailWalletCore.us.t.sol index 1924b3c9..4a1eb9eb 100644 --- a/packages/contracts/test/EmailWalletCore.us.t.sol +++ b/packages/contracts/test/EmailWalletCore.us.t.sol @@ -197,7 +197,7 @@ contract UnclaimedStateTest is EmailWalletCoreTestHelper { vm.stopPrank(); assertEq(success, false, "handleEmailOp should fail"); - assertEq(string(reason), "ERC721: invalid token ID", "reason mismatch"); + assertEq(string(reason), "ERC721NonexistentToken", "reason mismatch"); } function test_RevertIf_RegisterUnclaimedState_NotEnoughFee() public { @@ -428,7 +428,7 @@ contract UnclaimedStateTest is EmailWalletCoreTestHelper { vm.deal(sender, unclaimedStateClaimGas * maxFeePerGas); vm.startPrank(sender); - vm.expectRevert("unclaimed state reg err: ERC721: invalid token ID"); + vm.expectRevert("unclaimed state reg err: ERC721NonexistentToken()"); unclaimsHandler.registerUnclaimedState{value: unclaimedStateClaimGas * maxFeePerGas}( recipientEmailAddrCommit, address(nftExtension), diff --git a/packages/contracts/test/ExtensionHandler.t.sol b/packages/contracts/test/ExtensionHandler.t.sol index ef9a372f..937a12a1 100644 --- a/packages/contracts/test/ExtensionHandler.t.sol +++ b/packages/contracts/test/ExtensionHandler.t.sol @@ -174,7 +174,7 @@ contract ExtensionTest is EmailWalletCoreTestHelper { ExtensionHandler implV2 = new ExtensionHandler(); vm.startPrank(deployer); - extensionHandler.upgradeTo(address(implV2)); + extensionHandler.upgradeToAndCall(address(implV2), new bytes(0)); vm.stopPrank(); } } diff --git a/packages/contracts/test/RelayerHandler.t.sol b/packages/contracts/test/RelayerHandler.t.sol index 98aaf5f7..8c288822 100644 --- a/packages/contracts/test/RelayerHandler.t.sol +++ b/packages/contracts/test/RelayerHandler.t.sol @@ -84,7 +84,7 @@ contract RelayerTest is EmailWalletCoreTestHelper { RelayerHandler implV2 = new RelayerHandler(); vm.startPrank(deployer); - relayerHandler.upgradeTo(address(implV2)); + relayerHandler.upgradeToAndCall(address(implV2), new bytes(0)); vm.stopPrank(); } } diff --git a/packages/contracts/test/TokenRegistry.t.sol b/packages/contracts/test/TokenRegistry.t.sol index 0ecf71d8..35976aa1 100644 --- a/packages/contracts/test/TokenRegistry.t.sol +++ b/packages/contracts/test/TokenRegistry.t.sol @@ -28,7 +28,7 @@ contract TokenRegistryTest is Test { function testUpgradeability() public { TokenRegistryV2 tokenRegistryV2Impl = new TokenRegistryV2(); - tokenRegistry.upgradeTo(address(tokenRegistryV2Impl)); + tokenRegistry.upgradeToAndCall(address(tokenRegistryV2Impl), new bytes(0)); tokenRegistryV2 = TokenRegistryV2(address(proxy)); address usdc = tokenRegistry.getTokenAddress(0, "USDC"); diff --git a/packages/contracts/test/UnclaimsHandler.t.sol b/packages/contracts/test/UnclaimsHandler.t.sol index a0d4d566..66efd369 100644 --- a/packages/contracts/test/UnclaimsHandler.t.sol +++ b/packages/contracts/test/UnclaimsHandler.t.sol @@ -13,7 +13,7 @@ contract UnclaimsTest is EmailWalletCoreTestHelper { UnclaimsHandler implV2 = new UnclaimsHandler(); vm.startPrank(deployer); - unclaimsHandler.upgradeTo(address(implV2)); + unclaimsHandler.upgradeToAndCall(address(implV2), new bytes(0)); vm.stopPrank(); } } diff --git a/packages/contracts/test/Wallet.t.sol b/packages/contracts/test/Wallet.t.sol index e05062fa..09bc604c 100644 --- a/packages/contracts/test/Wallet.t.sol +++ b/packages/contracts/test/Wallet.t.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; -import {Create2Upgradeable} from "@openzeppelin/contracts-upgradeable/utils/Create2Upgradeable.sol"; +import {Create2} from "@openzeppelin/contracts/utils/Create2.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; import {Wallet} from "../src/Wallet.sol"; import {WETH9} from "./helpers/WETH9.sol"; @@ -39,7 +39,7 @@ contract WalletTest is Test { function _getWalletOfSalt(bytes32 salt) internal view returns (address) { return - Create2Upgradeable.computeAddress( + Create2.computeAddress( salt, keccak256( abi.encodePacked( @@ -98,7 +98,7 @@ contract WalletTest is Test { Wallet wallet = _deployWallet(salt); TestWallet newImplementation = new TestWallet(address(weth)); - wallet.upgradeTo(address(newImplementation)); // Upgrade to new test implementation + wallet.upgradeToAndCall(address(newImplementation), new bytes(0)); // Upgrade to new test implementation TestWallet wallet2 = TestWallet(payable(address(wallet))); assertEq(wallet2.getName(), "Test"); // Test function from new implementation diff --git a/packages/contracts/test/helpers/EmailWalletCoreTestHelper.sol b/packages/contracts/test/helpers/EmailWalletCoreTestHelper.sol index ed224f98..888b213d 100644 --- a/packages/contracts/test/helpers/EmailWalletCoreTestHelper.sol +++ b/packages/contracts/test/helpers/EmailWalletCoreTestHelper.sol @@ -91,7 +91,7 @@ contract EmailWalletCoreTestHelper is Test { tokenRegistry = TokenRegistry(payable(address(proxy))); } - dkimRegistry = new DKIMRegistry(); + dkimRegistry = new DKIMRegistry(deployer); priceOracle = new TestOracle(); weth = new WETH9(); @@ -168,18 +168,20 @@ contract EmailWalletCoreTestHelper is Test { abi.encodeCall( coreImpl.initialize, ( - address(relayerHandler), - address(accountHandler), - address(unclaimsHandler), - address(extensionHandler), - address(verifier), - address(tokenRegistry), - address(priceOracle), - address(weth), - maxFeePerGas, - emailValidityDuration, - unclaimedFundClaimGas, - unclaimedStateClaimGas + InitParams({ + relayerHandler: address(relayerHandler), + accountHandler: address(accountHandler), + unclaimsHandler: address(unclaimsHandler), + extensionHandler: address(extensionHandler), + verifier: address(verifier), + tokenRegistry: address(tokenRegistry), + priceOracle: address(priceOracle), + wethContract: address(weth), + maxFeePerGas: maxFeePerGas, + emailValidityDuration: emailValidityDuration, + unclaimedFundClaimGas: unclaimedFundClaimGas, + unclaimedStateClaimGas: unclaimedStateClaimGas + }) ) ) ); diff --git a/packages/contracts/test/helpers/IntegrationTestHelper.sol b/packages/contracts/test/helpers/IntegrationTestHelper.sol index b1a3441d..8262ff68 100644 --- a/packages/contracts/test/helpers/IntegrationTestHelper.sol +++ b/packages/contracts/test/helpers/IntegrationTestHelper.sol @@ -124,7 +124,7 @@ abstract contract IntegrationTestHelper is Test { tokenRegistry = TokenRegistry(payable(address(proxy))); } - dkimRegistry = new DKIMRegistry(); + dkimRegistry = new DKIMRegistry(deployer); priceOracle = new UniswapTWAPOracle(UNISWAP_V3_FACTORY, WETH_ADDR); // weth = new WETH9(); weth = WETH9(payable(WETH_ADDR)); @@ -199,18 +199,20 @@ abstract contract IntegrationTestHelper is Test { abi.encodeCall( coreImpl.initialize, ( - address(relayerHandler), - address(accountHandler), - address(unclaimsHandler), - address(extensionHandler), - address(verifier), - address(tokenRegistry), - address(priceOracle), - address(weth), - maxFeePerGas, - emailValidityDuration, - unclaimedFundClaimGas, - unclaimedStateClaimGas + InitParams({ + relayerHandler: address(relayerHandler), + accountHandler: address(accountHandler), + unclaimsHandler: address(unclaimsHandler), + extensionHandler: address(extensionHandler), + verifier: address(verifier), + tokenRegistry: address(tokenRegistry), + priceOracle: address(priceOracle), + wethContract: address(weth), + maxFeePerGas: maxFeePerGas, + emailValidityDuration: emailValidityDuration, + unclaimedFundClaimGas: unclaimedFundClaimGas, + unclaimedStateClaimGas: unclaimedStateClaimGas + }) ) ) ); diff --git a/packages/contracts/test/helpers/TokenRegistryV2.sol b/packages/contracts/test/helpers/TokenRegistryV2.sol index 3ddf113c..3d4c57ee 100644 --- a/packages/contracts/test/helpers/TokenRegistryV2.sol +++ b/packages/contracts/test/helpers/TokenRegistryV2.sol @@ -25,7 +25,7 @@ contract TokenRegistryV2 is Initializable, UUPSUpgradeable, OwnableUpgradeable { } function initialize() initializer public { - __Ownable_init(); + __Ownable_init(msg.sender); chainIdOfName["mainnet"] = 0; chainIdOfName["optimism"] = 10; chainIdOfName["arbitrum"] = 42161; diff --git a/yarn.lock b/yarn.lock index 37a842ca..12ec421f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1963,21 +1963,26 @@ universal-user-agent "^2.0.0" url-template "^2.0.8" -"@openzeppelin/contracts-upgradeable@^4.9.2": - version "4.9.6" - resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.9.6.tgz#38b21708a719da647de4bb0e4802ee235a0d24df" - integrity sha512-m4iHazOsOCv1DgM7eD7GupTJ+NFVujRZt1wzddDPSVGpWdKq1SKkla5htKG7+IS4d2XOCtzkUNwRZ7Vq5aEUMA== +"@openzeppelin/contracts-upgradeable@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.0.2.tgz#3e5321a2ecdd0b206064356798c21225b6ec7105" + integrity sha512-0MmkHSHiW2NRFiT9/r5Lu4eJq5UJ4/tzlOgYXNAIj/ONkQTVnz22pLxDvp4C4uZ9he7ZFvGn3Driptn1/iU7tQ== "@openzeppelin/contracts@3.4.2-solc-0.7": version "3.4.2-solc-0.7" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635" integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA== -"@openzeppelin/contracts@^4.2.0", "@openzeppelin/contracts@^4.9.2", "@openzeppelin/contracts@^4.9.3": +"@openzeppelin/contracts@^4.2.0", "@openzeppelin/contracts@^4.9.3": version "4.9.6" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.6.tgz#2a880a24eb19b4f8b25adc2a5095f2aa27f39677" integrity sha512-xSmezSupL+y9VkHZJGDoCBpmnB2ogM13ccaYDWqJTfS3dbuHkgjuwDFUmaFauBCboQMGB/S5UqUl2y54X99BmA== +"@openzeppelin/contracts@^5.0.0": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.2.tgz#b1d03075e49290d06570b2fd42154d76c2a5d210" + integrity sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA== + "@peculiar/asn1-schema@^2.3.8": version "2.3.8" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.8.tgz#04b38832a814e25731232dd5be883460a156da3b" @@ -7125,9 +7130,9 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -"node-pre-gyp-github@git+https://github.com/ultamatt/node-pre-gyp-github.git": +"node-pre-gyp-github@https://github.com/ultamatt/node-pre-gyp-github.git": version "1.4.3" - resolved "git+https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f" + resolved "https://github.com/ultamatt/node-pre-gyp-github.git#e4961827f77751489bc8d4760a0479f3f985f34f" dependencies: "@octokit/rest" "^15.9.5" commander "^2.17.0"