From 206c16a0fe684167d7a92b5d5ce48edf2709c10a Mon Sep 17 00:00:00 2001 From: Gilberts Ahumada Date: Tue, 23 Jun 2026 19:26:19 +0700 Subject: [PATCH] fix: point default TEE registry to the current contract DEFAULT_TEE_REGISTRY_ADDRESS pointed at a deprecated registry with 0 active LLM-proxy TEEs, so default-config inference always failed with 'No active LLM proxy TEE found in the registry'. Bump it to the current registry (0x703c, the same one the Python SDK 1.1.0 uses), which has live TEEs. That registry's getActiveTEEs returns an extra ohttpConfig field, so extend the ABI tuple to match; otherwise viem fails to decode and discovery returns empty. The reading code is unchanged (it ignores ohttpConfig). Verified read-only on-chain: the new registry decodes 3 active TEEs, the old one decodes 0. --- src/abi/teeRegistry.ts | 14 ++++++++++++++ src/defaults.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/abi/teeRegistry.ts b/src/abi/teeRegistry.ts index af49fcf..344275b 100644 --- a/src/abi/teeRegistry.ts +++ b/src/abi/teeRegistry.ts @@ -21,6 +21,20 @@ export const TEE_REGISTRY_ABI = [ { internalType: "bool", name: "enabled", type: "bool" }, { internalType: "uint256", name: "registeredAt", type: "uint256" }, { internalType: "uint256", name: "lastHeartbeatAt", type: "uint256" }, + { + components: [ + { internalType: "uint8", name: "keyId", type: "uint8" }, + { internalType: "uint16", name: "kemId", type: "uint16" }, + { internalType: "uint16", name: "kdfId", type: "uint16" }, + { internalType: "uint16", name: "aeadId", type: "uint16" }, + { internalType: "bytes", name: "publicKey", type: "bytes" }, + { internalType: "bytes", name: "keyConfig", type: "bytes" }, + { internalType: "uint256", name: "registeredAt", type: "uint256" }, + ], + internalType: "struct TEERegistry.OhttpConfig", + name: "ohttpConfig", + type: "tuple", + }, ], internalType: "struct TEERegistry.TEEInfo[]", name: "", diff --git a/src/defaults.ts b/src/defaults.ts index 6ccf98c..254e197 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -8,7 +8,7 @@ export const DEFAULT_OG_RPC_URL = "https://ogevmdevnet.opengradient.ai"; * verified TEE LLM endpoints and their pinned TLS certificates. */ export const DEFAULT_TEE_REGISTRY_ADDRESS = - "0x4e72238852f3c918f4E4e57AeC9280dDB0c80248"; + "0x703cB174AEadB35D611858369B4b1111dC9Abda6"; /** * Base URL for the OpenGradient faucet service.