From b5f57e20ee7de42c4af88fb417d887672a8d3582 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Sat, 4 May 2024 03:52:42 +0000 Subject: [PATCH] Disable gas price bumping feature by default Should be defined by manual after import --- dist/index.js | 6 +++--- dist/index.mjs | 6 +++--- dist/index.umd.js | 6 +++--- src/providers.ts | 9 +++------ 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0813b5e..47c8bda 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3092,7 +3092,7 @@ const populateTransaction = (signer, tx) => __async$e(void 0, null, function* () class TornadoWallet extends ethers.Wallet { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(key, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -3113,7 +3113,7 @@ class TornadoWallet extends ethers.Wallet { class TornadoVoidSigner extends ethers.VoidSigner { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(address, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -3129,7 +3129,7 @@ class TornadoVoidSigner extends ethers.VoidSigner { class TornadoRpcSigner extends ethers.JsonRpcSigner { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(provider, address); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; diff --git a/dist/index.mjs b/dist/index.mjs index bb85ffc..073637d 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -3071,7 +3071,7 @@ const populateTransaction = (signer, tx) => __async$e(void 0, null, function* () class TornadoWallet extends Wallet { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(key, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -3092,7 +3092,7 @@ class TornadoWallet extends Wallet { class TornadoVoidSigner extends VoidSigner { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(address, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -3108,7 +3108,7 @@ class TornadoVoidSigner extends VoidSigner { class TornadoRpcSigner extends JsonRpcSigner { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(provider, address); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; diff --git a/dist/index.umd.js b/dist/index.umd.js index eac2755..481a854 100644 --- a/dist/index.umd.js +++ b/dist/index.umd.js @@ -76570,7 +76570,7 @@ const populateTransaction = (signer, tx) => __async(void 0, null, function* () { class TornadoWallet extends Wallet { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(key, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -76591,7 +76591,7 @@ class TornadoWallet extends Wallet { class TornadoVoidSigner extends VoidSigner { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(address, provider); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; @@ -76607,7 +76607,7 @@ class TornadoVoidSigner extends VoidSigner { class TornadoRpcSigner extends JsonRpcSigner { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { super(provider, address); - this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; + this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasFailover = gasFailover != null ? gasFailover : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false; diff --git a/src/providers.ts b/src/providers.ts index 6326ec6..010a6cd 100644 --- a/src/providers.ts +++ b/src/providers.ts @@ -518,8 +518,7 @@ export class TornadoWallet extends Wallet { { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, ) { super(key, provider); - // 10% bump from the recommended fee - this.gasPriceBump = gasPriceBump ?? 1000; + this.gasPriceBump = gasPriceBump ?? 0; // 30% bump from the recommended gaslimit this.gasLimitBump = gasLimitBump ?? 3000; this.gasFailover = gasFailover ?? false; @@ -553,8 +552,7 @@ export class TornadoVoidSigner extends VoidSigner { { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, ) { super(address, provider); - // 10% bump from the recommended fee - this.gasPriceBump = gasPriceBump ?? 1000; + this.gasPriceBump = gasPriceBump ?? 0; // 30% bump from the recommended gaslimit this.gasLimitBump = gasLimitBump ?? 3000; this.gasFailover = gasFailover ?? false; @@ -582,8 +580,7 @@ export class TornadoRpcSigner extends JsonRpcSigner { { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, ) { super(provider, address); - // 10% bump from the recommended fee - this.gasPriceBump = gasPriceBump ?? 1000; + this.gasPriceBump = gasPriceBump ?? 0; // 30% bump from the recommended gaslimit this.gasLimitBump = gasLimitBump ?? 3000; this.gasFailover = gasFailover ?? false;