- Notifications
You must be signed in to change notification settings - Fork3
apogiatzis/fluence-ether-dex-price
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
An open source Fluence powrered service that searches Ethereum decentralized exchanges to find the best Ethereum pair prices.The frontend makes use of acurl
Fluence service written in Rust to fetch ether prices from anAirswap microservice.
A live version of this website using testnet is deployed at:https://amazing-heyrovsky-476eda.netlify.app/
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:
- Docker
- mrepl (
cargo install mrepl
) - marine (
cargo install marine
)
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 theartifacts/ folder.
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 theFLUENCE_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 inng-app/src/fluence which is loaded by the Angular application and used in the environment variables.
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
To launch the angular app navigate tong-app/
folder and run:
Install dependencies (Only need to run once)
npm install
Launch
npm start -- --configuration=testnet
If you uselocal
configuration make sure you have a fluence nore running and you have already followed the steps above for deploying the Fluence service locally.