GithubHelp home page GithubHelp logo

fabianyvidal / ex_plasma Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omgnetwork/ex_plasma

0.0 0.0 0.0 425 KB

Elixir library for the OMG Plasma Contracts Transaction Format

Home Page: https://omg.network/

License: Apache License 2.0

Elixir 99.61% Dockerfile 0.17% Makefile 0.10% JavaScript 0.12%

ex_plasma's Introduction

Coverage Status

ExPlasma

TODO: Add description

(ExPlasma)[] is an elixir client library to interact with the OmiseGO Plasma contracts.

Installation

If available in Hex, the package can be installed by adding ex_plasma to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_plasma, "~> 0.1.0"}
  ]
end

You will also need to specify some configurations in your config/config.exs:

config :ex_plasma,
  eip_712_domain: %{
    name: "ExPlasma",
    salt: "some-salt",
    verifying_contract: "contract_address",
    version: "1"
  }

Setup (Mac OS)

  1. Clone the repo to your desktop [email protected]:omisego/ex_plasma.git
  2. Run mix compile in your terminal.
  3. If there are any unavailable dependencies, run mix deps.get. If you run into any issues with libsecp256k1_source, run brew install automake pkg-config libtool libffi gmp in your terminal.

Testing

You can run the tests by running;

mix test
mix credo
mix dialyzer

exvcr

The test suite has network requests recorded by exvcr. To record new cassettes, spin up docker:

docker-compose up

Or alternatively, you can use the make command to spin up a detached docker compose.

make up # docker-compose detached
make logs # connects to logs from docker-compose

This will load up Ganche and the plasma contracts to deploy.

Conformance test

To ensure we can encode/decode according to the contracts, we have a separate suite of conformance tests that loads up mock contracts to compare encoding results. You can run the test by:

make up-mocks
mix test --only conformance

This will spin up ganache and deploy the mock contracts.

Integration test

We also have more integrated flows we need to test, such as the exit game. These use live interactions with the plasma framework contracts. To run those, you can execute:

make up
mix test --only integration

This will spin up ganache and deploy the plasma framework and run the integration suite.

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_plasma.

ex_plasma's People

Contributors

achiurizo avatar mederic-p avatar ayrat555 avatar unnawut avatar gesseekur avatar pdobacz avatar

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.