GithubHelp home page GithubHelp logo

NOTE: This repository has been moved. Work is continuing under the @statechannels organization as part of statechannels.org project to unify state channels initiatives.


Counterfactual
Counterfactual

Simple off-chain applications framework for Ethereum.

circleci license


Counterfactual 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 our whitepaper or a less technical written description. Further, if you want to dive into the specifications of the Counterfactual protocol you can read them here.

Packages

Solidity Packages

Package Version Description
@counterfactual/cf-funding-protocol-contracts npm Contracts implementation of the Counterfactual funding protocol
@counterfactual/cf-adjudicator-contracts npm Contracts implementation of an AppInstance Adjudicator

Typescript/Javascript Packages

Counterfactual-specific packages

Package Version Description
@counterfactual/node npm The core state channels client that a user runs
@counterfactual/cf.js npm A JS API for interacting with off-chain apps
@counterfactual/node-provider npm Wrapper around API calls to a Node

Utilities

Package Version Description
@counterfactual/types npm Shared type declarations
@counterfactual/typescript-typings npm Shims for external library typings

Contributing

Ethereum Networks

The Playground currently only supports the Kovan network.

Installing dependencies

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

To install the dependencies:

yarn

Building packages

It is recommended (optional) that you installed solc compiler binary on your machine (installation guide) and specify the following in your .env under cf-funding-protocol-contracts and apps

NATIVE_SOLC=true

To build all packages:

yarn build

Clean

To clean all packages:

yarn clean

Lint

To lint all packages:

yarn lint

To also apply automatic fixes:

yarn lint:fix

Tests

To run all tests:

yarn test

To run E2E tests:

  • If you're using E2E tests for the first time or have done recent changes to the code, run:
yarn test:e2e:setup
  • If you're re-running tests or writing new scenarios, run:
NODE_EXTENDED_PRIVATE_KEY="..." yarn test:e2e

See the "Funding the Hub Account for Playground Testing" section on the Simple Hub Server package for more information about NODE_EXTENDED_PRIVATE_KEY.

Patches

We generate patches using the patch-package tool with a workaround described in this issue for yarn workspaces.

Counterfactual's Projects

dapps-bots icon dapps-bots

Counterfactual dapps, bots and the legacy Playground

monorepo icon monorepo

Home for all packages related to the Counterfactual project

paper icon paper

📄 Counterfactual: Generalized State Channels Paper

research icon research

No description, website, or topics provided.

waffle icon waffle

Library for writing and testing smart contracts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.