Skip to content

Augment interface of unproven-call-tx.ts to allow cross-contract calls#863

Open
christianschmitz wants to merge 3 commits into
midnightntwrk:mainfrom
christianschmitz:main
Open

Augment interface of unproven-call-tx.ts to allow cross-contract calls#863
christianschmitz wants to merge 3 commits into
midnightntwrk:mainfrom
christianschmitz:main

Conversation

@christianschmitz

@christianschmitz christianschmitz commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

I've requested some changes to make it easier to do cross-contract calls

  1. communicationCommitmentRand is threaded all the way from call options into ContractCallPrototype. Default behavior is unchanged when the field is omitted, because the ledger still generates fresh randomness in that case. The difference is that callers can now provide the exact communication commitment randomness when they need the call transaction to line up with a separately-constructed opening of transientCommit of calling circuits.

  2. Create a variant of createUnprovenCallTxFromInitialStates() called createUnprovenCallTxFromInitialStatesWithZswapLocalState(), which also returns the zswapLocalState. This is more convenient than rebuilding the zswapLocalState externally. We need the zswapLocalState to figure out which outputs are created by the tx, so we can merge them as transient coins in cross-contract calls.

@christianschmitz christianschmitz requested a review from a team as a code owner April 24, 2026 17:51
@CLAassistant

CLAassistant commented Apr 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@christianschmitz christianschmitz changed the title FS/Path Augment interface of unproven-call-tx.ts to allow cross-contract calls Apr 24, 2026
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.

2 participants