OpenZeppelin / OpenZeppelin/compact-tools
Add entrypoint to query zswap inputs/outputs
Open
@andrew-fleming is already working on this.
Since Nov 14, 2025.
enhancement
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 5
- Avg merge
- 15h 28m
- Merged PRs (30d)
- 31
Description
In order to check the zswap inputs and outputs, you currently have to use the old syntax of manually setting the circuit ctx within the wrapper and returning the ctx. To avoid this, there should be a way to view the zswap state from the simulator class. Otherwise, you have to do it like this:
public unsafeMint(
recipient: Either<ZswapCoinPublicKey, ContractAddress>,
amount: bigint,
): CircuitResults<AccountPrivateState, CoinInfo> {
// Using the older method for executing a call
// in order to see the zswap details.
// There should be a utility func(s) to make this easier
// in the simulator package
const res = this.contract.impureCircuits.unsafeMint(
this.circuitContext,
recipient,
amount,
);
this.circuitContext = res.context;
return res;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.