Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error with viem + permissionless.js + zerodev sdk on NestJS app #184

Open
yaniferhaoui opened this issue Sep 12, 2024 · 1 comment

Comments

@yaniferhaoui
Copy link
Contributor

I've created this small project to let you reproduce the compilation errors: https://github.com/yaniferhaoui/viem-permissionless-zerodev-bug/

Running nest start --watch fail because of some compilation errors

node_modules/viem/utils/signature/hashTypedData.ts:151:44 - error TS2345: Argument of type 'unknown[]' is not assignable to parameter of type '(readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly ...[])[])[])[])[])[])[])[])[])[])[] | readonly (readonly (readonly (readonly (readonly any[])[])[])[])[])[]'.
  Type 'unknown' is not assignable to type 'readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly (readonly ...[])[])[])[])[])[])[])[])[])[])[] | readonly (readonly (readonly (readonly (readonly any[])[])[])[])[]'.

151   return encodeAbiParameters(encodedTypes, encodedValues)
                                               ~~~~~~~~~~~~~

node_modules/viem/utils/transaction/parseTransaction.ts:295:5 - error TS2322: Type 'ToBlobSidecarsReturnType<"bytes" | "hex">' is not assignable to type 'false | readonly BlobSidecar<`0x${string}`>[]'.
  Type 'BlobSidecars<Uint8Array>' is not assignable to type 'false | readonly BlobSidecar<`0x${string}`>[]'.
    Type 'BlobSidecar<Uint8Array>[]' is not assignable to type 'readonly BlobSidecar<`0x${string}`>[]'.
      Type 'BlobSidecar<Uint8Array>' is not assignable to type 'BlobSidecar<`0x${string}`>'.
        Type 'Uint8Array' is not assignable to type '`0x${string}`'.

295     transaction.sidecars = toBlobSidecars({
        ~~~~~~~~~~~~~~~~~~~~

node_modules/viem/utils/transaction/serializeTransaction.ts:248:7 - error TS2322: Type 'ToBlobSidecarsReturnType<"bytes" | "hex">' is not assignable to type 'false | readonly BlobSidecar<`0x${string}`>[]'.
  Type 'BlobSidecars<Uint8Array>' is not assignable to type 'false | readonly BlobSidecar<`0x${string}`>[]'.
    Type 'BlobSidecar<Uint8Array>[]' is not assignable to type 'readonly BlobSidecar<`0x${string}`>[]'.
      Type 'BlobSidecar<Uint8Array>' is not assignable to type 'BlobSidecar<`0x${string}`>'.
        Type 'Uint8Array' is not assignable to type '`0x${string}`'.

248       sidecars = toBlobSidecars({ blobs, commitments, proofs })
          ~~~~~~~~

[5:38:52 PM] Found 322 errors. Watching for file changes.
@jxom
Copy link

jxom commented Sep 14, 2024

Should be resolved via yaniferhaoui/viem-permissionless-zerodev-bug#1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants