From 548a9ad7e84c1ef1b2d40fc10a2385caa0556234 Mon Sep 17 00:00:00 2001 From: Lucas <31716292+yapyuyou@users.noreply.github.com> Date: Wed, 20 Mar 2024 09:03:32 +0800 Subject: [PATCH] feat: remove gasFees param from static calls (#303) --- src/implementations/document-store/grant-role.ts | 2 +- src/implementations/document-store/issue.ts | 2 +- src/implementations/document-store/revoke-role.ts | 2 +- src/implementations/document-store/revoke.ts | 2 +- src/implementations/document-store/transfer-ownership.ts | 4 ++-- src/implementations/title-escrow/acceptSurrendered.ts | 2 +- .../title-escrow/endorseNominatedBeneficiary.ts | 2 +- src/implementations/title-escrow/nominateBeneficiary.ts | 2 +- src/implementations/title-escrow/rejectSurrendered.ts | 2 +- src/implementations/title-escrow/surrenderDocument.ts | 2 +- src/implementations/title-escrow/transferHolder.ts | 2 +- src/implementations/title-escrow/transferOwners.ts | 2 +- src/implementations/token-registry/issue.ts | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/implementations/document-store/grant-role.ts b/src/implementations/document-store/grant-role.ts index bd78d980..bf1d1dc0 100644 --- a/src/implementations/document-store/grant-role.ts +++ b/src/implementations/document-store/grant-role.ts @@ -31,7 +31,7 @@ export const grantDocumentStoreRole = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await documentStore.callStatic.grantRole(roleString, account, { ...gasFees }); + await documentStore.callStatic.grantRole(roleString, account); signale.await(`Sending transaction to pool`); const transaction = await documentStore.grantRole(roleString, account, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/document-store/issue.ts b/src/implementations/document-store/issue.ts index 19c939a5..8ab6febd 100644 --- a/src/implementations/document-store/issue.ts +++ b/src/implementations/document-store/issue.ts @@ -28,7 +28,7 @@ export const issueToDocumentStore = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await documentStore.callStatic.issue(hash, { ...gasFees }); + await documentStore.callStatic.issue(hash); signale.await(`Sending transaction to pool`); const transaction = await documentStore.issue(hash, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/document-store/revoke-role.ts b/src/implementations/document-store/revoke-role.ts index ce8a940c..fab94a2e 100644 --- a/src/implementations/document-store/revoke-role.ts +++ b/src/implementations/document-store/revoke-role.ts @@ -31,7 +31,7 @@ export const revokeDocumentStoreRole = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await documentStore.callStatic.revokeRole(roleString, account, { ...gasFees }); + await documentStore.callStatic.revokeRole(roleString, account); signale.await(`Sending transaction to pool`); const transaction = await documentStore.revokeRole(roleString, account, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/document-store/revoke.ts b/src/implementations/document-store/revoke.ts index b3b25ad2..0762f761 100644 --- a/src/implementations/document-store/revoke.ts +++ b/src/implementations/document-store/revoke.ts @@ -27,7 +27,7 @@ export const revokeToDocumentStore = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await documentStore.callStatic.revoke(hash, { ...gasFees }); + await documentStore.callStatic.revoke(hash); signale.await(`Sending transaction to pool`); const transaction = await documentStore.revoke(hash, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/document-store/transfer-ownership.ts b/src/implementations/document-store/transfer-ownership.ts index 5ee3ee3f..8a7cb86c 100644 --- a/src/implementations/document-store/transfer-ownership.ts +++ b/src/implementations/document-store/transfer-ownership.ts @@ -39,13 +39,13 @@ export const transferDocumentStoreOwnership = async ({ trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); signale.await(`Sending transaction to pool`); - await documentStore.callStatic.grantRole(roleString, newOwner, { ...gasFees }); + await documentStore.callStatic.grantRole(roleString, newOwner); const grantTransaction = await documentStore.grantRole(roleString, newOwner, { ...gasFees }); success(`Document store ${address}'s ownership has been granted to wallet ${newOwner}`); info(`Transaction details at: ${getEtherscanAddress({ network: network })}/tx/${grantTransaction.hash}`); trace(`Tx hash: ${grantTransaction.hash}`); trace(`Block Number: ${grantTransaction.blockNumber}`); - await documentStore.callStatic.revokeRole(roleString, ownerAddress, { ...gasFees }); + await documentStore.callStatic.revokeRole(roleString, ownerAddress); const revokeTransaction = await documentStore.revokeRole(roleString, ownerAddress, { ...gasFees }); success(`Document store ${address}'s ownership has been revoked from wallet ${ownerAddress}`); info(`Transaction details at: ${getEtherscanAddress({ network: network })}/tx/${revokeTransaction.hash}`); diff --git a/src/implementations/title-escrow/acceptSurrendered.ts b/src/implementations/title-escrow/acceptSurrendered.ts index d8c709d5..d7094de7 100644 --- a/src/implementations/title-escrow/acceptSurrendered.ts +++ b/src/implementations/title-escrow/acceptSurrendered.ts @@ -29,7 +29,7 @@ export const acceptSurrendered = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await tokenRegistryInstance.callStatic.burn(tokenId, { ...gasFees }); + await tokenRegistryInstance.callStatic.burn(tokenId); signale.await(`Sending transaction to pool`); const transaction = await tokenRegistryInstance.burn(tokenId, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/endorseNominatedBeneficiary.ts b/src/implementations/title-escrow/endorseNominatedBeneficiary.ts index 2b700ab0..ab37ce0c 100644 --- a/src/implementations/title-escrow/endorseNominatedBeneficiary.ts +++ b/src/implementations/title-escrow/endorseNominatedBeneficiary.ts @@ -35,7 +35,7 @@ export const endorseNominatedBeneficiary = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await titleEscrow.callStatic.transferBeneficiary(nominatedBeneficiary, { ...gasFees }); + await titleEscrow.callStatic.transferBeneficiary(nominatedBeneficiary); signale.await(`Sending transaction to pool`); const transaction = await titleEscrow.transferBeneficiary(nominatedBeneficiary, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/nominateBeneficiary.ts b/src/implementations/title-escrow/nominateBeneficiary.ts index 76f83ba9..1f386ffd 100644 --- a/src/implementations/title-escrow/nominateBeneficiary.ts +++ b/src/implementations/title-escrow/nominateBeneficiary.ts @@ -32,7 +32,7 @@ export const nominateBeneficiary = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await titleEscrow.callStatic.nominate(newBeneficiary, { ...gasFees }); + await titleEscrow.callStatic.nominate(newBeneficiary); signale.await(`Sending transaction to pool`); const transaction = await titleEscrow.nominate(newBeneficiary, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/rejectSurrendered.ts b/src/implementations/title-escrow/rejectSurrendered.ts index 45e3f46a..33f628f9 100644 --- a/src/implementations/title-escrow/rejectSurrendered.ts +++ b/src/implementations/title-escrow/rejectSurrendered.ts @@ -28,7 +28,7 @@ export const rejectSurrendered = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await tokenRegistryInstance.callStatic.restore(tokenId, { ...gasFees }); + await tokenRegistryInstance.callStatic.restore(tokenId); signale.await(`Sending transaction to pool`); const transaction = await tokenRegistryInstance.restore(tokenId, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/surrenderDocument.ts b/src/implementations/title-escrow/surrenderDocument.ts index c8df29ef..e045a5e8 100644 --- a/src/implementations/title-escrow/surrenderDocument.ts +++ b/src/implementations/title-escrow/surrenderDocument.ts @@ -28,7 +28,7 @@ export const surrenderDocument = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await titleEscrow.callStatic.surrender({ ...gasFees }); + await titleEscrow.callStatic.surrender(); signale.await(`Sending transaction to pool`); const transaction = await titleEscrow.surrender({ ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/transferHolder.ts b/src/implementations/title-escrow/transferHolder.ts index 62bf549b..ff531b0c 100644 --- a/src/implementations/title-escrow/transferHolder.ts +++ b/src/implementations/title-escrow/transferHolder.ts @@ -30,7 +30,7 @@ export const transferHolder = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await titleEscrow.callStatic.transferHolder(to, { ...gasFees }); + await titleEscrow.callStatic.transferHolder(to); signale.await(`Sending transaction to pool`); const transaction = await titleEscrow.transferHolder(to, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/title-escrow/transferOwners.ts b/src/implementations/title-escrow/transferOwners.ts index 0279174b..03891e7d 100644 --- a/src/implementations/title-escrow/transferOwners.ts +++ b/src/implementations/title-escrow/transferOwners.ts @@ -32,7 +32,7 @@ export const transferOwners = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await titleEscrow.callStatic.transferOwners(newOwner, newHolder, { ...gasFees }); + await titleEscrow.callStatic.transferOwners(newOwner, newHolder); signale.await(`Sending transaction to pool`); const transaction = await titleEscrow.transferOwners(newOwner, newHolder, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`); diff --git a/src/implementations/token-registry/issue.ts b/src/implementations/token-registry/issue.ts index 73b41001..a97d18f5 100644 --- a/src/implementations/token-registry/issue.ts +++ b/src/implementations/token-registry/issue.ts @@ -30,7 +30,7 @@ export const issueToTokenRegistry = async ({ const gasFees = await getGasFees({ provider: wallet.provider, ...rest }); trace(`Gas maxFeePerGas: ${gasFees.maxFeePerGas}`); trace(`Gas maxPriorityFeePerGas: ${gasFees.maxPriorityFeePerGas}`); - await tokenRegistry.callStatic.mint(beneficiary, holder, tokenId, { ...gasFees }); + await tokenRegistry.callStatic.mint(beneficiary, holder, tokenId); signale.await(`Sending transaction to pool`); const transaction = await tokenRegistry.mint(beneficiary, holder, tokenId, { ...gasFees }); trace(`Tx hash: ${transaction.hash}`);