Skip to content

Commit 566c718

Browse files
authored
Merge pull request #189 from KomodoPlatform/dev
sync
2 parents be1b857 + d2976fa commit 566c718

19 files changed

+8182
-691
lines changed

.github/workflows/get_data_lint_files_deploy.yml

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ jobs:
6565
- name: Prepare data files for GPTs
6666
run: node utils/js/create_data_for_gpts.js
6767

68+
- name: Ensure change logs are updated
69+
if: github.base_ref == 'main' || github.ref == 'refs/heads/main'
70+
run: node utils/js/ensure_changelog_update.js
71+
6872
- name: Set lint-fix branch name
6973
id: vars
7074
shell: bash

data-for-gpts/all-content.txt

+5,806-426
Large diffs are not rendered by default.

data-for-gpts/antara-content.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -16142,7 +16142,8 @@ curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curlte
1614216142
```
1614316143
</CollapsibleSection>
1614416144
export const title = "Introduction to Antara Framework";
16145-
export const description = "This guide is intended for developers learning about, building, and interacting with the Antara framework.";
16145+
export const description =
16146+
"This guide is intended for developers learning about, building, and interacting with the Antara framework.";
1614616147

1614716148
# Introduction to Antara
1614816149

@@ -16152,10 +16153,6 @@ Welcome to the Antara technical documentation.
1615216153

1615316154
This documentation is intended for developers learning about, building, and interacting with the Antara framework.
1615416155

16155-
Users who are not interested in these activities, but are searching for documentation assistance, can find support in the Komodo Support Center.
16156-
16157-
[<b>Link to Komodo Support Center</b>](https://support.komodoplatform.com/support/home)
16158-
1615916156
#### Conceptual Overview
1616016157

1616116158
A brief conceptual overview of the Antara framework can be found in the <b>Start Here</b> > <b>Product Introductions</b> > <b>Smart Chains & Antara </b> section.
@@ -22519,7 +22516,7 @@ Make sure that the total `ac_supply` of this Smart Chain is fairly large. `77777
2251922516

2252022517
Recall also that a user must have a `pubkey` enabled when interacting with an Antara-related Smart Chain. [View this linked material for an explanation.](/antara/tutorials/understanding-antara-addresses/)
2252122518

22522-
If desired, the reader may use an existing Smart Chain instead of a temporary educational chain. [Follow this link](https://github.com/jl777/komodo/blob/master/src/assetchains.old) for a list of asset-chain launch parameters.
22519+
If desired, the reader may use an existing Smart Chain instead of a temporary educational chain. [Follow this link](https://github.com/komodoplatform/komodo/blob/master/src/assetchains.old) for a list of asset-chain launch parameters.
2252322520

2252422521
#### Create a Token to Represent an External Cryptocurrency
2252522522

data-for-gpts/atomicdex-content.txt

+172-5
Original file line numberDiff line numberDiff line change
@@ -21947,7 +21947,8 @@ Version 0.2.8 of the AtomicDEX API includes the following changes.
2194721947
* optimise FTC integration
2194821948
* update log tags
2194921949
export const title = "Introduction to AtomicDEX";
21950-
export const description = "Explore the technical documentation for AtomicDEX, the decentralized exchange powered by atomic swaps, and learn about the AtomicDEX API.";
21950+
export const description =
21951+
"Explore the technical documentation for AtomicDEX, the decentralized exchange powered by atomic swaps, and learn about the AtomicDEX API.";
2195121952

2195221953
# Introduction to AtomicDEX
2195321954

@@ -21957,10 +21958,6 @@ Welcome to the AtomicDEX technical documentation.
2195721958

2195821959
This documentation is intended for developers utilizing the AtomicDEX API.
2195921960

21960-
Users who are not interested in development-related activities, but are searching for documentation assistance, can find support in the Komodo Support Center.
21961-
21962-
[<b>Link to Komodo Support Center</b>](https://support.komodoplatform.com/support/home)
21963-
2196421961
#### Conceptual Overview
2196521962

2196621963
A brief conceptual overview of AtomicDEX can be found in the <b>Start Here</b> > <b>Product Introductions</b> > <b>AtomicDEX </b> section.
@@ -22712,6 +22709,176 @@ AtomicDEX also enables a feature known as Liquidity Multiplication, a protocol t
2271222709
Liquidity Multiplication therefore allows an initial amount of funding to create an exponentially higher amount of liquidity on the exchange. This also provides a special advantage for traders that like to wait for below-market dumps. While this feature is something that any other exchange could implement, few do.
2271322710

2271422711
On AtomicDEX, all orderbook entries are 100% backed by real funds, as opposed to a centralized exchange’s vouchers, which may be one reason why AtomicDEX can more readily offer this feature.
22712+
export const title = "Get telegram notifications for your AtomicDEX LP";
22713+
export const description =
22714+
"This document describes how to become a Liquidity Provider for AtomicDEX with telegram notifications using docker.";
22715+
22716+
import rickmorty from "@/public/images/atomicdex-api/tg-bot-rickmorty.png";
22717+
import passphrase from "@/public/images/atomicdex-api/tg-bot-passphrase.png";
22718+
import orderbook from "@/public/images/atomicdex-api/tg-RICKMORTYorderbook.png";
22719+
22720+
# How To Become a Liquidity Provider for AtomicDEX with Telegram Notifications using Docker
22721+
22722+
## Installation
22723+
22724+
### Clone the repository
22725+
22726+
Command:
22727+
22728+
```bash
22729+
git clone https://github.com/komodohowto/docker-atomicdex-api-marketmaker.git
22730+
```
22731+
22732+
<collapse-text hidden title="Sample Output">
22733+
```
22734+
Cloning into 'docker-atomicdex-api-marketmaker'...
22735+
remote: Enumerating objects: 20, done.
22736+
remote: Counting objects: 100% (20/20), done.
22737+
remote: Compressing objects: 100% (10/10), done.
22738+
remote: Total 20 (delta 10), reused 20 (delta 10), pack-reused 0
22739+
Unpacking objects: 100% (20/20), done.
22740+
```
22741+
</collapse-text>
22742+
22743+
### Build Docker Image
22744+
22745+
Commands:
22746+
22747+
```bash
22748+
cd docker-atomicdex-api-marketmaker/
22749+
docker build -t komodohowto/dev-marketmaker2 .
22750+
```
22751+
22752+
<collapse-text hidden title="Sample Output">
22753+
```
22754+
Sending build context to Docker daemon 99.33kB
22755+
Step 1/14 : FROM ubuntu:18.04 as build
22756+
---> 4c108a37151f
22757+
Step 2/14 : ENV BUILD_PACKAGES="build-essential git llvm-3.9-dev libclang-3.9-dev clang-3.9 cmake libssl-dev pkg-config jq curl"
22758+
---> Using cache
22759+
---> 3b813b17e4d7
22760+
Step 3/14 : RUN apt-get update && apt-get install -y $BUILD_PACKAGES
22761+
---> Using cache
22762+
---> 41810097bcaa
22763+
Step 4/14 : RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
22764+
---> Using cache
22765+
---> 2009c98d7fa6
22766+
Step 5/14 : RUN /bin/bash -c "source $HOME/.cargo/env && rustup install nightly-2019-06-26 && rustup default nightly-2019-06-26 && rustup component add rustfmt-preview"
22767+
---> Using cache
22768+
---> a53c682998f9
22769+
Step 6/14 : RUN git clone https://github.com/KomodoPlatform/atomicDEX-API --branch mm2 --single-branch
22770+
---> Using cache
22771+
---> 8a8e51b28cc0
22772+
Step 7/14 : RUN cd atomicDEX-API && /bin/bash -c "source $HOME/.cargo/env && cargo build --features native -vv"
22773+
---> Using cache
22774+
---> adfcc059873e
22775+
Step 8/14 : FROM ubuntu:18.04
22776+
---> 4c108a37151f
22777+
Step 9/14 : RUN apt-get update && apt-get install -y git jq wget curl nano
22778+
---> Using cache
22779+
---> 2dd149bda261
22780+
Step 10/14 : RUN cd /usr/local/bin && wget https://raw.githubusercontent.com/jl777/coins/master/coins
22781+
---> Using cache
22782+
---> e9184dd1aaeb
22783+
Step 11/14 : COPY --from=build /atomicDEX-API/target/debug/mm2 /usr/local/bin
22784+
---> Using cache
22785+
---> 28f19909035f
22786+
Step 12/14 : COPY /scripts/* /usr/local/bin/
22787+
---> Using cache
22788+
---> a1d73142edd9
22789+
Step 13/14 : COPY entrypoint.sh /usr/local/bin/
22790+
---> Using cache
22791+
---> 67edd3956442
22792+
Step 14/14 : CMD ["/usr/local/bin/entrypoint.sh"]
22793+
---> Using cache
22794+
---> dad149e9d795
22795+
Successfully built dad149e9d795
22796+
Successfully tagged komodohowto/dev-marketmaker2:latest
22797+
```
22798+
</collapse-text>
22799+
22800+
## Setup Telegram Bot
22801+
22802+
* Open your Telegram App.
22803+
* Search for the bot named `@BotFather` and start a chat with it
22804+
* Send the message `/help` to receive a list of commands available
22805+
* Send the message `/newbot` to create a new bot
22806+
* Send a message containing the required name of the bot. It must end in `bot`. Like this, for example: TetrisBot or tetris\_bot.
22807+
* Once the bot is created, take note of the username (hereby referred as `BOT_USERNAME`) and bot token (hereby referred as `BOT_TOKEN`) from the message sent to you.
22808+
* Start a chat with the new bot created
22809+
* Go to the url: `https://api.telegram.org/bot<YourBOTToken>/getUpdates`. Replace the `<YourBOTToken>` with the `BOT_TOKEN`
22810+
* In the response, look for the key: `chat`
22811+
22812+
```json
22813+
"chat": {
22814+
"id": 7xxxxxxxxxx,
22815+
"first_name": "gxxxxxxx",
22816+
"type": "private"
22817+
},
22818+
```
22819+
22820+
* the id in the above json is hereby referred as `BOT_CHATID`
22821+
22822+
Now we have all the details needed to start our Marketmaker with Telegram bot notifications enabled!
22823+
22824+
## Usage
22825+
22826+
### Start Container With Telegram Bot Notification
22827+
22828+
Command:
22829+
22830+
```bash
22831+
docker run -it -e BOT_TOKEN='989XXXXXX:AAXXXXXXXXXXXXeso' -e BOT_CHATID='93XXXXX6' -e BOT_USERNAME='mymarketmakerbot' komodohowto/dev-marketmaker2
22832+
```
22833+
22834+
Replace the values `BOT_TOKEN='989XXXXXX:AAXXXXXXXXXXXXeso' -e BOT_CHATID='93XXXXX6' -e BOT_USERNAME='mymarketmakerbot'` with the ones belonging to your bot
22835+
22836+
A message will be received on your bot like this:
22837+
22838+
<OptimizedImage title="Tg Bot Passphrase" src={passphrase} classNaming="w-full" alt="tg-bot-passphrase" />
22839+
22840+
### Start Atomic DEX API Marketmaker
22841+
22842+
Command:
22843+
22844+
```bash
22845+
start.sh
22846+
```
22847+
22848+
<collapse-text hidden title="Sample Output">
22849+
```
22850+
root 30 17.5 3.8 879940 154996 pts/0 Sl+ 10:09 0:00 /usr/local/bin/mm2 {"gui":"MM2GUI","netid":9999, "userhome":"/root", "passphrase":"L1XXXXXXXXXXXXXXXXXXXRY", "rpc_password":"HlXXXXXXXKW"}
22851+
```
22852+
</collapse-text>
22853+
22854+
This outputs the PID within the docker container, the passphrase & the rpc\_password that is used with the packaged scripts.
22855+
22856+
### Connect to RICK & MORTY Coin Networks
22857+
22858+
Commands:
22859+
22860+
```bash
22861+
RICKconnect.sh
22862+
MORTYconnect.sh
22863+
```
22864+
22865+
The helpful telegram bot sends this notification for this demo:
22866+
22867+
<OptimizedImage title="Tg Bot RickMorty" src={rickmorty} classNaming="w-full" alt="tg-bot-rickmorty" />
22868+
22869+
### View RICK/MORTY Orderbook
22870+
22871+
Command:
22872+
22873+
```bash
22874+
RICKMORTYorderbook.sh
22875+
```
22876+
22877+
Which our bot helpfully relays to us!
22878+
22879+
<OptimizedImage title="Tg RICKMORTY Orderbook" src={orderbook} classNaming="w-full" alt="tg-RICKMORTYorderbook" />
22880+
22881+
Now that we can see the orderbooks are in a simple JSON schema, it is trivial to create a rudimentary GUI application.
2271522882
export const title = "AtomicDEX Metrics";
2271622883
export const description =
2271722884
"Monitor and analyze the performance and activity of your AtomicDEX API sessions with various metrics.";

0 commit comments

Comments
 (0)