Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
avkos committed Apr 25, 2024
1 parent 9f87de7 commit 2282f94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Common } from '@ethereumjs/common';
import type { JsonTx } from '@ethereumjs/tx';
import { BlobEIP4844Transaction } from '@ethereumjs/tx';
import type { BlobEIP4844TxData } from '@ethereumjs/tx/src/types';
import type { Kzg } from '@ethereumjs/util';
import { bytesToHex, toBytes } from '@ethereumjs/util';
import { loadKZG } from 'kzg-wasm';
Expand Down Expand Up @@ -56,18 +57,17 @@ export class Web3BlobTxPlugin extends Web3PluginBase {
eips: [4844],
customCrypto: customCrypto ?? this.crypto,
});
const f = { number: FMT_NUMBER.BIGINT, bytes: FMT_BYTES.UINT8ARRAY };
const transactionFormat = { number: FMT_NUMBER.HEX, bytes: FMT_BYTES.UINT8ARRAY };

return BlobEIP4844Transaction.fromTxData(
// @ts-ignore
format(
blobTransactionSchema,
{
type: 3,
...txData,
} as BlobTransaction,
f,
),
},
transactionFormat,
) as BlobEIP4844TxData,
{
common,
},
Expand Down

0 comments on commit 2282f94

Please sign in to comment.