From 14e92fd53f8e5c85df7ac70fd0fbec286fac7cf7 Mon Sep 17 00:00:00 2001 From: cebgcontract <99630598+cebgcontract@users.noreply.github.com> Date: Wed, 21 Dec 2022 16:08:05 +0800 Subject: [PATCH] gas --- src/standards/JCStandard.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/standards/JCStandard.ts b/src/standards/JCStandard.ts index 5dcf8a4..d79dfb0 100644 --- a/src/standards/JCStandard.ts +++ b/src/standards/JCStandard.ts @@ -38,7 +38,7 @@ export class JCStandard { .buy721NFT(addresses, values, signature) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore if (jc.wallet.isInternal) { @@ -92,7 +92,7 @@ export class JCStandard { .buy1155NFT(addresses, values, ids, amounts, signature) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore @@ -146,7 +146,7 @@ export class JCStandard { .evolve721NFT(nftAddress, tokenIds, startTime, nonce, signature) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore @@ -198,7 +198,7 @@ export class JCStandard { .evolveChip(tokenIds, startTime, nonce, signature) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore @@ -252,7 +252,7 @@ export class JCStandard { .mintShardBatchUser(tokenIds, amounts, startTime, nonce, signature) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore @@ -324,7 +324,7 @@ export class JCStandard { ) .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } //@ts-ignore @@ -403,8 +403,8 @@ export class JCStandard { .estimateGas({ gas: SAMPLE_GAS }); } catch (err) {} if (!gas) { - gas1 = gas1 ? gas1 * 1.1 : SAMPLE_GAS; - gas0 = gas0 ? gas0 * 1.1 : SAMPLE_GAS; + gas1 = gas1 ? (gas1 * 1.1) | 1 : SAMPLE_GAS; + gas0 = gas0 ? (gas0 * 1.1) | 1 : SAMPLE_GAS; gas = gas0 + gas1; } else { gas0 = gas - gas1; @@ -473,7 +473,7 @@ export class JCStandard { } catch (err) { console.log(err); } - gas = gas ? gas * 1.1 : SAMPLE_GAS; + gas = gas ? (gas * 1.1) | 1 : SAMPLE_GAS; } if (jc.wallet.isInternal) {