![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@gnosis.pm/dx-services
Advanced tools
[![Build Status](https://travis-ci.org/gnosis/dx-services.svg?branch=master)](https://travis-ci.org/gnosis/dx-services?branch=master) [![npm version](https://badge.fury.io/js/dx-services.svg)](https://badge.fury.io/js/dx-services) [![Coverage Status](http
DutchX Services, is a project that contains services and other goodies to make easier the interaction with the Dutch Exchange smart contracts.
Checkout the DutchX Documentation.
It contains five main elements:
Model: Set of convenient wrappers and utilities to provide a simpler way to interact with the DutchX.
repositories
: Provide the data access to external data sources like
the DutchX smart contracts, price feeds, gas price feeds, etc.
They provide also a more intuitive error handling, that gives detailed
information about the reasons a smart contract revert a operation.services
: Provides some common bussiness logic operations to make
DutchX interactation easier.REST Api:
Cli (Command Line Interface):
Liquidity Bots
Scheduled tasks:
Use the CLI:
docker run \
-e NODE_ENV=pre \
-e ETHEREUM_RPC_URL=https://rinkeby.infura.io \
-e NETWORK=rinkeby \
-e MARKETS=WETH-RDN,WETH-OMG \
-e RDN_TOKEN_ADDRESS=0x3615757011112560521536258c1e7325ae3b48ae \
-e OMG_TOKEN_ADDRESS=0x00df91984582e6e96288307e9c2f20b38c8fece9 \
gnosispm/dx-services:staging \
yarn cli -- \
state WETH-RDN
In the previous command, notice that:
NODE_ENV
: Stablish the environment. Valid values are dev
, pre
, pro
.ETHEREUM_RPC_URL
: Ethereum node. i.e. http://localhost:8545 or https://rinkeby.infura.ioMARKETS
: List of token pairs in the format: <token1>-<token2>[,<tokenN>-<tokenM>]*
,
i.e. WETH-RDN,WETH-OMG
<token>__TOKEN_ADDRESS
. i.e. RDN_TOKEN_ADDRESS
.gnosispm/dx-services:staging
: Is the name of the Docker image. staging
is
the image generated out of the master branch. You can checkout other images
in https://hub.docker.com/r/gnosispm/dx-servicesyarn cli
: Is the npm script that will run the CLIstate WETH-RDN
:
-h
to get the complete list.Start API:
docker run \
-e NODE_ENV=pre \
-e ETHEREUM_RPC_URL=https://rinkeby.infura.io \
-e MARKETS=WETH-RDN,WETH-OMG \
-e RDN_TOKEN_ADDRESS=0x3615757011112560521536258c1e7325ae3b48ae \
-e OMG_TOKEN_ADDRESS=0x00df91984582e6e96288307e9c2f20b38c8fece9 \
-p 8080:8080 \
gnosispm/dx-services:staging \
yarn api
To check out the Public API, just open http://localhost:8080 in any Browser.
In the previous command, notice that it has a similar configuration as in the CLI run, with the difference of:
-p 8080:8080
: It tells Docker to expose the container port 8080 (the API one)
in the host machine.yarn api
: NPM script used to run the Public API.For more information about the Public API, checkout:
Start bots: First of all you need to configure the bots using a file with this structure:
const MARKETS = [
{ tokenA: 'WETH', tokenB: 'RDN' }
]
const BUY_LIQUIDITY_RULES_DEFAULT = [
// Buy 1/2 if price falls below 99%
{
marketPriceRatio: {
numerator: 99,
denominator: 100
},
buyRatio: {
numerator: 1,
denominator: 2
}
},
// Buy the 100% if price falls below 96%
{
marketPriceRatio: {
numerator: 96,
denominator: 100
},
buyRatio: {
numerator: 1,
denominator: 1
}
}
]
const MAIN_BOT_ACCOUNT = 0
const BUY_LIQUIDITY_BOTS = [{
name: 'Main buyer bot',
markets: MARKETS,
accountIndex: MAIN_BOT_ACCOUNT,
rules: BUY_LIQUIDITY_RULES_DEFAULT,
notifications: [{
type: 'slack',
channel: '' // If none provided uses SLACK_CHANNEL_BOT_TRANSACTIONS
}]
}]
const SELL_LIQUIDITY_BOTS = [{
name: 'Main seller bot',
markets: MARKETS,
accountIndex: MAIN_BOT_ACCOUNT,
notifications: [{
type: 'slack',
channel: '' // If none provided uses SLACK_CHANNEL_BOT_TRANSACTIONS
}]
}]
module.exports = {
MARKETS,
MAIN_BOT_ACCOUNT,
BUY_LIQUIDITY_BOTS,
SELL_LIQUIDITY_BOTS
}
docker run \
-e MNEMONIC="super secret thing that nobody should know ..." \
-e NODE_ENV=pre \
-e NETWORK=rinkeby \
-e ETHEREUM_RPC_URL=https://rinkeby.infura.io \
-e RDN_TOKEN_ADDRESS=0x3615757011112560521536258c1e7325ae3b48ae \
-e OMG_TOKEN_ADDRESS=0x00df91984582e6e96288307e9c2f20b38c8fece9 \
--mount type=bind,source=route/for/custom/config,destination=/usr/src/app/custom_conf
-e CONFIG_FILE=/usr/src/app/custom_conf/config_file.js
-p 8081:8081 \
gnosispm/dx-services:staging \
yarn bots
To check out the Bots API, just open http://localhost:8081 in any Browser.
In the previous command, notice that it has a similar configuration as in the Public API run, with the difference of:
MNEMONIC
: Allows to setup the bots account used to sign the transactions.MARKETS
: It's not used in this caseCONFIG_FILE
: The file with details about bot configuration--mount
: Mount a volume in the docker container that should contain the CONFIG_FILE. The source
route should be the route containing the desired config file. The route passed to CONFIG_FILE
should be relative to destination
folder in the container-p 8081:8081
: The Bots API it's exposed on port 8081.yarn bots
: NPM Script used to run the Liquidity Bots.For more information about the Bots, check out the dx-examples-liquidity-bots project.
yarn install
npm run rpc
npm run setup
Start API:
npm run api
Start Bots:
npm run bots
Use the bot-cli:
npm run cli
Some examples:
npm run cli -- state WETH-RDN
npm run cli -- send 0.5 WETH 0x627306090abaB3A6e1400e9345bC60c78a8BEf57
npm run cli -- deposit 0.5 WETH
npm run cli -- deposit 150 RDN
npm run cli -- sell 100 WETH-RDN
npm run cli -- buy 100 RDN-WETH
This project is released under MIT License
All the code is provided WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
FAQs
[![Build Status](https://travis-ci.org/gnosis/dx-services.svg?branch=master)](https://travis-ci.org/gnosis/dx-services?branch=master) [![npm version](https://badge.fury.io/js/dx-services.svg)](https://badge.fury.io/js/dx-services) [![Coverage Status](http
The npm package @gnosis.pm/dx-services receives a total of 1 weekly downloads. As such, @gnosis.pm/dx-services popularity was classified as not popular.
We found that @gnosis.pm/dx-services demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.