You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(simulator): async proxy types and live address binding (#154)
* fix(simulator): type circuit proxies as promise-returning
The 0.18 migration made every circuit proxy async but left
ContextlessCircuits mapping to the bare result, so a consumer typed
`boolean` received `Promise<boolean>` and any truthiness check passed
vacuously. The cast on the Proxy return masked the mismatch from tsc.
* Circuit.ts: map ContextlessCircuits to `Promise<R>`; AsyncCircuits
becomes an alias so the two cannot drift.
* create-contract.type-test.ts: pin the promise mapping for both the
0.18 promise shape and the 0.16 sync shape; fails on the old mapping.
* createDrySimulator.ts: narrow the init guard to `=== undefined` and
note why the private-state cast is sound.
* AbstractSimulator.ts: same cast note.
* fix(simulator): bind live pure evaluation to deployed address
In live mode the local evaluator was built before the LiveContext
resolved, so it kept the dummy address in its circuit context while
the public simulator reported the deployed one. Resolve the context
first, seed the evaluator with the deployed address, and reject an
explicit contractAddress that disagrees with it.
The deployed address now reaches the runtime, so a live harness must
supply a parseable one; the mock worlds in the tests move from a
made-up string to dummyContractAddress().
* docs(release): hyphenate and align prerelease wording
0 commit comments