From 193f6e545681c42598d2d660e392d02fcf8f99d8 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:39:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BAokx=E4=BF=AE=E6=94=B9gasLimt=E5=92=8Cg?= =?UTF-8?q?asPrice=E7=9A=84=E8=AE=BE=E7=BD=AE=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wallet/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wallet/index.js b/src/wallet/index.js index 6edac3d..e26ee87 100644 --- a/src/wallet/index.js +++ b/src/wallet/index.js @@ -356,7 +356,7 @@ export class Wallet { const instance = this.initInstance(web3, process.env.VUE_APP_CONTRACT, treasureAbi, address); let gasPrice = await web3.eth.getGasPrice() // console.log('chainCheckIn gasPrice: ', gasPrice) - // gasPrice = gasPrice * 2n + gasPrice = gasPrice * 2n let gasLimit = await this.estimateGas(address, '0xd8edeb1b'); console.log('gasLimit: ', gasLimit, 'gasPrice:', gasPrice) return instance.methods.dailyCheckin().send({ from: address, gasPrice, gasLimit }); @@ -385,7 +385,7 @@ export class Wallet { let idBN = web3.utils.toBigInt('0x'+exploreId) const instance = this.initInstance(web3, process.env.VUE_APP_CONTRACT, treasureAbi, address); let gasPrice = await web3.eth.getGasPrice() - // gasPrice = gasPrice * 2n + gasPrice = gasPrice * 2n // let gasLimit = await instance.methods.explore(idBN).estimateGas({ from: address }); const dataStr = '0x6457e389' + exploreId.padStart(64, '0'); const gasLimit = await this.estimateGas(address, dataStr) @@ -452,7 +452,7 @@ export class Wallet { const instance = this.initInstance(web3, process.env.VUE_APP_CONTRACT, treasureAbi, address); let gasPrice = await web3.eth.getGasPrice() - // gasPrice = gasPrice * 2n + gasPrice = gasPrice * 2n // let gasLimit = await instance.methods.openBox(boxIdBN).estimateGas({ from: address }); const dataStr = '0xb1e5e2b7' + boxId.padStart(64, '0'); const gasLimit = await this.estimateGas(address, dataStr) @@ -485,7 +485,7 @@ export class Wallet { let taskIdBN = web3.utils.toBigInt('0x'+taskIdHex) const instance = this.initInstance(web3, process.env.VUE_APP_CONTRACT, treasureAbi, address); let gasPrice = await web3.eth.getGasPrice() - // gasPrice = gasPrice * 2n + gasPrice = gasPrice * 2n // let gasLimit = await instance.methods.claimTaskReward(taskIdBN).estimateGas({ from: address }); const dataStr = '0x4052a9c7' + taskIdHex.padStart(64, '0'); const gasLimit = await this.estimateGas(address, dataStr)