From 1bf3a4b525956bf06a99cdb93aa5f3eef2d34390 Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:17:16 +0000 Subject: [PATCH] fix(cli): remove hardcoded gas limit from signup and publish hardcoded gas limit might prevent transaction from succeeding on certain networks fix #1086 --- cli/ts/commands/publish.ts | 4 +--- cli/ts/commands/signup.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cli/ts/commands/publish.ts b/cli/ts/commands/publish.ts index dfbf3a7bc5..449354548e 100644 --- a/cli/ts/commands/publish.ts +++ b/cli/ts/commands/publish.ts @@ -135,9 +135,7 @@ export const publish = async ({ try { // submit the message onchain as well as the encryption public key - const tx = await pollContract.publishMessage(message.asContractParam(), encKeypair.pubKey.asContractParam(), { - gasLimit: 10000000, - }); + const tx = await pollContract.publishMessage(message.asContractParam(), encKeypair.pubKey.asContractParam()); const receipt = await tx.wait(); if (receipt?.status !== 1) { diff --git a/cli/ts/commands/signup.ts b/cli/ts/commands/signup.ts index f611dba193..2772acabbc 100644 --- a/cli/ts/commands/signup.ts +++ b/cli/ts/commands/signup.ts @@ -69,7 +69,7 @@ export const signup = async ({ let stateIndex = ""; try { // sign up to the MACI contract - const tx = await maciContract.signUp(userMaciPubKey.asContractParam(), sgData, ivcpData, { gasLimit: 1000000 }); + const tx = await maciContract.signUp(userMaciPubKey.asContractParam(), sgData, ivcpData); const receipt = await tx.wait(); logYellow(quiet, info(`Transaction hash: ${tx.hash}`));