From 635c7b7cd559c306beadd481464c68b200d73b54 Mon Sep 17 00:00:00 2001 From: "Miquel A. Cabot" Date: Mon, 13 Jun 2022 11:23:32 +0200 Subject: [PATCH] remove specific estimategas functions from TokenUtils --- src/utils/TokenUtils.ts | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/utils/TokenUtils.ts b/src/utils/TokenUtils.ts index 518a817d..b0427a81 100644 --- a/src/utils/TokenUtils.ts +++ b/src/utils/TokenUtils.ts @@ -11,29 +11,6 @@ import { LoggerInstance } from '.' -/** - * Estimate gas cost for approval function - * @param {String} account - * @param {String} tokenAddress - * @param {String} spender - * @param {String} amount - * @param {String} force - * @param {Contract} contractInstance optional contract instance - * @return {Promise} - */ -export async function estApprove( - web3: Web3, - account: string, - tokenAddress: string, - spender: string, - amount: string, - contractInstance?: Contract -): Promise { - const tokenContract = contractInstance || new web3.eth.Contract(minAbi, tokenAddress) - - return calculateEstimatedGas(account, tokenContract.methods.approve, spender, amount) -} - /** * Approve spender to spent amount tokens * @param {String} account @@ -82,29 +59,6 @@ export async function approve( return result } -/** - * Estimate gas cost for transfer function - * @param {String} account - * @param {String} tokenAddress - * @param {String} recipient - * @param {String} amount - * @param {String} force - * @param {Contract} contractInstance optional contract instance - * @return {Promise} - */ -export async function estTransfer( - web3: Web3, - account: string, - tokenAddress: string, - recipient: string, - amount: string, - contractInstance?: Contract -): Promise { - const tokenContract = contractInstance || new web3.eth.Contract(minAbi, tokenAddress) - - return calculateEstimatedGas(account, tokenContract.methods.transfer, recipient, amount) -} - /** * Moves amount tokens from the caller’s account to recipient. * @param {String} account