diff --git a/packages/erc7984example/app/_components/ERC7984Demo.tsx b/packages/erc7984example/app/_components/ERC7984Demo.tsx
index 0658b97..c0eecbd 100644
--- a/packages/erc7984example/app/_components/ERC7984Demo.tsx
+++ b/packages/erc7984example/app/_components/ERC7984Demo.tsx
@@ -1,9 +1,10 @@
"use client";
-import { useMemo, useState, useEffect } from "react";
+import { useEffect, useMemo, useState } from "react";
+import { FHEBenchmark } from "./FHEBenchmark";
+import { ethers } from "ethers";
import { useFhevm } from "fhevm-sdk";
import { useAccount } from "wagmi";
-import { ethers } from "ethers";
import { RainbowKitCustomConnectButton } from "~~/components/helper/RainbowKitCustomConnectButton";
import { useERC7984Wagmi } from "~~/hooks/erc7984/useERC7984Wagmi";
import { useDeployedContractInfo } from "~~/hooks/helper";
@@ -101,11 +102,7 @@ export const ERC7984Demo = () => {
setClaimStatus("checking");
try {
- const contract = new ethers.Contract(
- airdropContract.address,
- airdropContract.abi,
- erc7984.ethersSigner
- );
+ const contract = new ethers.Contract(airdropContract.address, airdropContract.abi, erc7984.ethersSigner);
const claimed = await contract.hasClaimed(address, erc7984.contractAddress);
setAlreadyClaimed(claimed);
@@ -128,11 +125,7 @@ export const ERC7984Demo = () => {
setClaimStatus("claiming");
try {
- const contract = new ethers.Contract(
- airdropContract.address,
- airdropContract.abi,
- erc7984.ethersSigner
- );
+ const contract = new ethers.Contract(airdropContract.address, airdropContract.abi, erc7984.ethersSigner);
notification.info("Claiming tokens...");
@@ -198,19 +191,13 @@ export const ERC7984Demo = () => {
"disabled:opacity-40 disabled:pointer-events-none disabled:cursor-not-allowed";
// Primary (accent) button
- const primaryButtonClass =
- buttonClass +
- " text-[#2D2D2D] cursor-pointer";
+ const primaryButtonClass = buttonClass + " text-[#2D2D2D] cursor-pointer";
// Secondary button
- const secondaryButtonClass =
- buttonClass +
- " !bg-[#2D2D2D] text-[#F4F4F4] hover:!bg-[#A38025] cursor-pointer";
+ const secondaryButtonClass = buttonClass + " !bg-[#2D2D2D] text-[#F4F4F4] hover:!bg-[#A38025] cursor-pointer";
// Success/confirmed state
- const successButtonClass =
- buttonClass +
- " !bg-[#A38025] text-[#F4F4F4] hover:!bg-[#2D2D2D]";
+ const successButtonClass = buttonClass + " !bg-[#A38025] text-[#F4F4F4] hover:!bg-[#2D2D2D]";
const titleClass = "font-semibold text-[#2D2D2D] text-2xl mb-4 pb-3 border-b border-[#2D2D2D]";
const sectionClass = "glass-card-strong p-8 mb-6 text-[#2D2D2D] relative z-10";
@@ -220,12 +207,12 @@ export const ERC7984Demo = () => {
-
- ⚠️
-
+ ⚠️
Wallet not connected
-
Connect your wallet to use the ERC7984 confidential token demo.
+
+ Connect your wallet to use the ERC7984 confidential token demo.
+
@@ -239,7 +226,9 @@ export const ERC7984Demo = () => {
{/* Header */}
ERC7984 Confidential Token Demo
-
Interact with the Fully Homomorphic Encryption confidential token contract
+
+ Interact with the Fully Homomorphic Encryption confidential token contract
+
{/* Balance Handle Display */}
@@ -272,17 +261,15 @@ export const ERC7984Demo = () => {
onClick={handleClaim}
disabled={!address || claimStatus === "claiming" || claimStatus === "checking" || alreadyClaimed}
>
- {!address ? (
- "Connect Wallet"
- ) : claimStatus === "checking" ? (
- "⏳ Checking..."
- ) : claimStatus === "claiming" ? (
- "⏳ Claiming Tokens..."
- ) : alreadyClaimed ? (
- "✅ Already Claimed"
- ) : (
- "💧 Get Free Tokens"
- )}
+ {!address
+ ? "Connect Wallet"
+ : claimStatus === "checking"
+ ? "⏳ Checking..."
+ : claimStatus === "claiming"
+ ? "⏳ Claiming Tokens..."
+ : alreadyClaimed
+ ? "✅ Already Claimed"
+ : "💧 Get Free Tokens"}
@@ -382,6 +369,9 @@ export const ERC7984Demo = () => {
+
+ {/* FHE Performance Benchmark */}
+
);
};
@@ -433,9 +423,7 @@ function printPropertyTruncated(name: string, value: unknown) {
// Truncate long strings
const shouldTruncate = displayValue.length > 12;
- const truncatedValue = shouldTruncate
- ? `${displayValue.slice(0, 6)}...${displayValue.slice(-4)}`
- : displayValue;
+ const truncatedValue = shouldTruncate ? `${displayValue.slice(0, 6)}...${displayValue.slice(-4)}` : displayValue;
return (
@@ -461,9 +449,7 @@ function printBooleanProperty(name: string, value: boolean) {
{name}
{value ? "✓ true" : "✗ false"}
@@ -471,4 +457,3 @@ function printBooleanProperty(name: string, value: boolean) {
);
}
-
diff --git a/packages/erc7984example/app/_components/FHEBenchmark.tsx b/packages/erc7984example/app/_components/FHEBenchmark.tsx
new file mode 100644
index 0000000..4756d86
--- /dev/null
+++ b/packages/erc7984example/app/_components/FHEBenchmark.tsx
@@ -0,0 +1,225 @@
+"use client";
+
+import { useState } from "react";
+import { FhevmInstance } from "fhevm-sdk";
+import { useAccount } from "wagmi";
+import { useDeployedContractInfo } from "~~/hooks/helper";
+import { useWagmiEthers } from "~~/hooks/wagmi/useWagmiEthers";
+import type { AllowedChainIds } from "~~/utils/helper/networks";
+
+type BenchmarkResult = {
+ operation: string;
+ duration: number;
+ timestamp: string;
+};
+
+type FHEBenchmarkProps = {
+ instance: FhevmInstance | undefined;
+ fhevmStatus: string;
+};
+
+export const FHEBenchmark = ({ instance, fhevmStatus }: FHEBenchmarkProps) => {
+ const { chain } = useAccount();
+ const chainId = chain?.id;
+
+ const initialMockChains = { 31337: "http://localhost:8545" };
+
+ const [results, setResults] = useState([]);
+ const [isRunning, setIsRunning] = useState(false);
+ const [threadInfo, setThreadInfo] = useState("Click 'Check Threading' to analyze");
+ const [statusMessage, setStatusMessage] = useState("");
+
+ const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
+
+ // Get ethers signer and contract info
+ const { ethersSigner } = useWagmiEthers(initialMockChains);
+ const allowedChainId = typeof chainId === "number" ? (chainId as AllowedChainIds) : undefined;
+ const { data: erc7984 } = useDeployedContractInfo({ contractName: "ERC7984Example", chainId: allowedChainId });
+
+ const addResult = (operation: string, duration: number) => {
+ setResults(prev => [
+ ...prev,
+ {
+ operation,
+ duration,
+ timestamp: new Date().toISOString(),
+ },
+ ]);
+ };
+
+ const checkThreading = () => {
+ try {
+ const info: string[] = [];
+
+ // Check for crossOriginIsolated (required for SharedArrayBuffer/multi-threading)
+ info.push(`crossOriginIsolated: ${window.crossOriginIsolated}`);
+
+ // Check for SharedArrayBuffer support
+ info.push(`SharedArrayBuffer: ${typeof SharedArrayBuffer !== "undefined"}`);
+
+ // Check navigator.hardwareConcurrency
+ info.push(`CPU cores: ${navigator.hardwareConcurrency || "unknown"}`);
+
+ // Check if relayerSDK is loaded
+ const w = window as any;
+ info.push(`relayerSDK loaded: ${!!w.relayerSDK}`);
+
+ setThreadInfo(info.join(" | "));
+ } catch (e) {
+ setThreadInfo(`Error: ${e}`);
+ }
+ };
+
+ const waitWithCountdown = async (seconds: number, message: string) => {
+ for (let i = seconds; i > 0; i--) {
+ setStatusMessage(`${message} (${i}s remaining)`);
+ await delay(1000);
+ }
+ setStatusMessage("");
+ };
+
+ const runEncryptionBenchmark = async () => {
+ if (!instance || !ethersSigner || !erc7984?.address) {
+ alert("Instance, signer, or contract not ready");
+ return;
+ }
+
+ setIsRunning(true);
+ setResults([]); // Clear previous results
+ const userAddress = await ethersSigner.getAddress();
+ const totalRuns = 3; // Reduced to 3 runs to minimize rate limit risk
+
+ try {
+ // Warm-up run
+ setStatusMessage("Running warm-up encryption...");
+ console.log("[Benchmark] Warm-up encryption...");
+ const warmupStart = performance.now();
+ const warmupInput = instance.createEncryptedInput(erc7984.address, userAddress);
+ (warmupInput as any).add64(BigInt(100));
+ await (warmupInput as any).encrypt();
+ const warmupEnd = performance.now();
+ addResult("Warm-up (euint64)", warmupEnd - warmupStart);
+
+ // Wait before next request
+ await waitWithCountdown(10, "Rate limit cooldown");
+
+ // Run benchmark encryptions with delays
+ for (let i = 0; i < totalRuns; i++) {
+ setStatusMessage(`Running encryption #${i + 1}...`);
+ console.log(`[Benchmark] Encryption #${i + 1}...`);
+ const startN = performance.now();
+ const inputN = instance.createEncryptedInput(erc7984.address, userAddress);
+ (inputN as any).add64(BigInt(i * 1000 + 12345));
+ await (inputN as any).encrypt();
+ const endN = performance.now();
+ addResult(`Encrypt euint64 #${i + 1}`, endN - startN);
+
+ // Wait between requests (except after the last one)
+ if (i < totalRuns - 1) {
+ await waitWithCountdown(10, "Rate limit cooldown");
+ }
+ }
+
+ setStatusMessage("Benchmark complete!");
+ console.log("[Benchmark] Encryption complete!");
+ await delay(2000);
+ setStatusMessage("");
+ } catch (e) {
+ console.error("[Benchmark] Encryption error:", e);
+ addResult("Encryption ERROR", -1);
+ setStatusMessage("Error occurred during benchmark");
+ } finally {
+ setIsRunning(false);
+ }
+ };
+
+ const clearResults = () => {
+ setResults([]);
+ };
+
+ const isReady = instance && ethersSigner && erc7984?.address;
+ const validResults = results.filter(r => r.duration > 0 && !r.operation.includes("Warm-up"));
+ const avgDuration =
+ validResults.length > 0 ? validResults.reduce((a, b) => a + b.duration, 0) / validResults.length : 0;
+
+ return (
+
+
FHE Performance Benchmark
+
+ {/* Threading Info */}
+
+
Threading Status:
+
{threadInfo}
+
+ Check Threading
+
+
+
+ {/* Status */}
+
+
+ FHEVM Status: {fhevmStatus}
+
+
+ Ready: {isReady ? "Yes" : "No"}
+ {!isReady && " - Connect wallet and wait for FHEVM instance"}
+
+
+
+ {/* Rate Limit Warning */}
+
+ Rate Limit Warning: The FHE encryption service has strict rate limits.
+ More than 5 requests in 10 seconds will result in a 1-hour ban. This benchmark includes 10-second delays between
+ operations to stay safe.
+
+
+ {/* Actions */}
+
+
+ {isRunning ? "Running..." : "Run Encryption Benchmark"}
+
+
+ Clear Results
+
+
+
+ {/* Status Message */}
+ {statusMessage && (
+
{statusMessage}
+ )}
+
+ {/* Results Table */}
+ {results.length > 0 && (
+
+
+
+
+ Operation
+ Duration (ms)
+ Time
+
+
+
+ {results.map((r, i) => (
+
+ {r.operation}
+
+ {r.duration < 0 ? "ERROR" : r.duration.toFixed(2)}
+
+ {r.timestamp.split("T")[1].split(".")[0]}
+
+ ))}
+
+
+
+ )}
+
+ {/* Summary */}
+ {validResults.length > 0 && (
+
+ Average (excluding warm-up): {avgDuration.toFixed(2)} ms across {validResults.length} runs
+
+ )}
+
+ );
+};
diff --git a/packages/erc7984example/app/layout.tsx b/packages/erc7984example/app/layout.tsx
index 810a9f4..3191aa5 100644
--- a/packages/erc7984example/app/layout.tsx
+++ b/packages/erc7984example/app/layout.tsx
@@ -1,5 +1,5 @@
-import "@rainbow-me/rainbowkit/styles.css";
import Script from "next/script";
+import "@rainbow-me/rainbowkit/styles.css";
import { DappWrapperWithProviders } from "~~/components/DappWrapperWithProviders";
import { ThemeProvider } from "~~/components/ThemeProvider";
import "~~/styles/globals.css";
@@ -14,16 +14,10 @@ const DappWrapper = ({ children }: { children: React.ReactNode }) => {
return (
-
+
-
+
{children}
diff --git a/packages/erc7984example/components/DappWrapperWithProviders.tsx b/packages/erc7984example/components/DappWrapperWithProviders.tsx
index 52b763d..1c4b817 100644
--- a/packages/erc7984example/components/DappWrapperWithProviders.tsx
+++ b/packages/erc7984example/components/DappWrapperWithProviders.tsx
@@ -1,9 +1,9 @@
"use client";
import { useEffect, useState } from "react";
-import { InMemoryStorageProvider } from "fhevm-sdk";
import { RainbowKitProvider, darkTheme, lightTheme } from "@rainbow-me/rainbowkit";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { InMemoryStorageProvider } from "fhevm-sdk";
import { AppProgressBar as ProgressBar } from "next-nprogress-bar";
import { useTheme } from "next-themes";
import { Toaster } from "react-hot-toast";
diff --git a/packages/erc7984example/components/Header.tsx b/packages/erc7984example/components/Header.tsx
index 48f7131..b67d5d5 100644
--- a/packages/erc7984example/components/Header.tsx
+++ b/packages/erc7984example/components/Header.tsx
@@ -23,19 +23,11 @@ export const Header = () => {
{/* Optional: Zama text */}
-
- Zama
-
+ Zama
diff --git a/packages/erc7984example/components/helper/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx b/packages/erc7984example/components/helper/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx
index 0380230..755a3cc 100644
--- a/packages/erc7984example/components/helper/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx
+++ b/packages/erc7984example/components/helper/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx
@@ -7,14 +7,14 @@ export const WrongNetworkDropdown = () => {
return (
-
+
Wrong network
-
+
{
{(() => {
if (!connected) {
return (
-
+
Connect Wallet
);
diff --git a/packages/erc7984example/contracts/deployedContracts.ts b/packages/erc7984example/contracts/deployedContracts.ts
index 2984e62..3d55c2c 100644
--- a/packages/erc7984example/contracts/deployedContracts.ts
+++ b/packages/erc7984example/contracts/deployedContracts.ts
@@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/helper/contract";
const deployedContracts = {
31337: {
Airdrop: {
- address: "0x380ee13b0039852314fFF513821729B052D06a71",
+ address: "0xaa79c20a43C74bD77c392Ca0e71E032FeF2C908A",
abi: [
{
inputs: [],
@@ -188,10 +188,10 @@ const deployedContracts = {
renounceOwnership: "@openzeppelin/contracts/access/Ownable.sol",
transferOwnership: "@openzeppelin/contracts/access/Ownable.sol",
},
- deployedOnBlock: 4,
+ deployedOnBlock: 9,
},
ERC7984Example: {
- address: "0xc1b7223f08F52fbfA263c27674AE577911c3b20e",
+ address: "0xab9E69656210f333c3164A86372d013C646bf0eC",
abi: [
{
inputs: [
@@ -333,6 +333,22 @@ const deployedContracts = {
name: "OwnableUnauthorizedAccount",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "bytes32",
+ name: "handle",
+ type: "bytes32",
+ },
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ ],
+ name: "SenderNotAllowedToUseHandle",
+ type: "error",
+ },
{
inputs: [],
name: "ZamaProtocolUnsupported",
@@ -1037,12 +1053,12 @@ const deployedContracts = {
renounceOwnership: "@openzeppelin/contracts/access/Ownable2Step.sol",
transferOwnership: "@openzeppelin/contracts/access/Ownable2Step.sol",
},
- deployedOnBlock: 3,
+ deployedOnBlock: 8,
},
},
11155111: {
Airdrop: {
- address: "0x2D3810D5325cbE4B4dCf3038912E78f2AAd2A595",
+ address: "0x2f4233a77888379Cd1eFa450CdE921692Ba1e23A",
abi: [
{
inputs: [],
@@ -1223,10 +1239,10 @@ const deployedContracts = {
renounceOwnership: "@openzeppelin/contracts/access/Ownable.sol",
transferOwnership: "@openzeppelin/contracts/access/Ownable.sol",
},
- deployedOnBlock: 9846809,
+ deployedOnBlock: 10003094,
},
ERC7984Example: {
- address: "0xD0AcD6B6C23Cbef73c435C6AdD890e92A896EEEa",
+ address: "0x8D253197C72382C7E4eB31DCA4812D708ED3cA44",
abi: [
{
inputs: [
@@ -1368,6 +1384,22 @@ const deployedContracts = {
name: "OwnableUnauthorizedAccount",
type: "error",
},
+ {
+ inputs: [
+ {
+ internalType: "bytes32",
+ name: "handle",
+ type: "bytes32",
+ },
+ {
+ internalType: "address",
+ name: "sender",
+ type: "address",
+ },
+ ],
+ name: "SenderNotAllowedToUseHandle",
+ type: "error",
+ },
{
inputs: [],
name: "ZamaProtocolUnsupported",
@@ -2072,7 +2104,7 @@ const deployedContracts = {
renounceOwnership: "@openzeppelin/contracts/access/Ownable2Step.sol",
transferOwnership: "@openzeppelin/contracts/access/Ownable2Step.sol",
},
- deployedOnBlock: 9846671,
+ deployedOnBlock: 10003093,
},
},
} as const;
diff --git a/packages/erc7984example/hooks/erc7984/useERC7984Wagmi.tsx b/packages/erc7984example/hooks/erc7984/useERC7984Wagmi.tsx
index bced0eb..8a0b6e4 100644
--- a/packages/erc7984example/hooks/erc7984/useERC7984Wagmi.tsx
+++ b/packages/erc7984example/hooks/erc7984/useERC7984Wagmi.tsx
@@ -3,17 +3,12 @@
import { useCallback, useEffect, useMemo, useState } from "react";
import { useDeployedContractInfo } from "../helper";
import { useWagmiEthers } from "../wagmi/useWagmiEthers";
-import { FhevmInstance } from "fhevm-sdk";
-import {
- getEncryptionMethod,
- useFHEDecrypt,
- useFHEEncryption,
- useInMemoryStorage,
-} from "fhevm-sdk";
import { ethers } from "ethers";
+import { FhevmInstance } from "fhevm-sdk";
+import { getEncryptionMethod, useFHEDecrypt, useFHEEncryption, useInMemoryStorage } from "fhevm-sdk";
+import { useAccount, useReadContract } from "wagmi";
import type { Contract } from "~~/utils/helper/contract";
import type { AllowedChainIds } from "~~/utils/helper/networks";
-import { useReadContract, useAccount } from "wagmi";
/**
* useERC7984Wagmi - ERC7984 Confidential Token hook for Wagmi
@@ -52,18 +47,19 @@ export const useERC7984Wagmi = (parameters: {
const hasProvider = Boolean(ethersReadonlyProvider);
const hasSigner = Boolean(ethersSigner);
- const getContract = (mode: "read" | "write") => {
- if (!hasContract) return undefined;
- const providerOrSigner = mode === "read" ? ethersReadonlyProvider : ethersSigner;
- if (!providerOrSigner) return undefined;
- return new ethers.Contract(erc7984!.address, (erc7984 as ERC7984Info).abi, providerOrSigner);
- };
+ const getContract = useCallback(
+ (mode: "read" | "write") => {
+ if (!hasContract) return undefined;
+ const providerOrSigner = mode === "read" ? ethersReadonlyProvider : ethersSigner;
+ if (!providerOrSigner) return undefined;
+ return new ethers.Contract(erc7984!.address, (erc7984 as ERC7984Info).abi, providerOrSigner);
+ },
+ [hasContract, ethersReadonlyProvider, ethersSigner, erc7984],
+ );
// Read balance handle via wagmi
const readResult = useReadContract({
- address: (hasContract ? (erc7984!.address as unknown as `0x${string}`) : undefined) as
- | `0x${string}`
- | undefined,
+ address: (hasContract ? (erc7984!.address as unknown as `0x${string}`) : undefined) as `0x${string}` | undefined,
abi: (hasContract ? ((erc7984 as ERC7984Info).abi as any) : undefined) as any,
functionName: "confidentialBalanceOf" as const,
args: [address as `0x${string}`],
@@ -85,7 +81,7 @@ export const useERC7984Wagmi = (parameters: {
const requests = useMemo(() => {
if (!hasContract || !balanceHandle || balanceHandle === ethers.ZeroHash) return undefined;
return [{ handle: balanceHandle, contractAddress: erc7984!.address } as const];
- }, [hasContract, erc7984?.address, balanceHandle]);
+ }, [hasContract, erc7984, balanceHandle]);
const {
canDecrypt,
@@ -117,23 +113,32 @@ export const useERC7984Wagmi = (parameters: {
const decryptBalanceHandle = decrypt;
// Mutations (transfer)
- const { encryptWith } = useFHEEncryption({ instance, ethersSigner: ethersSigner as any, contractAddress: erc7984?.address });
+ const { encryptWith } = useFHEEncryption({
+ instance,
+ ethersSigner: ethersSigner as any,
+ contractAddress: erc7984?.address,
+ });
const canTransfer = useMemo(
() => Boolean(hasContract && instance && hasSigner && !isProcessing),
[hasContract, instance, hasSigner, isProcessing],
);
- const getEncryptionMethodForTransfer = () => {
+ const getEncryptionMethodForTransfer = useCallback(() => {
const functionAbi = erc7984?.abi.find(item => item.type === "function" && item.name === "confidentialTransfer");
- if (!functionAbi) return { method: undefined as string | undefined, error: "Function ABI not found for confidentialTransfer" } as const;
+ if (!functionAbi)
+ return {
+ method: undefined as string | undefined,
+ error: "Function ABI not found for confidentialTransfer",
+ } as const;
if (!functionAbi.inputs)
return { method: undefined as string | undefined, error: "No inputs found for confidentialTransfer" } as const;
// Find the externalEuint64 input parameter (use the one with proof)
const inputs = Array.isArray(functionAbi.inputs) ? functionAbi.inputs : [];
const amountInput = inputs.find(input => input.internalType?.includes("externalEuint64"));
- if (!amountInput) return { method: undefined as string | undefined, error: "externalEuint64 input not found" } as const;
+ if (!amountInput)
+ return { method: undefined as string | undefined, error: "externalEuint64 input not found" } as const;
return { method: getEncryptionMethod(amountInput.internalType || ""), error: undefined } as const;
- };
+ }, [erc7984]);
const transferTokens = useCallback(
async (to: string, amount: number) => {
@@ -166,7 +171,7 @@ export const useERC7984Wagmi = (parameters: {
setIsProcessing(false);
}
},
- [isProcessing, canTransfer, encryptWith, getContract, refreshBalanceHandle],
+ [isProcessing, canTransfer, encryptWith, getContract, refreshBalanceHandle, getEncryptionMethodForTransfer],
);
return {
diff --git a/packages/erc7984example/next.config.ts b/packages/erc7984example/next.config.ts
index 6b4c8ad..b62b995 100644
--- a/packages/erc7984example/next.config.ts
+++ b/packages/erc7984example/next.config.ts
@@ -4,6 +4,26 @@ const nextConfig: NextConfig = {
transpilePackages: ["fhevm-sdk"],
// Exclude Node.js packages that are incompatible with Turbopack bundling
serverExternalPackages: ["pino", "thread-stream", "pino-pretty"],
+ // Empty turbopack config - Turbopack handles Node.js fallbacks automatically
+ turbopack: {},
+ // Enable cross-origin isolation for SharedArrayBuffer (required for FHEVM multi-threading)
+ async headers() {
+ return [
+ {
+ source: "/(.*)",
+ headers: [
+ {
+ key: "Cross-Origin-Opener-Policy",
+ value: "same-origin",
+ },
+ {
+ key: "Cross-Origin-Embedder-Policy",
+ value: "require-corp",
+ },
+ ],
+ },
+ ];
+ },
// Configure webpack fallbacks for client-side (these packages shouldn't be bundled for browser)
webpack: (config, { isServer }) => {
if (!isServer) {
diff --git a/packages/erc7984example/package.json b/packages/erc7984example/package.json
index 67d8744..1c89251 100644
--- a/packages/erc7984example/package.json
+++ b/packages/erc7984example/package.json
@@ -20,7 +20,7 @@
"@tanstack/react-query": "~5.59.20",
"@uniswap/sdk-core": "~5.8.5",
"@uniswap/v2-sdk": "~4.6.2",
- "@zama-fhe/relayer-sdk": "0.3.0-5",
+ "@zama-fhe/relayer-sdk": "0.4.0-2",
"blo": "~1.2.0",
"burner-connector": "0.0.18",
"daisyui": "5.0.9",
diff --git a/packages/erc7984example/postcss.config.mjs b/packages/erc7984example/postcss.config.mjs
index 54f963b..d5c96e4 100644
--- a/packages/erc7984example/postcss.config.mjs
+++ b/packages/erc7984example/postcss.config.mjs
@@ -5,4 +5,4 @@ const config = {
},
};
-export default config;
\ No newline at end of file
+export default config;
diff --git a/packages/erc7984example/scaffold.config.ts b/packages/erc7984example/scaffold.config.ts
index 409f6de..5f88933 100644
--- a/packages/erc7984example/scaffold.config.ts
+++ b/packages/erc7984example/scaffold.config.ts
@@ -16,7 +16,6 @@ if (!rawAlchemyKey) {
if (process.env.NODE_ENV === "production") {
throw new Error("Environment variable NEXT_PUBLIC_ALCHEMY_API_KEY is required in production.");
} else {
- // eslint-disable-next-line no-console
console.warn("NEXT_PUBLIC_ALCHEMY_API_KEY is not set. Falling back to public RPCs.");
}
}
@@ -24,7 +23,7 @@ if (!rawAlchemyKey) {
const isProduction = process.env.NODE_ENV === "production";
const baseTargets = [chains.sepolia] as const;
// Sepolia first, then hardhat (so Sepolia is default and hardhat is optional)
-const targetNetworks = (isProduction ? baseTargets : ([...baseTargets, chains.hardhat] as const));
+const targetNetworks = isProduction ? baseTargets : ([...baseTargets, chains.hardhat] as const);
const scaffoldConfig = {
// The networks on which your DApp is live
diff --git a/packages/erc7984example/services/web3/wagmiConnectors.tsx b/packages/erc7984example/services/web3/wagmiConnectors.tsx
index 2c8b3fd..c75c065 100644
--- a/packages/erc7984example/services/web3/wagmiConnectors.tsx
+++ b/packages/erc7984example/services/web3/wagmiConnectors.tsx
@@ -1,6 +1,5 @@
import { connectorsForWallets } from "@rainbow-me/rainbowkit";
import {
- coinbaseWallet,
ledgerWallet,
metaMaskWallet,
rainbowWallet,
@@ -17,7 +16,6 @@ const wallets = [
metaMaskWallet,
walletConnectWallet,
ledgerWallet,
- coinbaseWallet,
rainbowWallet,
safeWallet,
...(!targetNetworks.some(network => network.id !== (chains.hardhat as chains.Chain).id) || !onlyLocalBurnerWallet
diff --git a/packages/erc7984example/utils/helper/notification.tsx b/packages/erc7984example/utils/helper/notification.tsx
index e4d9cb9..0cf10bc 100644
--- a/packages/erc7984example/utils/helper/notification.tsx
+++ b/packages/erc7984example/utils/helper/notification.tsx
@@ -56,16 +56,14 @@ const Notification = ({
>
{/* Icon with glow effect */}
-
- {icon ? icon : ENUM_STATUSES[status]}
-
-
- {icon ? icon : ENUM_STATUSES[status]}
-
+
{icon ? icon : ENUM_STATUSES[status]}
+
{icon ? icon : ENUM_STATUSES[status]}
{/* Content */}
-
+
{content}
diff --git a/packages/fhevm-sdk/package.json b/packages/fhevm-sdk/package.json
index 2f677ac..2080a81 100644
--- a/packages/fhevm-sdk/package.json
+++ b/packages/fhevm-sdk/package.json
@@ -37,11 +37,11 @@
},
"dependencies": {
"idb": "^8.0.3",
- "@zama-fhe/relayer-sdk": "^0.3.0-5",
+ "@zama-fhe/relayer-sdk": "^0.4.0-2",
"ethers": "^6.13.4"
},
"peerDependencies": {
- "@fhevm/mock-utils": "^0.3.0-1",
+ "@fhevm/mock-utils": "^0.3.0-4",
"react": ">=16.8.0"
},
"peerDependenciesMeta": {
diff --git a/packages/fhevm-sdk/src/internal/PublicKeyStorage.ts b/packages/fhevm-sdk/src/internal/PublicKeyStorage.ts
index 45df08b..91963da 100644
--- a/packages/fhevm-sdk/src/internal/PublicKeyStorage.ts
+++ b/packages/fhevm-sdk/src/internal/PublicKeyStorage.ts
@@ -49,16 +49,19 @@ async function _getDB(): Promise
| undefined> {
return __dbPromise;
}
-type FhevmInstanceConfigPublicKey = {
- data: Uint8Array | null;
- id: string | null;
+// Types that match @zama-fhe/relayer-sdk v0.4 FhevmPkeConfigType
+type FhevmPublicKeyType = {
+ data: Uint8Array;
+ id: string;
};
-type FhevmInstanceConfigPublicParams = {
- "2048": {
- publicParamsId: string;
- publicParams: Uint8Array;
- };
+type FhevmPkeCrsType = {
+ publicParams: Uint8Array;
+ publicParamsId: string;
+};
+
+type FhevmPkeCrsByCapacityType = {
+ 2048: FhevmPkeCrsType;
};
function assertFhevmStoredPublicKey(
@@ -110,12 +113,12 @@ function assertFhevmStoredPublicParams(
}
export async function publicKeyStorageGet(aclAddress: `0x${string}`): Promise<{
- publicKey?: FhevmInstanceConfigPublicKey;
- publicParams: FhevmInstanceConfigPublicParams | null;
+ publicKey?: FhevmPublicKeyType;
+ publicParams?: FhevmPkeCrsByCapacityType;
}> {
const db = await _getDB();
if (!db) {
- return { publicParams: null };
+ return {};
}
let storedPublicKey: FhevmStoredPublicKey | null = null;
@@ -140,27 +143,25 @@ export async function publicKeyStorageGet(aclAddress: `0x${string}`): Promise<{
//
}
- const publicKeyData = storedPublicKey?.publicKey;
- const publicKeyId = storedPublicKey?.publicKeyId;
- const publicParams = storedPublicParams
- ? {
- "2048": storedPublicParams,
- }
- : null;
+ const result: {
+ publicKey?: FhevmPublicKeyType;
+ publicParams?: FhevmPkeCrsByCapacityType;
+ } = {};
- let publicKey: FhevmInstanceConfigPublicKey | undefined = undefined;
+ if (storedPublicKey) {
+ result.publicKey = {
+ id: storedPublicKey.publicKeyId,
+ data: storedPublicKey.publicKey,
+ };
+ }
- if (publicKeyId && publicKeyData) {
- publicKey = {
- id: publicKeyId,
- data: publicKeyData,
+ if (storedPublicParams) {
+ result.publicParams = {
+ 2048: storedPublicParams,
};
}
- return {
- ...(publicKey !== undefined && { publicKey }),
- publicParams,
- };
+ return result;
}
export async function publicKeyStorageSet(
diff --git a/packages/fhevm-sdk/src/internal/constants.ts b/packages/fhevm-sdk/src/internal/constants.ts
index 6d63a86..ec6bb5c 100644
--- a/packages/fhevm-sdk/src/internal/constants.ts
+++ b/packages/fhevm-sdk/src/internal/constants.ts
@@ -1,2 +1,2 @@
export const SDK_CDN_URL =
- "https://cdn.zama.org/relayer-sdk-js/0.3.0-5/relayer-sdk-js.umd.cjs";
+ "https://cdn.zama.org/relayer-sdk-js/0.4.0-2/relayer-sdk-js.umd.cjs";
diff --git a/packages/fhevm-sdk/src/internal/fhevm.ts b/packages/fhevm-sdk/src/internal/fhevm.ts
index 5c8da7a..e65360b 100644
--- a/packages/fhevm-sdk/src/internal/fhevm.ts
+++ b/packages/fhevm-sdk/src/internal/fhevm.ts
@@ -294,6 +294,7 @@ export const createFhevmInstance = async (parameters: {
const config: FhevmInstanceConfig = {
...relayerSDK.SepoliaConfig,
+ relayerUrl: `${relayerSDK.SepoliaConfig.relayerUrl}/v2`,
network: providerOrUrl,
publicKey: pub.publicKey,
publicParams: pub.publicParams,
diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json
index 510f583..6ebe17b 100644
--- a/packages/hardhat/package.json
+++ b/packages/hardhat/package.json
@@ -24,7 +24,7 @@
"hardhat"
],
"dependencies": {
- "@fhevm/solidity": "^0.9.1",
+ "@fhevm/solidity": "^0.10.0",
"@openzeppelin/contracts": "^5.4.0",
"@openzeppelin/contracts-upgradeable": "^5.4.0",
"@zama-fhe/oracle-solidity": "^0.1.0",
@@ -32,8 +32,8 @@
"openzeppelin-confidential-contracts": "git+https://github.com/OpenZeppelin/openzeppelin-confidential-contracts.git#master"
},
"devDependencies": {
- "@fhevm/hardhat-plugin": "^0.3.0-1",
- "@fhevm/mock-utils": "^0.3.0-1",
+ "@fhevm/hardhat-plugin": "^0.3.0-4",
+ "@fhevm/mock-utils": "^0.3.0-4",
"@nomicfoundation/hardhat-chai-matchers": "^2.1.0",
"@nomicfoundation/hardhat-ethers": "^3.1.0",
"@nomicfoundation/hardhat-network-helpers": "^1.1.0",
@@ -45,7 +45,7 @@
"@types/node": "^20.19.8",
"@typescript-eslint/eslint-plugin": "^8.37.0",
"@typescript-eslint/parser": "^8.37.0",
- "@zama-fhe/relayer-sdk": "^0.3.0-5",
+ "@zama-fhe/relayer-sdk": "0.3.0-8",
"chai": "^4.5.0",
"chai-as-promised": "^8.0.1",
"cross-env": "^7.0.3",
diff --git a/packages/hardhat/test/basic/decrypt/UserDecryptMultipleValues.ts b/packages/hardhat/test/basic/decrypt/UserDecryptMultipleValues.ts
index e90cd1b..a1b3ed3 100644
--- a/packages/hardhat/test/basic/decrypt/UserDecryptMultipleValues.ts
+++ b/packages/hardhat/test/basic/decrypt/UserDecryptMultipleValues.ts
@@ -3,7 +3,6 @@ import type { Signers } from "../../types";
import { HardhatFhevmRuntimeEnvironment } from "@fhevm/hardhat-plugin";
import { utils as fhevm_utils } from "@fhevm/mock-utils";
import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers";
-import { DecryptedResults } from "@zama-fhe/relayer-sdk";
import { expect } from "chai";
import { ethers } from "hardhat";
import * as hre from "hardhat";
@@ -68,7 +67,7 @@ describe("UserDecryptMultipleValues", function () {
aliceEip712.message,
);
- const decrytepResults: DecryptedResults = await fhevm.userDecrypt(
+ const decrytepResults = await fhevm.userDecrypt(
[
{ handle: encryptedBool, contractAddress: contractAddress },
{ handle: encryptedUint32, contractAddress: contractAddress },
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 81028d3..e25b7ad 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -46,8 +46,8 @@ importers:
specifier: ~4.6.2
version: 4.6.2
'@zama-fhe/relayer-sdk':
- specifier: 0.3.0-5
- version: 0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ specifier: 0.4.0-2
+ version: 0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
blo:
specifier: ~1.2.0
version: 1.2.0
@@ -164,11 +164,11 @@ importers:
packages/fhevm-sdk:
dependencies:
'@fhevm/mock-utils':
- specifier: ^0.3.0-1
- version: 0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
+ specifier: ^0.3.0-4
+ version: 0.3.0-4(@zama-fhe/relayer-sdk@0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
'@zama-fhe/relayer-sdk':
- specifier: ^0.3.0-5
- version: 0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ specifier: ^0.4.0-2
+ version: 0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
ethers:
specifier: ^6.13.4
version: 6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
@@ -204,8 +204,8 @@ importers:
packages/hardhat:
dependencies:
'@fhevm/solidity':
- specifier: ^0.9.1
- version: 0.9.1
+ specifier: ^0.10.0
+ version: 0.10.0
'@openzeppelin/contracts':
specifier: ^5.4.0
version: 5.4.0
@@ -223,11 +223,11 @@ importers:
version: https://codeload.github.com/OpenZeppelin/openzeppelin-confidential-contracts/tar.gz/89e9be7cf87aa4eda72ad9548044cb53aca20b9f
devDependencies:
'@fhevm/hardhat-plugin':
- specifier: ^0.3.0-1
- version: 0.3.0-1(@fhevm/mock-utils@0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3))(@fhevm/solidity@0.9.1)(@nomicfoundation/hardhat-ethers@3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(encrypted-types@0.0.4)(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))
+ specifier: ^0.3.0-4
+ version: 0.3.0-4(@fhevm/mock-utils@0.3.0-4(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3))(@fhevm/solidity@0.10.0)(@nomicfoundation/hardhat-ethers@3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(encrypted-types@0.0.4)(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))
'@fhevm/mock-utils':
- specifier: ^0.3.0-1
- version: 0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
+ specifier: ^0.3.0-4
+ version: 0.3.0-4(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
'@nomicfoundation/hardhat-chai-matchers':
specifier: ^2.1.0
version: 2.1.0(@nomicfoundation/hardhat-ethers@3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(chai@4.5.0)(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))
@@ -262,8 +262,8 @@ importers:
specifier: ^8.37.0
version: 8.48.0(eslint@8.57.1)(typescript@5.8.3)
'@zama-fhe/relayer-sdk':
- specifier: ^0.3.0-5
- version: 0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ specifier: 0.3.0-8
+ version: 0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10)
chai:
specifier: ^4.5.0
version: 4.5.0
@@ -827,33 +827,33 @@ packages:
resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==}
engines: {node: '>=14'}
- '@fhevm/hardhat-plugin@0.3.0-1':
- resolution: {integrity: sha512-SnxtynkDehpkvoq0CRi1x09J01/K1rP2Q99fMNUv6PxXowwvjhZYhq0vw8qi6mZLI62AVMh94KbzN/Gb3L4e/w==}
+ '@fhevm/hardhat-plugin@0.3.0-4':
+ resolution: {integrity: sha512-TaEaix6k2CgRIV9beeKxgRM368JEEWkRi9GJC7Wl4dcH/KLOFS19/j5+0L/6U2m3zmGMXwQUj2vwGCEufMrikg==}
engines: {node: '>=20', npm: '>=7.0.0'}
peerDependencies:
- '@fhevm/mock-utils': 0.3.0-1
- '@fhevm/solidity': ^0.9.1
+ '@fhevm/mock-utils': 0.3.0-4
+ '@fhevm/solidity': ^0.10.0
'@nomicfoundation/hardhat-ethers': ^3.0.8
- '@zama-fhe/relayer-sdk': ^0.3.0-5
+ '@zama-fhe/relayer-sdk': ^0.3.0-8
encrypted-types: ^0.0.4
ethers: ^6.1.0
hardhat: ^2.0.0
- '@fhevm/host-contracts@0.9.0':
- resolution: {integrity: sha512-N/DRfpXVCzHbg+9NE5sLHzTH3X7Wt3xRSN/7Jyoo+mKgjI7u40heJz8z/dUqvcq0h8wXjXcZcQHgP4pjMNjLKw==}
+ '@fhevm/host-contracts@0.10.0':
+ resolution: {integrity: sha512-lpJi5ktriK55tn5UGmIbOLtQwni2mkVITHqsy4opP+nexinLU/9NCzQi/TQllANpd7Q3f4y5Ukg3JbC942FcRA==}
- '@fhevm/mock-utils@0.3.0-1':
- resolution: {integrity: sha512-1mfzU66Y1r3qc8QUlqnOtENPKchmNx2l1WxFWlcI6CzdskUoywvLRz+w0wnmze8GUpWpFgoclpK2okw1LlzgBQ==}
+ '@fhevm/mock-utils@0.3.0-4':
+ resolution: {integrity: sha512-8CTWMpSJiPR/BVs9WXZ40+YR1E62LyOLRuraTB6yXZ97wfdAI1oMDsHyTEO5JF9i6PYrrWLWjK876WKnPb+TzQ==}
peerDependencies:
- '@zama-fhe/relayer-sdk': ^0.3.0-5
+ '@zama-fhe/relayer-sdk': ^0.3.0-8
ethers: ^6.1.0
typescript: '>=5.0.4'
peerDependenciesMeta:
typescript:
optional: true
- '@fhevm/solidity@0.9.1':
- resolution: {integrity: sha512-QxP+R+6v3aHA/rzgH9cDsiYOwRBB6zLAL3qNI4YfRewKA6ZB01cdkYvrB80FkJyddzxRNsT1jHIvJvSRS8XZ+Q==}
+ '@fhevm/solidity@0.10.0':
+ resolution: {integrity: sha512-Gq8n0sABinDzIZoV9mf0zOxFiDMRqAnv62VEIt502QKEPVoFw8wUtNrl53SjWSEe7GpoIUKuHOrqhyiWSPlzww==}
engines: {node: '>=20.0.0'}
'@gemini-wallet/core@0.2.0':
@@ -2453,8 +2453,13 @@ packages:
'@zama-fhe/oracle-solidity@0.1.0':
resolution: {integrity: sha512-phRego2FW7SWgneQOES/iQ99c97ZCb+KZk5m+lT474dSNrsgEDh96W9T1+Owhc9C6VKtCpMLM43dHXwKHDIw6g==}
- '@zama-fhe/relayer-sdk@0.3.0-5':
- resolution: {integrity: sha512-DIPlN9z5tfSCXqUlhQN2MEv57HmAUHSGV9LPtGs6LWmM7POj6WsMd1hU7Qci4AWPsor7k3IqMfqGGthIvot/DQ==}
+ '@zama-fhe/relayer-sdk@0.3.0-8':
+ resolution: {integrity: sha512-Y0NJcijV/3YJc0KulEHF1oPIWPuaOanWRyr+pNVthnRaaRrrH9HKUdaPPB9uw3vb2CEihAeysLKtmqEtcArPXQ==}
+ engines: {node: '>=22'}
+ hasBin: true
+
+ '@zama-fhe/relayer-sdk@0.4.0-2':
+ resolution: {integrity: sha512-AgcqFRZV7XDQ0a5amqkS0dWxEpqmfHw0TLR/ykkgxuxUHafiYXZ4wUn5H0l4Es9ClLATWIopL6bkya6Z4bOFwQ==}
engines: {node: '>=22'}
hasBin: true
@@ -8190,13 +8195,13 @@ snapshots:
'@fastify/busboy@2.1.1': {}
- '@fhevm/hardhat-plugin@0.3.0-1(@fhevm/mock-utils@0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3))(@fhevm/solidity@0.9.1)(@nomicfoundation/hardhat-ethers@3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(encrypted-types@0.0.4)(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))':
+ '@fhevm/hardhat-plugin@0.3.0-4(@fhevm/mock-utils@0.3.0-4(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3))(@fhevm/solidity@0.10.0)(@nomicfoundation/hardhat-ethers@3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10)))(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(encrypted-types@0.0.4)(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))':
dependencies:
- '@fhevm/host-contracts': 0.9.0
- '@fhevm/mock-utils': 0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
- '@fhevm/solidity': 0.9.1
+ '@fhevm/host-contracts': 0.10.0
+ '@fhevm/mock-utils': 0.3.0-4(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)
+ '@fhevm/solidity': 0.10.0
'@nomicfoundation/hardhat-ethers': 3.1.2(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(hardhat@2.27.0(bufferutil@4.0.9)(ts-node@10.9.2(@types/node@20.19.25)(typescript@5.8.3))(typescript@5.8.3)(utf-8-validate@5.0.10))
- '@zama-fhe/relayer-sdk': 0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ '@zama-fhe/relayer-sdk': 0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10)
debug: 4.4.3(supports-color@8.1.1)
dotenv: 16.6.1
encrypted-types: 0.0.4
@@ -8207,21 +8212,28 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@fhevm/host-contracts@0.9.0':
+ '@fhevm/host-contracts@0.10.0':
dependencies:
encrypted-types: 0.0.4
optionalDependencies:
solidity-comments-darwin-arm64: 0.1.1
solidity-comments-linux-x64-gnu: 0.1.1
- '@fhevm/mock-utils@0.3.0-1(@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)':
+ '@fhevm/mock-utils@0.3.0-4(@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)':
dependencies:
- '@zama-fhe/relayer-sdk': 0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ '@zama-fhe/relayer-sdk': 0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10)
ethers: 6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
optionalDependencies:
typescript: 5.8.3
- '@fhevm/solidity@0.9.1':
+ '@fhevm/mock-utils@0.3.0-4(@zama-fhe/relayer-sdk@0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10))(ethers@6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10))(typescript@5.8.3)':
+ dependencies:
+ '@zama-fhe/relayer-sdk': 0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ ethers: 6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ optionalDependencies:
+ typescript: 5.8.3
+
+ '@fhevm/solidity@0.10.0':
dependencies:
encrypted-types: 0.0.4
optionalDependencies:
@@ -10913,7 +10925,22 @@ snapshots:
transitivePeerDependencies:
- '@openzeppelin/contracts'
- '@zama-fhe/relayer-sdk@0.3.0-5(bufferutil@4.0.9)(utf-8-validate@5.0.10)':
+ '@zama-fhe/relayer-sdk@0.3.0-8(bufferutil@4.0.9)(utf-8-validate@5.0.10)':
+ dependencies:
+ commander: 14.0.2
+ ethers: 6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)
+ fetch-retry: 6.0.0
+ keccak: 3.0.4
+ node-tfhe: 1.4.0-alpha.3
+ node-tkms: 0.12.5
+ tfhe: 1.4.0-alpha.3
+ tkms: 0.12.5
+ wasm-feature-detect: 1.8.0
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
+
+ '@zama-fhe/relayer-sdk@0.4.0-2(bufferutil@4.0.9)(utf-8-validate@5.0.10)':
dependencies:
commander: 14.0.2
ethers: 6.15.0(bufferutil@4.0.9)(utf-8-validate@5.0.10)