Created
October 28, 2024 19:30
-
-
Save Umiiii/975d068c8b28fac9c311001549b4ebbf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
CONFIG_DIR="/root/cfg" | |
YOUR_ADDRESS="0x" | |
# Iterate through all directories under /root/cfg | |
for DIR in "$CONFIG_DIR"/*/; do | |
# Get directory name | |
CONFIG_PATH="$DIR/.config" | |
echo "Processing config: $CONFIG_PATH" | |
# Execute command 1 and parse $UTXO | |
echo "Executing token coins command for config: $CONFIG_PATH" | |
OUTPUT=$(./qclient --signature-check=false --config="$CONFIG_PATH" token coins 2>/dev/null) | |
UTXO=$(echo "$OUTPUT" | grep -oP 'Coin \K0x[0-9a-fA-F]+') | |
echo "Parsed UTXO: $UTXO" | |
if [ -z "$UTXO" ]; then | |
echo "UTXO not found for config $CONFIG_PATH" | |
continue | |
fi | |
# Construct signature string and execute command 2 to get $ownSignature | |
SIGNATURE_OWN="0x7472616e73666572$(echo "$UTXO" | sed 's/^0x//' | tr '[:upper:]' '[:lower:]')1ac3290d57e064bdb5a57e874b59290226a9f9730d69f1d963600883789d6ee2" | |
echo "Executing cross-mint command with SIGNATURE_OWN: $SIGNATURE_OWN" | |
OUTPUT_OWN=$(./qclient --signature-check=false --config="$CONFIG_PATH" cross-mint "$SIGNATURE_OWN" 2>/dev/null) | |
SEND_SIGNATURE=$(echo "$OUTPUT_OWN" | grep -oP '\{.*\}') | |
echo "Parsed SEND_SIGNATURE: $SEND_SIGNATURE" | |
# Construct signature string and execute command 2 to get $sendSignature | |
TARGET_ADDRESS=$YOUR_ADDRESS | |
SIGNATURE_SEND="0x63726f73732d6d696e74$(echo "$TARGET_ADDRESS" | sed 's/^0x//' | tr '[:upper:]' '[:lower:]')$(echo "$UTXO" | sed 's/^0x//' | tr '[:upper:]' '[:lower:]')" | |
echo "Executing cross-mint command with SIGNATURE_SEND: $SIGNATURE_SEND" | |
OUTPUT_SEND=$(./qclient --signature-check=false --config="$CONFIG_PATH" cross-mint "$SIGNATURE_SEND" 2>/dev/null) | |
OWN_SIGNATURE=$(echo "$OUTPUT_SEND" | grep -oP '\{.*\}') | |
echo "Parsed OWN_SIGNATURE: $OWN_SIGNATURE" | |
# Execute curl command | |
DATA_RAW="{\"send\":$SEND_SIGNATURE,\"own\":$OWN_SIGNATURE,\"wallet\":\"$YOUR_ADDRESS\",\"address\":\"$UTXO\"}" | |
echo "Data to be sent in curl: $DATA_RAW" | |
echo "Executing curl command with UTXO: $UTXO" | |
curl 'https://bridge-layer.quilibrium.com/bridge-send' \ | |
-H 'sec-ch-ua-platform: "Windows"' \ | |
-H 'Referer: https://quilibrium.com/' \ | |
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \ | |
-H 'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"' \ | |
-H 'Content-Type: application/json' \ | |
-H 'sec-ch-ua-mobile: ?0' \ | |
--data-raw "$DATA_RAW" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy the output, and paste into this python script to claim on Ethereum:
https://gist.github.com/Umiiii/20449447d0ba2389793c3d07fc7fbf2f