Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.14 KB

HACKING.md

File metadata and controls

47 lines (30 loc) · 1.14 KB

Hacking arch3.js

This document explains all you need to work on arch3.js, i.e. modify it. It is not intended for users of arch3.js.

Prerequisite

  • A UNIX-like development environment
  • Node.js 16+ and yarn
  • Docker for running the tests

Linux users are advised to install Docker following the rootless mode instructions.

Installation

  1. Install dependencies: yarn install
  2. Install SDKs (to make IDE integration work): yarn dlx @yarnpkg/sdks

Running tests

The unit tests depends on a running local chain. To configure it, start the local chain using the setup script that creates all required wallets and contracts:

./scripts/start-local-node.sh

After the chain is up, run the tests in all packages using:

yarn test:all

To run tests for a single package, do:

yarn workspace @archwayhq/arch3-core test

Code Style

After you modified a file, check if the linter is happy:

yarn lint:all

# or if you want linting plus automatic fixing
yarn lint:all:fix