Skip to content

Latest kzg-wasm Release 0.5.0 Breaks ethers API #4841

Open
@pcaversaccio

Description

@pcaversaccio

Ethers Version

6.13.2

Search Terms

kzg-wasm

Describe the Problem

kzg-wasm released their latest 0.5.0 version with the major changeset coming from this PR: ethereumjs/kzg-wasm#17. You can see how the renamed e.g. blobToKzgCommitmentWasm to blobToKZGCommitmentWasm and thus if you do something like that tx.kzg = kzg;, there will be a TypeScript compilation error:

return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
scripts/sign-eip4844.ts:66:5 - error TS2739: Type '{ loadTrustedSetup: (trustedSetup?: TrustedSetup | undefined) => number; freeTrustedSetup: () => void; blobToKZGCommitment: (blob: string) => string; computeBlobKZGProof: (blob: string, commitment: string) => string; verifyBlobKZGProofBatch: (blobs: string[], commitments: string[], proofs: string[]) => boolean; veri...' is missing the following properties from type 'KzgLibrary': blobToKzgCommitment, computeBlobKzgProof

66     tx.kzg = kzg;

Code Snippet

You can use my repo here: https://github.com/pcaversaccio/raw-tx

1. `pnpm install`
2. `pnpm upgrade --latest` (will upgrade `kzg-wasm` to version `0.5.0`)
3. `pnpm generate:eip4844`

Contract ABI

No response

Errors

No response

Environment

No response

Environment (Other)

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement.next-patchIssues scheduled for the next arch release.on-deckThis Enhancement or Bug is currently being worked on.v6Issues regarding v6

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions