Skip to content

The Escrow example no longer works after update from SnarkyJS to o1js #1218

Closed
@marekyggdrasil

Description

@marekyggdrasil

I have recently updated my zkApp https://mac.sqrtxx.com/ from SnarkyJS version 0.7.3 to o1js version 0.14.* and I noticed my automated tests started to fail.

The codebase is pretty big and confusing, so before asking for help I traced down the problem and made an isolated example. It turned out that the Escrow example is no longer working:

https://github.com/o1-labs/o1js/blob/56975fcd6a905e2c361ebd564f578c0b620cce5f/src/examples/zkapps/escrow/escrow.ts

I made a whole separate repo that helps check it and reproduce, repo is

https://github.com/sqrt-xx/o1js-escrow-problem/

The way to reproduce is:

  1. Clone the repo
  2. Install the dependencies npm install
  3. Run the tests npm run test

What happens is, Escrow contract gets compiled and deployed, then one of tests accounts does the deposit to the contract. Test fails because the balance of the contract does not increase and balance of deposit account does not decrease.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions