Giter Club home page Giter Club logo

fluence-ether-dex-price's Introduction

Fluence Powered Ether Price Descovery

An open source Fluence powrered service that searches Ethereum decentralized exchanges to find the best Ethereum pair prices. The frontend makes use of a curl Fluence service written in Rust to fetch ether prices from an Airswap microservice.

A live version of this website using testnet is deployed at: https://amazing-heyrovsky-476eda.netlify.app/

preview

Get Started

Follow the steps below to get started with using this project. In order for the build and deployment to work properly make sure that you have the following dependencies installed on your system:

  1. Docker
  2. mrepl (cargo install mrepl)
  3. marine (cargo install marine)

Fluence

Build

To build the wasm modules of the services run in the root folder:

npm run fluence-build

After the build process is finished, the wasm modules will appear in the artifacts/ folder.

Deploy

To deploy the fluence service amend the application config with the node id of your testnet/local/mainnet:

and run in the root directory:

FLUENCE_ENV=(local | testnet | mainnet) npm run fluence-deploy

NOTE: Change the FLUENCE_ENV variable accordingly.

Here is an example application config.

{
    "services": {
        "curl": {
            "dependencies": ["curl"],
            "node": "12D3KooWKEprYXUXqoV5xSBeyqrWLpQLLH4PXfvVkDJtmcqmh5V3"
        }
    },
    "modules": {
        "curl": {
            "file": "artifacts/curl.wasm",
            "config": {
                "mounted_binaries": {
                    "curl": "/usr/bin/curl"
                }
            }
        }
    },
    "scripts": {},
    "script_storage": {}
}

Each environment deployment creates an json artifact in ng-app/src/fluence which is loaded by the Angular application and used in the environment variables.

Local deployment

Note the if you want to deploy in a local node you must have a Fluence node running locally first. To launch a local node, ensure that you have docker installed and run:

npm run fluence-node

To get the peerID of your local node you can also run:

npm run fluence-node-peerid

Angular Client

To launch the angular app navigate to ng-app/ folder and run:

Install dependencies (Only need to run once)

npm install

Launch

npm start -- --configuration=testnet

If you use local configuration make sure you have a fluence nore running and you have already followed the steps above for deploying the Fluence service locally.

fluence-ether-dex-price's People

Contributors

apogiatzis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.