Skip to content

Latest commit

 

History

History
98 lines (88 loc) · 3.93 KB

CLEARMATICS.md

File metadata and controls

98 lines (88 loc) · 3.93 KB

AirSwap Protocols - Clearmatics fork

NPM packages

Dependency graph

flowchart TD;
  utils-->stores;
  utils-->pool;
  utils-->registry;
  utils-->staking;
  utils-->swap;
  utils-->swap-erc20;
  utils-->wrapper;
  utils-->batch-call;
  staking-->swap-erc20;
  swap-erc20-->wrapper;
  swap-erc20-->batch-call;
  swap-->batch-call;
  utils-->libraries;
  pool-->libraries;
  registry-->libraries;
  staking-->libraries;
  swap-->libraries;
  swap-erc20-->libraries;
  wrapper-->libraries;
  batch-call-->libraries;
  libraries-->airswap-ref-server;
  stores-->airswap-ref-server;
  libraries-->airswap-cli;
  libraries-->airswap-web;
Loading

How to add a new network

  1. Install Node v18.19.0 and install dependencies with yarn
  2. Edit parameters in scripts/generate-token-list, run the script and commit and push the new token list for the chain
  3. Add configuration parameters to the following files:
  4. Bump version number in tools/utils/package.json and commit the changes
  5. Rebuild @tools/utils with yarn compile and create a new package with npm pack
  6. Create a new release on GitHub and upload airswap-utils-xxx.tgz
  7. Update the @airswap/utils version in all package.json files and update dependencies with yarn
  8. Get an account with a few ATNs for funding the deployments
  9. Set the PRIVATE_KEY environment variable in .env
  10. Deploy the mock AirSwap token from misc/ast and the contracts from source with yarn deploy --network NAME in the order specified in the dependency graph above
  11. Bump version numbers in package.json of all affected packages and commit the updated deploys.js files
  12. Update dependency versions in all package.json files
  13. Create packages with yarn dist
  14. Upload packages from the dist directory to the new release on GitHub
  15. Update dependency versions in package.json in the following repositories:
  16. Create a new clearmatics/airswap-cli release on GitHub according to its documentation
  17. Install airswap-cli from the new release with npm i -g <package-URL>
  18. Set the CHAIN_ID, PRIVATE_KEY and PROTOCOL_FEE environment variables for clearmatics/airswap-ref-server and deploy the server
  19. Set the SERVER_URL environment variable in .env and configure the registry contract with scripts/configure-registry
  20. Check whether configuration was successful with airswap registry:status
  21. Update src/constants/supportedNetworks.ts in clearmatics/airswap-web and add network icon to public/images/networks/
  22. Redeploy clearmatics/airswap-web