Building a confidential payment gate (AgentVault/SpendPolicy/PaymentGate) on Sepolia using @fhevm/solidity@0.8.0 contracts and @zama-fhe/relayer-sdk on the frontend.
What works: Plain contract calls (registerAgent, no FHE) succeed cleanly.
What fails: Any call touching FHE.fromExternal (deposit, setLimit, requestPayment) reverts with "execution reverted for an unknown reason," no decodable custom error.
Confirmed via console logging:
- createInstance() succeeds using the SDK's own SepoliaConfig (not hand-typed addresses, we caught and fixed a mismatch there already)
- input.add64(value) + input.encrypt() succeeds, producing a clean 32-byte handle and 100-byte inputProof
- The handle and proof submitted on-chain exactly match what was generated client-side (verified byte-for-byte against the failing tx's decoded calldata)
- msg.sender in the failing tx exactly matches the userAddress passed into createEncryptedInput(contractAddress, userAddress)
- Agent ownership check (onlyAgentOwner) should pass, the agent ID was registered by the same wallet immediately prior
Failing transaction: 0x3ce2dc1b76def9a3d71e0ef5586b4d2322379da5856f305960189b3945d416d5
Contract: 0x650006C231f62F261360b06090389707471A566c (AgentVault, Sepolia)
Would appreciate help isolating whether this is a proof-format mismatch, an ACL/allowance issue, or something else, since everything inspectable from the frontend side looks correct.