Disable gas price bumping feature by default

Should be defined by manual after import
This commit is contained in:
Tornado Contrib 2024-05-04 03:52:42 +00:00
parent 4623e386a1
commit b5f57e20ee
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
4 changed files with 12 additions and 15 deletions

6
dist/index.js vendored

@ -3092,7 +3092,7 @@ const populateTransaction = (signer, tx) => __async$e(void 0, null, function* ()
class TornadoWallet extends ethers.Wallet { class TornadoWallet extends ethers.Wallet {
constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(key, provider); super(key, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -3113,7 +3113,7 @@ class TornadoWallet extends ethers.Wallet {
class TornadoVoidSigner extends ethers.VoidSigner { class TornadoVoidSigner extends ethers.VoidSigner {
constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(address, provider); super(address, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -3129,7 +3129,7 @@ class TornadoVoidSigner extends ethers.VoidSigner {
class TornadoRpcSigner extends ethers.JsonRpcSigner { class TornadoRpcSigner extends ethers.JsonRpcSigner {
constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(provider, address); super(provider, address);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;

6
dist/index.mjs vendored

@ -3071,7 +3071,7 @@ const populateTransaction = (signer, tx) => __async$e(void 0, null, function* ()
class TornadoWallet extends Wallet { class TornadoWallet extends Wallet {
constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(key, provider); super(key, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -3092,7 +3092,7 @@ class TornadoWallet extends Wallet {
class TornadoVoidSigner extends VoidSigner { class TornadoVoidSigner extends VoidSigner {
constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(address, provider); super(address, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -3108,7 +3108,7 @@ class TornadoVoidSigner extends VoidSigner {
class TornadoRpcSigner extends JsonRpcSigner { class TornadoRpcSigner extends JsonRpcSigner {
constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(provider, address); super(provider, address);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;

6
dist/index.umd.js vendored

@ -76570,7 +76570,7 @@ const populateTransaction = (signer, tx) => __async(void 0, null, function* () {
class TornadoWallet extends Wallet { class TornadoWallet extends Wallet {
constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(key, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(key, provider); super(key, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -76591,7 +76591,7 @@ class TornadoWallet extends Wallet {
class TornadoVoidSigner extends VoidSigner { class TornadoVoidSigner extends VoidSigner {
constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(address, provider, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(address, provider); super(address, provider);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;
@ -76607,7 +76607,7 @@ class TornadoVoidSigner extends VoidSigner {
class TornadoRpcSigner extends JsonRpcSigner { class TornadoRpcSigner extends JsonRpcSigner {
constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) { constructor(provider, address, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce } = {}) {
super(provider, address); super(provider, address);
this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 1e3; this.gasPriceBump = gasPriceBump != null ? gasPriceBump : 0;
this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3; this.gasLimitBump = gasLimitBump != null ? gasLimitBump : 3e3;
this.gasFailover = gasFailover != null ? gasFailover : false; this.gasFailover = gasFailover != null ? gasFailover : false;
this.bumpNonce = bumpNonce != null ? bumpNonce : false; this.bumpNonce = bumpNonce != null ? bumpNonce : false;

@ -518,8 +518,7 @@ export class TornadoWallet extends Wallet {
{ gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {},
) { ) {
super(key, provider); super(key, provider);
// 10% bump from the recommended fee this.gasPriceBump = gasPriceBump ?? 0;
this.gasPriceBump = gasPriceBump ?? 1000;
// 30% bump from the recommended gaslimit // 30% bump from the recommended gaslimit
this.gasLimitBump = gasLimitBump ?? 3000; this.gasLimitBump = gasLimitBump ?? 3000;
this.gasFailover = gasFailover ?? false; this.gasFailover = gasFailover ?? false;
@ -553,8 +552,7 @@ export class TornadoVoidSigner extends VoidSigner {
{ gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {},
) { ) {
super(address, provider); super(address, provider);
// 10% bump from the recommended fee this.gasPriceBump = gasPriceBump ?? 0;
this.gasPriceBump = gasPriceBump ?? 1000;
// 30% bump from the recommended gaslimit // 30% bump from the recommended gaslimit
this.gasLimitBump = gasLimitBump ?? 3000; this.gasLimitBump = gasLimitBump ?? 3000;
this.gasFailover = gasFailover ?? false; this.gasFailover = gasFailover ?? false;
@ -582,8 +580,7 @@ export class TornadoRpcSigner extends JsonRpcSigner {
{ gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {}, { gasPriceBump, gasLimitBump, gasFailover, bumpNonce }: TornadoWalletOptions = {},
) { ) {
super(provider, address); super(provider, address);
// 10% bump from the recommended fee this.gasPriceBump = gasPriceBump ?? 0;
this.gasPriceBump = gasPriceBump ?? 1000;
// 30% bump from the recommended gaslimit // 30% bump from the recommended gaslimit
this.gasLimitBump = gasLimitBump ?? 3000; this.gasLimitBump = gasLimitBump ?? 3000;
this.gasFailover = gasFailover ?? false; this.gasFailover = gasFailover ?? false;