npm install
cd mytoken
aztec compile
aztec codegen -o src/artifacts target
witness in mytoken/artifacts/Main.ts:
The types of 'abi.return_type' are incompatible between these types.
Type 'null' is not comparable to type '{ abi_type: AbiType; visibility: "private" | "databus" | "public"; }
Per claude:
Root cause: Version mismatch between the Noir compiler that generated mytoken-Main.json and the @aztec/aztec.js@4.1.0-rc.2 types. The compiler outputs return_type: null for void
functions, but the TypeScript type definition doesn't allow null — it expects the field to always be an object. This is a bug/incompatibility in the @aztec/noir-types package (or the
compiler version used).