This is a prototype of the Atomic Swap SDK. The implementation contains code for both server and client side.
yarn && yarn build will install dependencies, compile all TS and Solidity code.
To generate docs, run yarn doc. This will output HTML docs into the docs/ folder.
For testing, a local zkSync setup is necessary. See our docs.
After setup is complete, run zk init.
yarn test launches the test suite. More tests are on the way.
A local zkSync server has to be running (zk server).
Preparation:
- Compile config (
zk config compile) - Modify the config (in
etc/env/dev/contracts.toml):- set
dummy_verifierandeasy_exodustotrue
- set
- Initialize the environment (
zk init) - Start the server (
zk server) - Start the prover (
zk dummy-prover run)
yarn exodus launches the test. After test is complete, server is no longer usable (since exodus mode is activated) and will have to be reset.
To reset the server:
- Stop it
- Run
zk contract redeploy - Run
zk server --genesis - Start the server again with
zk server - Restart the dummy-prover
- Check
zk dummy-prover status, it should beenabled. Otherwise, runzk dummy-prover enable. - Make sure you are using
masterbranch, notdev. - Make sure you are using latest
zksync.js. Useyarn upgrade --latest zksyncto upgrade. - Make sure you are using latest
zksyncserver from our public repo.
// TODO