Skip to content

Commit

Permalink
feat: remove gasFees param from static calls (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
yapyuyou committed Mar 20, 2024
1 parent 0231502 commit 548a9ad
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/implementations/document-store/grant-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/document-store/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/document-store/revoke-role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/document-store/revoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
4 changes: 2 additions & 2 deletions src/implementations/document-store/transfer-ownership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/acceptSurrendered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/nominateBeneficiary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/rejectSurrendered.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/surrenderDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/transferHolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/title-escrow/transferOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/implementations/token-registry/issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 548a9ad

Please sign in to comment.