Skip to content

fix(juror): invoke cast_vote and reveal_vote contract methods in JurorClient - #844

Closed
jeffrey-graham wants to merge 1 commit into
trustflow-protocol:mainfrom
jeffrey-graham:fix/juror-client-vote-reveal-invoke-contract-595
Closed

jeffrey-graham wants to merge 1 commit into
trustflow-protocol:mainfrom
jeffrey-graham:fix/juror-client-vote-reveal-invoke-contract-595

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Closes #595

Summary

  • Wires JurorClient.vote() in src/juror/client.ts to call invokeContract(client, "cast_vote", args, params.jurorAddress) with the ScVal arguments from buildVoteArgs.
  • Wires JurorClient.submitReveal() in src/juror/client.ts to call invokeContract(client, "reveal_vote", args, p.jurorAddress) with the ScVal arguments from buildRevealArgs.
  • Propagates contract simulation/submission failures as { ok: false, error } and returns the real on-chain txHash on success.
  • Updates tests/juror.test.ts to verify both contract invocation and { ok: false } error propagation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JurorClient.vote() and submitReveal() fabricate a txHash and never call the contract

1 participant