-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcreatePool.sh
More file actions
executable file
·42 lines (37 loc) · 1.23 KB
/
Copy pathcreatePool.sh
File metadata and controls
executable file
·42 lines (37 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Define the pool data in JSON format
POOL_DATA=$(cat <<EOF
{
"pool_data": [
{
"balance": "100000000n",
"image": "https://coin-images.coingecko.com/coins/images/33818/large/01_ckBTC_Token_HEX__4x.png?1703046026",
"ledger_canister_id": "Principal({_arr: Uint8Array(10), _isPrincipal: true})",
"token_name": "ckbtc",
"value": "93741n",
"weight": "50n"
},
{
"balance": "2738106713n",
"image": "https://coin-images.coingecko.com/coins/images/33819/large/01_ckETH_Token_HEX__4x.png?1703046389",
"ledger_canister_id": "Principal({_arr: Uint8Array(10), _isPrincipal: true})",
"token_name": "cketh",
"value": "93741n",
"weight": "50n"
}
],
"swap_fee": 30
}
EOF
)
# Print the data to verify
echo "Pool Data: $POOL_DATA"
# Replace `your_command_here` with the actual function or API call
# Example: Using `curl` to make a POST request to an API
API_ENDPOINT="http://localhost:3000/valueswap/pool/create-pool/steps" # Replace with your actual endpoint
# Make the API call
curl -X POST "$API_ENDPOINT" \
-H "Content-Type: application/json" \
-d "$POOL_DATA"
# Or if you're calling a local CLI tool
# echo "$POOL_DATA" | your_cli_tool create_pool