-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #402 from hummingbot/development
sync / gateway development -> staging v2.3.0
- Loading branch information
Showing
1,971 changed files
with
85,172 additions
and
284,135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Bug Report | ||
description: Create a bug report to help us improve | ||
title: "Bug Report" | ||
labels: bug | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## **Before Submitting:** | ||
* Please edit the "Bug Report" to the title of the bug or issue | ||
* Please make sure to look on our GitHub issues to avoid duplicate tickets | ||
* You can add additional `Labels` to support this ticket (connectors, strategies, etc) | ||
* If this is something to do with installation and how to's we would recommend to visit our [Hummingbot docs](https://hummingbot.org/docs/) and [Discord server](https://discord.gg/hummingbot) | ||
- type: textarea | ||
id: what-happened | ||
attributes: | ||
label: Describe the bug | ||
description: A clear and concise description of the bug or issue. Please make sure to add screenshots and error message to help us investigate | ||
placeholder: Tell us what happened? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduce | ||
attributes: | ||
label: Steps to reproduce | ||
description: A concise description of the steps to reproduce the buggy behavior | ||
value: | | ||
1. | ||
2. | ||
3. | ||
validations: | ||
required: true | ||
- type: input | ||
id: version | ||
attributes: | ||
label: Release version | ||
description: Include your bot version number (Can be found at the upper left corner of your CLI) | ||
validations: | ||
required: true | ||
- type: dropdown | ||
id: build | ||
attributes: | ||
label: Type of installation | ||
description: What type of installation did you use? | ||
options: | ||
- Source | ||
- Docker | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: attachment | ||
attributes: | ||
label: Attach required files | ||
description: Please attach your config file and log file located on the "../gateway/logs/" folder. It would be really helpful to triage the issue. | ||
validations: | ||
required: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Feature request | ||
description: Suggest an idea that will improve the Hummingbot codebase | ||
title: "Feature Request" | ||
labels: enhancement | ||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
## **Before Submitting:** | ||
* Please edit the "Feature Request" to the title of the feature | ||
* Please make sure to look on our GitHub issues to avoid duplicate tickets | ||
* You can add additional `Labels` to support this ticket (connectors, strategies, etc) | ||
* If this is something to do with installation and how to's we would recommend to visit our [Discord server](https://discord.gg/hummingbot) and [Hummingbot docs](https://hummingbot.org/docs/) | ||
- type: textarea | ||
id: feature-suggestion | ||
attributes: | ||
label: Feature Suggestion | ||
description: A clear and concise description of the feature request. If you have looked at the code and know exactly what code changes are needed then please consider submitting a pull request instead. | ||
placeholder: How you want to achieve the desired behavior | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: feature-impact | ||
attributes: | ||
label: Impact | ||
description: A succinct description of why you want the desired behavior specified above. | ||
placeholder: The desired behavior will allow me to.. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: feature-additional-context | ||
attributes: | ||
label: Additional context | ||
description: Add any other context or screenshots about the feature request here (optional) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,7 @@ package-lock.json | |
.history | ||
|
||
# Yarn | ||
yarn-error.log | ||
yarn-error.log | ||
|
||
# Larp | ||
.env |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" | ||
|
||
prompt_proceed() { | ||
read -p "Do you want to proceed? [Y/N] >>> " PROCEED | ||
if [ "$PROCEED" == "" ]; then | ||
prompt_proceed | ||
else | ||
if [[ "$PROCEED" != "Y" && "$PROCEED" != "y" ]]; then | ||
PROCEED="N" | ||
fi | ||
fi | ||
} | ||
|
||
validate_address() { | ||
if [[ ! "$1" =~ ^0x[a-fA-F0-9]{40}$ ]]; then | ||
return 1 | ||
fi | ||
return 0 | ||
} | ||
|
||
validate_decimals() { | ||
if [[ ! "$1" =~ ^[0-9]+$ ]] || [ "$1" -lt 1 ] || [ "$1" -gt 18 ]; then | ||
return 1 | ||
fi | ||
return 0 | ||
} | ||
|
||
add_token() { | ||
INPUT_PATH=$1 | ||
|
||
# Check if input file exists | ||
if [ ! -f "$INPUT_PATH" ]; then | ||
echo "Error: Input file $INPUT_PATH does not exist" | ||
exit 1 | ||
fi | ||
|
||
# Get chainId from existing tokens | ||
CHAIN_ID=$(jq -r '.[0].chainId' "$INPUT_PATH") | ||
if [ -z "$CHAIN_ID" ] || [ "$CHAIN_ID" = "null" ]; then | ||
echo "Error: Could not determine chainId from existing tokens" | ||
exit 1 | ||
fi | ||
|
||
# Prompt for token details | ||
while true; do | ||
read -p "Enter token address (0x...) >>> " ADDRESS | ||
if validate_address "$ADDRESS"; then | ||
# Check for duplicate address | ||
if jq -e --arg addr "$ADDRESS" '.[] | select(.address == $addr)' "$INPUT_PATH" > /dev/null; then | ||
echo "Error: Token with this address already exists" | ||
continue | ||
fi | ||
break | ||
else | ||
echo "Error: Invalid address format. Must be 0x followed by 40 hex characters" | ||
fi | ||
done | ||
|
||
while true; do | ||
read -p "Enter token symbol >>> " SYMBOL | ||
if [ -z "$SYMBOL" ]; then | ||
echo "Error: Symbol is required" | ||
continue | ||
fi | ||
# Check for duplicate symbol | ||
if jq -e --arg sym "$SYMBOL" '.[] | select(.symbol == $sym)' "$INPUT_PATH" > /dev/null; then | ||
echo "Error: Token with this symbol already exists" | ||
continue | ||
fi | ||
break | ||
done | ||
|
||
read -p "Enter token name (press Enter to use symbol) >>> " NAME | ||
NAME=${NAME:-$SYMBOL} | ||
|
||
while true; do | ||
read -p "Enter token decimals (1-18) >>> " DECIMALS | ||
if validate_decimals "$DECIMALS"; then | ||
break | ||
else | ||
echo "Error: Decimals must be a number between 1 and 18" | ||
fi | ||
done | ||
|
||
# Create new token JSON | ||
NEW_TOKEN=$(cat <<EOF | ||
{ | ||
"chainId": $CHAIN_ID, | ||
"address": "$ADDRESS", | ||
"symbol": "$SYMBOL", | ||
"name": "$NAME", | ||
"decimals": $DECIMALS | ||
} | ||
EOF | ||
) | ||
|
||
# Show confirmation | ||
echo | ||
echo "Review new token entry:" | ||
echo "$NEW_TOKEN" | jq . | ||
echo | ||
|
||
prompt_proceed | ||
if [[ "$PROCEED" == "Y" || "$PROCEED" == "y" ]]; then | ||
# Add new token to list | ||
jq --argjson newToken "$NEW_TOKEN" '. + [$newToken]' "$INPUT_PATH" > "${INPUT_PATH}.tmp" | ||
mv "${INPUT_PATH}.tmp" "$INPUT_PATH" | ||
echo "Token successfully added to $INPUT_PATH" | ||
else | ||
echo "Operation cancelled" | ||
exit 1 | ||
fi | ||
} | ||
|
||
# Check if jq is installed | ||
if ! command -v jq &> /dev/null; then | ||
echo "Error: jq is required but not installed." | ||
echo "Please install jq first:" | ||
echo " Ubuntu/Debian: sudo apt-get install jq" | ||
echo " MacOS: brew install jq" | ||
exit 1 | ||
fi | ||
|
||
echo | ||
echo | ||
echo "=============== ADD TOKEN TO LIST ===============" | ||
echo | ||
echo | ||
|
||
# Get input path | ||
read -p "Enter path to the token list file >>> " INPUT_PATH | ||
|
||
add_token "$INPUT_PATH" |
Oops, something went wrong.