diff --git a/packages/cli/ts/commands/signup.ts b/packages/cli/ts/commands/signup.ts index 04b461fdf4..b4e0d65997 100644 --- a/packages/cli/ts/commands/signup.ts +++ b/packages/cli/ts/commands/signup.ts @@ -69,6 +69,7 @@ export const signup = async ({ const maciContract = MACIFactory.connect(maciAddress, signer); let stateIndex = ""; + let voiceCredits = ""; let receipt: ContractTransactionReceipt | null = null; try { @@ -88,7 +89,7 @@ export const signup = async ({ if (receipt?.logs) { const [log] = receipt.logs; const { args } = iface.parseLog(log as unknown as { topics: string[]; data: string }) || { args: [] }; - [stateIndex] = args; + [stateIndex, , , voiceCredits] = args; logGreen(quiet, success(`State index: ${stateIndex.toString()}`)); } else { logError("Unable to retrieve the transaction receipt"); @@ -99,6 +100,7 @@ export const signup = async ({ return { stateIndex: stateIndex ? stateIndex.toString() : "", + voiceCredits: voiceCredits ? Number.parseInt(voiceCredits, 10) : 0, hash: receipt!.hash, }; }; diff --git a/packages/cli/ts/utils/interfaces.ts b/packages/cli/ts/utils/interfaces.ts index 4f4fcc7986..7901872b00 100644 --- a/packages/cli/ts/utils/interfaces.ts +++ b/packages/cli/ts/utils/interfaces.ts @@ -840,6 +840,11 @@ export interface ISignupData { */ stateIndex: string; + /** + * The voice credits of the user + */ + voiceCredits: number; + /** * The signup transaction hash */