Skip to content

Latest commit

 

History

History
137 lines (91 loc) · 4.63 KB

readme.md

File metadata and controls

137 lines (91 loc) · 4.63 KB


State Channels

Simple off-chain applications framework for Ethereum.

circleci license


LEGACY MONOREPO: this monorepo contains packages that are no longer being actively supported by the state channels project. They are provided here for reference.

statechannels is a simple off-chain framework for building state channel applications on top of the Ethereum blockchain. It aims to make it simpler to build permissionless applications that have instant finality with zero-fee transactions.

You can learn more about what state channels are by reading one or other of the whitepapers underpinning the project, or a less technical written description.

Packages

This repository is a monorepo, and contains the following packages maintained with lerna and yarn workspaces:

Installing dependencies

Make sure you have Yarn v1.17.3 installed. For easy management of specific Yarn versions, we recommend using Yarn Version Manager (YVM).

To install the dependencies:

yarn

from the monorepo root.

Building packages

To build all packages:

yarn build

Clean

To clean all packages:

yarn clean

Lint

To lint all packages:

yarn lint:check

To also apply automatic fixes:

yarn lint:write

Tests

To run all tests:

yarn test

Authoring conventional commits

We follow the convention at https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional. Your commits will be linted against this convention. You can do this yourself locally by running

yarn commitlint --from=HEAD~1 --verbose

For help authoring commits, you can check out https://commitizen.github.io/cz-cli/.

Publishing packages

To publish you will need to trigger a github action:

publishing via a github

  1. Select the actions tab
  2. Select whether you want to do a regular publish (Publish Packages) or a pre-release (Publish Packages (canary))
  3. Click on Run workflow
  4. Select the branch (regular publishes will fail unless on master)
  5. For regular publishes, a PR will be created to get the updated version and changelog info back into master. You should merge this immediately!

Fixing a failed publish

Sometimes things will go wrong on CI and the git tags will be created but the package will not be published. To fix this you can do the following locally:

# fetch down any publish tags
git fetch --tags

# push packages to the registries, without creating new releases
npx lerna publish from-package

You might need a npm login --registry https://testnet.thegraph.com/npm-registry/ if you don't already have an access token in your .npmrc.

Typescript doc comments

These should adhere to the TSDoc standard. You can try the TSDoc playground.

Doc comments will appear in our documentation at https://docs.statechannels.org.

Community

State Channels Forums: https://research.statechannels.org/