A simple & powerful Ethereum development library and Web-based smart wallet.
yarn install 0xsequence
- 0xsequence
- abi
- api
- auth
- bridge
- chaind
- config
- deployer
- guard
- multicall
- network
- provider
- relayer
- transactions
- utils
- wallet
Below are notes and instructions on how to get your development environment up and running, and enjoyable.
-
Install dependencies -- we use yarn workspaces, so please use yarn instead of npm. Run,
yarn install -
Workflow -- we use the amazing preconstruct package to handle our monorepo build system.
-
Local dev -- when you're working on the code in this repository, you can safely run
yarn devat the root-level, which will link all packages/** together, so that when a local dependency from packages/** is used by another, it will automatically be linked without having to run a build command. Just remember: runyarn devanytime you developing in this repo. Note, that when you runyarn buildit will clear the dev environment, so you will need to runyarn devagain after a build. However,yarn buildshould only be used when making a release. -
Testing -- to test the system, you can run
yarn testat the top-level or at an individual package-level. -
Type-checking -- to typecheck the system you can run
yarn typecheckat any level. -
Building -- to compile the project to dist files for a release, run
yarn buildat the root-level. Note building packages repeatedly during development is unnecessary withpreconstruct. During local development runyarn devand when building to make a release, runyarn build. -
Versioning -- this repository uses the handy changesets package for package versioning across the monorepo, as well as changelogs. See Releasing section below.
0xsequence uses changesets to do versioning. This makes releasing really easy and changelogs are automatically generated.
-
Run
yarnto make sure everything is up to date -
Code.. do your magic
-
Run
yarn changesetto generate a new .changeset/ entry explaining the code changes -
Commit and submit your changes as a PR for review
-
Once merged and you're ready to make a release, continue to the next step. If you're not ready to make a release, then go back to step 2.
-
Run
yarn testto double check all tests pass -
Run
yarn version-packagesto bump versions of the packages -
Commit files after versioning. This is the commit that will be published and tagged.
-
Run NPM_CONFIG_OTP=PUT_OTP_CODE_HERE
yarn release. If the 2FA code timesout while publishing, run the command again with a new code, only the packages that were not published will be published.
- Browser tests can be run with
yarn testor, separatelyyarn test:serverandyarn test:run - To run a specific test, run
yarn test:only <test-file-basename>, ie.yarn test:only window-transport
Apache-2.0
Copyright (c) 2017-present Horizon Blockchain Games Inc. / https://horizon.io