From 969b55fc72cb2cfdd0fa431d8cf6d6348f0904e1 Mon Sep 17 00:00:00 2001 From: Oleksii Kosynskyi Date: Thu, 12 Oct 2023 11:22:55 -0400 Subject: [PATCH] add documentation --- .../web3_plugin_guide/plugin_authors.md | 25 +++++++++++++++++++ .../src/tx/transactionFactory.ts | 4 +-- .../integration/web3-plugin-eip-4844.test.ts | 6 +---- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/docs/docs/guides/web3_plugin_guide/plugin_authors.md b/docs/docs/guides/web3_plugin_guide/plugin_authors.md index f7f057edd07..31f26d6ce3f 100644 --- a/docs/docs/guides/web3_plugin_guide/plugin_authors.md +++ b/docs/docs/guides/web3_plugin_guide/plugin_authors.md @@ -34,6 +34,31 @@ It is important to note that the plugin name should be structured as `@ = new Map(); +const extraTxTypes: Map> = new Map(); // eslint-disable-next-line @typescript-eslint/no-extraneous-class export class TransactionFactory { @@ -41,7 +41,7 @@ export class TransactionFactory { return Number(uint8ArrayToBigInt(toUint8Array(txType))); } - public static registerTransactionType( + public static registerTransactionType>( type: Numbers, txClass: NewTxTypeClass, ) { diff --git a/packages/web3/test/integration/web3-plugin-eip-4844.test.ts b/packages/web3/test/integration/web3-plugin-eip-4844.test.ts index af55577f8c7..02df781436c 100644 --- a/packages/web3/test/integration/web3-plugin-eip-4844.test.ts +++ b/packages/web3/test/integration/web3-plugin-eip-4844.test.ts @@ -31,11 +31,7 @@ class Eip4844Plugin extends Web3PluginBase { public pluginNamespace = 'txType3'; public constructor() { super(); - TransactionFactory.registerTransactionType( - TRANSACTION_TYPE, - // @ts-expect-error fix type - SomeNewTxTypeTransaction, - ); + TransactionFactory.registerTransactionType(TRANSACTION_TYPE, SomeNewTxTypeTransaction); } }