From 86193495106c65ff9b92c0d92bc566993e2cbc2f Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:42:03 -0400 Subject: [PATCH 1/3] chore: fixes warnings for jsdoc comments --- src/lib/assetBridger/erc20Bridger.ts | 14 ++++++++------ src/lib/inbox/inbox.ts | 2 +- src/lib/message/ChildToParentMessage.ts | 8 ++++---- src/lib/message/ChildToParentMessageClassic.ts | 2 +- src/lib/message/ChildToParentMessageNitro.ts | 4 ++-- src/lib/message/ChildTransaction.ts | 2 +- src/lib/message/ParentTransaction.ts | 2 +- 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/lib/assetBridger/erc20Bridger.ts b/src/lib/assetBridger/erc20Bridger.ts index 84ceed3b0b..0d8744d66c 100644 --- a/src/lib/assetBridger/erc20Bridger.ts +++ b/src/lib/assetBridger/erc20Bridger.ts @@ -899,9 +899,11 @@ export class Erc20Bridger extends AssetBridger< /** * Checks if the token has been properly registered on both gateways. Mostly useful for tokens that use a custom gateway. - * @param erc20ParentAddress - * @param parentProvider - * @param childProvider + * + * @param {Object} params + * @param {string} params.erc20ParentAddress + * @param {Provider} params.parentProvider + * @param {Provider} params.childProvider * @returns */ public async isRegistered({ @@ -1193,9 +1195,9 @@ export class AdminErc20Bridger extends Erc20Bridger { } /** - * Get all the gateway set events on the L2 gateway router - * @param parentProvider - * @param customNetworkParentGatewayRouter + * Get all the gateway set events on the child gateway router + * @param childProvider + * @param customNetworkL2GatewayRouter * @returns */ public async getChildGatewaySetEvents( diff --git a/src/lib/inbox/inbox.ts b/src/lib/inbox/inbox.ts index a2f4c88ac1..7e6f6a4259 100644 --- a/src/lib/inbox/inbox.ts +++ b/src/lib/inbox/inbox.ts @@ -418,7 +418,7 @@ export class InboxTools { * Sign a transaction with msg.to, msg.value and msg.data. * You can use this as a helper to call inboxTools.sendChainSignedMessage * above. - * @param message A signed transaction which can be sent directly to chain, + * @param txRequest A signed transaction which can be sent directly to chain, * tx.to, tx.data, tx.value must be provided when not contract creation, if * contractCreation is true, no need provide tx.to. tx.gasPrice and tx.nonce * can be overrided. (You can also send contract creation transaction by set tx.to diff --git a/src/lib/message/ChildToParentMessage.ts b/src/lib/message/ChildToParentMessage.ts index 37a5057470..7ac988d74e 100644 --- a/src/lib/message/ChildToParentMessage.ts +++ b/src/lib/message/ChildToParentMessage.ts @@ -69,9 +69,9 @@ export class ChildToParentMessage { /** * Instantiates a new `ChildToParentMessageWriter` or `ChildToParentMessageReader` object. * - * @param {SignerOrProvider} ParentSignerOrProvider Signer or provider to be used for executing or reading the Child-to-Parent message. + * @param {SignerOrProvider} parentSignerOrProvider Signer or provider to be used for executing or reading the Child-to-Parent message. * @param {ChildToParentTransactionEvent} event The event containing the data of the Child-to-Parent message. - * @param {Provider} [ParentProvider] Optional. Used to override the Provider which is attached to `ParentSignerOrProvider` in case you need more control. This will be a required parameter in a future major version update. + * @param {Provider} [parentProvider] Optional. Used to override the Provider which is attached to `ParentSignerOrProvider` in case you need more control. This will be a required parameter in a future major version update. */ public static fromEvent( parentSignerOrProvider: T, @@ -289,9 +289,9 @@ export class ChildToParentMessageWriter extends ChildToParentMessageReader { /** * Instantiates a new `ChildToParentMessageWriter` object. * - * @param {Signer} ParentSigner The signer to be used for executing the Child-to-Parent message. + * @param {Signer} parentSigner The signer to be used for executing the Child-to-Parent message. * @param {ChildToParentTransactionEvent} event The event containing the data of the Child-to-Parent message. - * @param {Provider} [ParentProvider] Optional. Used to override the Provider which is attached to `ParentSigner` in case you need more control. This will be a required parameter in a future major version update. + * @param {Provider} [parentProvider] Optional. Used to override the Provider which is attached to `parentSigner` in case you need more control. This will be a required parameter in a future major version update. */ constructor( parentSigner: Signer, diff --git a/src/lib/message/ChildToParentMessageClassic.ts b/src/lib/message/ChildToParentMessageClassic.ts index e646083a7d..368cba35ca 100644 --- a/src/lib/message/ChildToParentMessageClassic.ts +++ b/src/lib/message/ChildToParentMessageClassic.ts @@ -333,7 +333,7 @@ export class ChildToParentMessageReaderClassic extends ChildToParentMessageClass /** * Get the status of this message * In order to check if the message has been executed proof info must be provided. - * @param proofInfo + * @param childProvider * @returns */ public async status( diff --git a/src/lib/message/ChildToParentMessageNitro.ts b/src/lib/message/ChildToParentMessageNitro.ts index 8d8698dc07..e9f25f155b 100644 --- a/src/lib/message/ChildToParentMessageNitro.ts +++ b/src/lib/message/ChildToParentMessageNitro.ts @@ -524,8 +524,8 @@ export class ChildToParentMessageReaderNitro extends ChildToParentMessageNitro { /** * Check whether the provided network has a BoLD rollup - * @param l2Network - * @param l1Provider + * @param arbitrumNetwork + * @param parentProvider * @returns */ private async isBold( diff --git a/src/lib/message/ChildTransaction.ts b/src/lib/message/ChildTransaction.ts index 1f29c13854..7c86ba2e75 100644 --- a/src/lib/message/ChildTransaction.ts +++ b/src/lib/message/ChildTransaction.ts @@ -114,7 +114,7 @@ export class ChildTransactionReceipt implements TransactionReceipt { /** * Get any child-to-parent-messages created by this transaction - * @param l2SignerOrProvider + * @param parentSignerOrProvider */ public async getChildToParentMessages( parentSignerOrProvider: T diff --git a/src/lib/message/ParentTransaction.ts b/src/lib/message/ParentTransaction.ts index 4d54189b7a..0818b25576 100644 --- a/src/lib/message/ParentTransaction.ts +++ b/src/lib/message/ParentTransaction.ts @@ -186,7 +186,7 @@ export class ParentTransactionReceipt implements TransactionReceipt { /** * Get any eth deposit messages created by this transaction - * @param childSignerOrProvider + * @param childProvider */ public async getEthDeposits( childProvider: Provider From b8e8a523bad648a640b21d68416db847e1deb012 Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Thu, 18 Jul 2024 08:55:03 -0400 Subject: [PATCH 2/3] renames param in `getChildGatewaySetEvents` --- src/lib/assetBridger/erc20Bridger.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/assetBridger/erc20Bridger.ts b/src/lib/assetBridger/erc20Bridger.ts index 0d8744d66c..ee8209cb00 100644 --- a/src/lib/assetBridger/erc20Bridger.ts +++ b/src/lib/assetBridger/erc20Bridger.ts @@ -1203,17 +1203,17 @@ export class AdminErc20Bridger extends Erc20Bridger { public async getChildGatewaySetEvents( childProvider: Provider, filter: { fromBlock: BlockTag; toBlock: BlockTag }, - customNetworkL2GatewayRouter?: string + customNetworkChildGatewayRouter?: string ): Promise[]> { - if (this.childNetwork.isCustom && !customNetworkL2GatewayRouter) { + if (this.childNetwork.isCustom && !customNetworkChildGatewayRouter) { throw new ArbSdkError( - 'Must supply customNetworkL2GatewayRouter for custom network ' + 'Must supply customNetworkChildGatewayRouter for custom network ' ) } await this.checkChildNetwork(childProvider) const childGatewayRouterAddress = - customNetworkL2GatewayRouter || + customNetworkChildGatewayRouter || this.childNetwork.tokenBridge.childGatewayRouter const eventFetcher = new EventFetcher(childProvider) From a9fe179267464f4444b155ec073d46f718ee50cf Mon Sep 17 00:00:00 2001 From: Doug <4741454+douglance@users.noreply.github.com> Date: Thu, 18 Jul 2024 08:55:19 -0400 Subject: [PATCH 3/3] improves jsdoc comments in `getChildGateWaySetEvents` --- src/lib/assetBridger/erc20Bridger.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/assetBridger/erc20Bridger.ts b/src/lib/assetBridger/erc20Bridger.ts index ee8209cb00..d7feb62119 100644 --- a/src/lib/assetBridger/erc20Bridger.ts +++ b/src/lib/assetBridger/erc20Bridger.ts @@ -1172,9 +1172,9 @@ export class AdminErc20Bridger extends Erc20Bridger { /** * Get all the gateway set events on the Parent gateway router - * @param parentProvider - * @param customNetworkParentGatewayRouter - * @returns + * @param parentProvider The provider for the parent network + * @param filter An object containing fromBlock and toBlock to filter events + * @returns An array of GatewaySetEvent event arguments */ public async getParentGatewaySetEvents( parentProvider: Provider, @@ -1196,9 +1196,11 @@ export class AdminErc20Bridger extends Erc20Bridger { /** * Get all the gateway set events on the child gateway router - * @param childProvider - * @param customNetworkL2GatewayRouter - * @returns + * @param childProvider The provider for the child network + * @param filter An object containing fromBlock and toBlock to filter events + * @param customNetworkChildGatewayRouter Optional address of the custom network child gateway router + * @returns An array of GatewaySetEvent event arguments + * @throws {ArbSdkError} If the network is custom and customNetworkChildGatewayRouter is not provided */ public async getChildGatewaySetEvents( childProvider: Provider,