Skip to content

Commit

Permalink
fix(cli): remove hardcoded gas limit from signup and publish
Browse files Browse the repository at this point in the history
hardcoded gas limit might prevent transaction from succeeding on certain networks

fix #1086
  • Loading branch information
ctrlc03 committed Jan 23, 2024
1 parent 24c0bd4 commit 0f6139f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cli/ts/commands/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion cli/ts/commands/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`));
Expand Down

0 comments on commit 0f6139f

Please sign in to comment.