Skip to content

Commit

Permalink
Merge pull request #189 from KomodoPlatform/dev
Browse files Browse the repository at this point in the history
sync
  • Loading branch information
gcharang authored Feb 9, 2024
2 parents be1b857 + d2976fa commit 566c718
Show file tree
Hide file tree
Showing 19 changed files with 8,182 additions and 691 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/get_data_lint_files_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ jobs:
- name: Prepare data files for GPTs
run: node utils/js/create_data_for_gpts.js

- name: Ensure change logs are updated
if: github.base_ref == 'main' || github.ref == 'refs/heads/main'
run: node utils/js/ensure_changelog_update.js

- name: Set lint-fix branch name
id: vars
shell: bash
Expand Down
6,232 changes: 5,806 additions & 426 deletions data-for-gpts/all-content.txt

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions data-for-gpts/antara-content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16142,7 +16142,8 @@ curl --user $rpcuser:$rpcpassword --data-binary '{"jsonrpc": "1.0", "id":"curlte
```
</CollapsibleSection>
export const title = "Introduction to Antara Framework";
export const description = "This guide is intended for developers learning about, building, and interacting with the Antara framework.";
export const description =
"This guide is intended for developers learning about, building, and interacting with the Antara framework.";

# Introduction to Antara

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

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

Users who are not interested in these activities, but are searching for documentation assistance, can find support in the Komodo Support Center.

[<b>Link to Komodo Support Center</b>](https://support.komodoplatform.com/support/home)

#### Conceptual Overview

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.
Expand Down Expand Up @@ -22519,7 +22516,7 @@ Make sure that the total `ac_supply` of this Smart Chain is fairly large. `77777

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/)

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

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

Expand Down
177 changes: 172 additions & 5 deletions data-for-gpts/atomicdex-content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21947,7 +21947,8 @@ Version 0.2.8 of the AtomicDEX API includes the following changes.
* optimise FTC integration
* update log tags
export const title = "Introduction to AtomicDEX";
export const description = "Explore the technical documentation for AtomicDEX, the decentralized exchange powered by atomic swaps, and learn about the AtomicDEX API.";
export const description =
"Explore the technical documentation for AtomicDEX, the decentralized exchange powered by atomic swaps, and learn about the AtomicDEX API.";

# Introduction to AtomicDEX

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

This documentation is intended for developers utilizing the AtomicDEX API.

Users who are not interested in development-related activities, but are searching for documentation assistance, can find support in the Komodo Support Center.

[<b>Link to Komodo Support Center</b>](https://support.komodoplatform.com/support/home)

#### Conceptual Overview

A brief conceptual overview of AtomicDEX can be found in the <b>Start Here</b> > <b>Product Introductions</b> > <b>AtomicDEX </b> section.
Expand Down Expand Up @@ -22712,6 +22709,176 @@ AtomicDEX also enables a feature known as Liquidity Multiplication, a protocol t
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.

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.
export const title = "Get telegram notifications for your AtomicDEX LP";
export const description =
"This document describes how to become a Liquidity Provider for AtomicDEX with telegram notifications using docker.";

import rickmorty from "@/public/images/atomicdex-api/tg-bot-rickmorty.png";
import passphrase from "@/public/images/atomicdex-api/tg-bot-passphrase.png";
import orderbook from "@/public/images/atomicdex-api/tg-RICKMORTYorderbook.png";

# How To Become a Liquidity Provider for AtomicDEX with Telegram Notifications using Docker

## Installation

### Clone the repository

Command:

```bash
git clone https://github.com/komodohowto/docker-atomicdex-api-marketmaker.git
```

<collapse-text hidden title="Sample Output">
```
Cloning into 'docker-atomicdex-api-marketmaker'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 20 (delta 10), reused 20 (delta 10), pack-reused 0
Unpacking objects: 100% (20/20), done.
```
</collapse-text>

### Build Docker Image

Commands:

```bash
cd docker-atomicdex-api-marketmaker/
docker build -t komodohowto/dev-marketmaker2 .
```

<collapse-text hidden title="Sample Output">
```
Sending build context to Docker daemon 99.33kB
Step 1/14 : FROM ubuntu:18.04 as build
---> 4c108a37151f
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"
---> Using cache
---> 3b813b17e4d7
Step 3/14 : RUN apt-get update && apt-get install -y $BUILD_PACKAGES
---> Using cache
---> 41810097bcaa
Step 4/14 : RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
---> Using cache
---> 2009c98d7fa6
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"
---> Using cache
---> a53c682998f9
Step 6/14 : RUN git clone https://github.com/KomodoPlatform/atomicDEX-API --branch mm2 --single-branch
---> Using cache
---> 8a8e51b28cc0
Step 7/14 : RUN cd atomicDEX-API && /bin/bash -c "source $HOME/.cargo/env && cargo build --features native -vv"
---> Using cache
---> adfcc059873e
Step 8/14 : FROM ubuntu:18.04
---> 4c108a37151f
Step 9/14 : RUN apt-get update && apt-get install -y git jq wget curl nano
---> Using cache
---> 2dd149bda261
Step 10/14 : RUN cd /usr/local/bin && wget https://raw.githubusercontent.com/jl777/coins/master/coins
---> Using cache
---> e9184dd1aaeb
Step 11/14 : COPY --from=build /atomicDEX-API/target/debug/mm2 /usr/local/bin
---> Using cache
---> 28f19909035f
Step 12/14 : COPY /scripts/* /usr/local/bin/
---> Using cache
---> a1d73142edd9
Step 13/14 : COPY entrypoint.sh /usr/local/bin/
---> Using cache
---> 67edd3956442
Step 14/14 : CMD ["/usr/local/bin/entrypoint.sh"]
---> Using cache
---> dad149e9d795
Successfully built dad149e9d795
Successfully tagged komodohowto/dev-marketmaker2:latest
```
</collapse-text>

## Setup Telegram Bot

* Open your Telegram App.
* Search for the bot named `@BotFather` and start a chat with it
* Send the message `/help` to receive a list of commands available
* Send the message `/newbot` to create a new bot
* Send a message containing the required name of the bot. It must end in `bot`. Like this, for example: TetrisBot or tetris\_bot.
* 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.
* Start a chat with the new bot created
* Go to the url: `https://api.telegram.org/bot<YourBOTToken>/getUpdates`. Replace the `<YourBOTToken>` with the `BOT_TOKEN`
* In the response, look for the key: `chat`

```json
"chat": {
"id": 7xxxxxxxxxx,
"first_name": "gxxxxxxx",
"type": "private"
},
```

* the id in the above json is hereby referred as `BOT_CHATID`

Now we have all the details needed to start our Marketmaker with Telegram bot notifications enabled!

## Usage

### Start Container With Telegram Bot Notification

Command:

```bash
docker run -it -e BOT_TOKEN='989XXXXXX:AAXXXXXXXXXXXXeso' -e BOT_CHATID='93XXXXX6' -e BOT_USERNAME='mymarketmakerbot' komodohowto/dev-marketmaker2
```

Replace the values `BOT_TOKEN='989XXXXXX:AAXXXXXXXXXXXXeso' -e BOT_CHATID='93XXXXX6' -e BOT_USERNAME='mymarketmakerbot'` with the ones belonging to your bot

A message will be received on your bot like this:

<OptimizedImage title="Tg Bot Passphrase" src={passphrase} classNaming="w-full" alt="tg-bot-passphrase" />

### Start Atomic DEX API Marketmaker

Command:

```bash
start.sh
```

<collapse-text hidden title="Sample Output">
```
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"}
```
</collapse-text>

This outputs the PID within the docker container, the passphrase & the rpc\_password that is used with the packaged scripts.

### Connect to RICK & MORTY Coin Networks

Commands:

```bash
RICKconnect.sh
MORTYconnect.sh
```

The helpful telegram bot sends this notification for this demo:

<OptimizedImage title="Tg Bot RickMorty" src={rickmorty} classNaming="w-full" alt="tg-bot-rickmorty" />

### View RICK/MORTY Orderbook

Command:

```bash
RICKMORTYorderbook.sh
```

Which our bot helpfully relays to us!

<OptimizedImage title="Tg RICKMORTY Orderbook" src={orderbook} classNaming="w-full" alt="tg-RICKMORTYorderbook" />

Now that we can see the orderbooks are in a simple JSON schema, it is trivial to create a rudimentary GUI application.
export const title = "AtomicDEX Metrics";
export const description =
"Monitor and analyze the performance and activity of your AtomicDEX API sessions with various metrics.";
Expand Down
Loading

0 comments on commit 566c718

Please sign in to comment.