In frontend/src/lib/agentAuditRegistryClient.ts:134, the function declared as a V2 client instantiates an ethers Contract with the V3 ABI:
export function createAgentAuditRegistryV2Client(
rpcUrl: string,
contractAddress: string,
chainId: number
): AgentAuditRegistryV2Client {
const provider = new JsonRpcProvider(rpcUrl, chainId);
const contract = new Contract(contractAddress, v3Artifact.abi as InterfaceAbi, provider);
// ...
}
If contractAddress actually points at a V2 deployment (which is the whole reason this function exists separately from the V3 client), every method that V3 added will either revert with an unhelpful BAD_DATA decode error or — worse for the dimensional-score struct — silently decode wrong values because the field layout differs.
Should be v2Artifact.abi. The mistake is easy to make because both artifacts are imported at the top of the file and the names differ by one character.
Severity: High — produces silently wrong data in any UI surface that calls into a V2 contract through this client.
In
frontend/src/lib/agentAuditRegistryClient.ts:134, the function declared as a V2 client instantiates an ethersContractwith the V3 ABI:If
contractAddressactually points at a V2 deployment (which is the whole reason this function exists separately from the V3 client), every method that V3 added will either revert with an unhelpfulBAD_DATAdecode error or — worse for the dimensional-score struct — silently decode wrong values because the field layout differs.Should be
v2Artifact.abi. The mistake is easy to make because both artifacts are imported at the top of the file and the names differ by one character.Severity: High — produces silently wrong data in any UI surface that calls into a V2 contract through this client.