Skip to content

Commit

Permalink
fix(cli): remove redundant local check for poll address
Browse files Browse the repository at this point in the history
In genLocalState, we check that a poll contract is present in a local address store file. This is
not necessary as given a pollId and a maci contract address, the address of the poll can be found on
chain.

fix #1084
  • Loading branch information
ctrlc03 committed Jan 23, 2024
1 parent 0e5d633 commit 8b19756
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cli/ts/commands/genLocalState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ export const genLocalState = async ({
logError("MACI contract does not exist");
}

if (!readContractAddress(`Poll-${pollId}`)) {
logError(`There is no poll with id ${pollId}`);
}
if (!(await contractExists(signer.provider!, readContractAddress(`Poll-${pollId}`)))) {
logError(`Poll-${pollId} contract's is not deployed on this network`);
}

// if no private key is passed we ask it securely
const coordPrivKey = coordinatorPrivateKey || (await promptSensitiveValue("Insert your MACI private key"));
if (!PrivKey.isValidSerializedPrivKey(coordPrivKey)) {
Expand Down

0 comments on commit 8b19756

Please sign in to comment.