+ {/* Contract ID */}
+
+
+ onContractIdChange(e.target.value)}
+ className={cn(
+ "h-9 w-full rounded-lg border bg-surface-2 px-3.5",
+ "text-[13px] text-ink placeholder:text-ink-4",
+ "outline-none transition-colors",
+ "border-line focus:border-line-2 focus:ring-1 focus:ring-brand-dim",
+ )}
+ />
+ {recentContracts.length > 0 && (
+
+ )}
+
+
+ {/* Method */}
+
+
+ setMethod(e.target.value)}
+ className={cn(
+ "h-9 w-full rounded-lg border bg-surface-2 px-3.5",
+ "text-[13px] text-ink placeholder:text-ink-4",
+ "outline-none transition-colors",
+ "border-line focus:border-line-2 focus:ring-1 focus:ring-brand-dim",
+ )}
+ />
+ {recentMethods.length > 0 && (
+
+ )}
+
+
+ {/* Arguments */}
+
setArgs(e.target.value)}
+ error={argsError ?? undefined}
+ />
+
+ {/* Actions */}
+
+
+
+
+
+
+ {/* Error from invocation */}
+ {state === "error" && error && (
+
+ )}
+
+ {/* Result block */}
+ {state === "success" && result !== null && (
+
+
+
+ Result
+
+
+
+
+ {resultJson}
+
+
+ )}
+
+ {!isConnected && (
+
Connect wallet to invoke
+ )}
+
+ );
}
diff --git a/vite.config.ts b/vite.config.ts
index 275c5aa..b9ed368 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -32,4 +32,9 @@ export default defineConfig({
'@': path.resolve(__dirname, './src'),
},
},
+ test: {
+ environment: 'jsdom',
+ setupFiles: ['./src/setupTests.ts'],
+ globals: true,
+ },
})