From 19b7e53c96a63d933654d457be022919942c873c Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Thu, 22 Dec 2022 15:16:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9Bgas?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=9C=AA=E4=B8=A5=E6=A0=BC=E8=BD=AC=E5=8C=96?= =?UTF-8?q?=E6=88=90=E6=95=B4=E6=95=B0=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/standards/ERC1155Standard.ts | 2 +- src/standards/ERC20Standard.ts | 2 +- src/standards/ERC721Standard.ts | 2 +- src/standards/JCStandard.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/standards/ERC1155Standard.ts b/src/standards/ERC1155Standard.ts index ff6a6dd..636d4ac 100644 --- a/src/standards/ERC1155Standard.ts +++ b/src/standards/ERC1155Standard.ts @@ -249,7 +249,7 @@ export class ERC1155Standard { .safeBatchTransferFrom(from, to, tokenIds, amounts) .estimateGas({ gas: 1000000 }); } - gas = gas * 1.1; + gas = (gas * 1.1) | 1; if (estimate) { return jc.wallet.generateGasShow(gas); } diff --git a/src/standards/ERC20Standard.ts b/src/standards/ERC20Standard.ts index a0395ec..d380b90 100644 --- a/src/standards/ERC20Standard.ts +++ b/src/standards/ERC20Standard.ts @@ -162,7 +162,7 @@ export class ERC20Standard { .transfer(to, amountBN) .estimateGas({ gas: 1000000 }); } - gas = gas * 1.1; + gas = (gas * 1.1) | 1; if (estimate) { return jc.wallet.generateGasShow(gas); } diff --git a/src/standards/ERC721Standard.ts b/src/standards/ERC721Standard.ts index 7ec8f3d..399aa3d 100644 --- a/src/standards/ERC721Standard.ts +++ b/src/standards/ERC721Standard.ts @@ -307,7 +307,7 @@ export class ERC721Standard { .safeTransferFrom(from, to, tokenId) .estimateGas({ gas: 1000000 }); } - gas = gas * 1.1; + gas = (gas * 1.1) | 1; if (estimate) { return jc.wallet.generateGasShow(gas); } diff --git a/src/standards/JCStandard.ts b/src/standards/JCStandard.ts index d79dfb0..cae7a4d 100644 --- a/src/standards/JCStandard.ts +++ b/src/standards/JCStandard.ts @@ -169,7 +169,7 @@ export class JCStandard { } return contract.methods .evolve721NFT(nftAddress, tokenIds, startTime, nonce, signature) - .send({ gas: (gas * 1.1) | 0 }); + .send({ gas }); } async evolveChip({