Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 14b2aba

Browse files
Merge pull request #4 from valory-xyz/v0.4.1
V0.4.1
2 parents fbc2a69 + e5d7bdf commit 14b2aba

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ chmod +x run_service.sh
2323
./run_service.sh
2424
```
2525

26+
Once the command has completed, i.e. the service is running, you can see the live logs with:
27+
28+
```bash
29+
docker logs trader_abci_0 --follow
30+
```
31+
32+
To stop your agent, use:
33+
34+
```bash
35+
cd trader; poetry run autonomy deploy stop --build-dir trader_service/abci_build; cd ..
36+
```
37+
2638
## Observe your agents
2739

2840
1. Check out this handy app: https://predictions.oaksprout.repl.co/

run_service.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fi
7777
directory="trader"
7878
# This is a tested version that works well.
7979
# Feel free to replace this with a different version of the repo, but be careful as there might be breaking changes
80-
service_version="v0.4.0"
80+
service_version="v0.4.1"
8181
service_repo=https://github.com/valory-xyz/$directory.git
8282
if [ -d $directory ]
8383
then
@@ -142,7 +142,7 @@ then
142142
agent_balance=0
143143
operator_balance=0
144144
suggested_amount=50000000000000000
145-
until [[ $agent_balance -gt $suggested_amount-1 && $operator_balance -gt $suggested_amount-1 ]]
145+
until [[ $(python -c "print($agent_balance > ($suggested_amount-1))") == "True" && $(python -c "print($operator_balance > ($suggested_amount-1))") == "True" ]];
146146
do
147147
echo "Agent instance's balance: $agent_balance WEI."
148148
echo "Operator's balance: $operator_balance WEI."
@@ -262,7 +262,7 @@ convert_hex_to_decimal() {
262262
suggested_amount=500000000000000000
263263
safe_balance_hex=$(get_balance)
264264
safe_balance=$(convert_hex_to_decimal $safe_balance_hex)
265-
while (( $safe_balance < $suggested_amount )); do
265+
while [ "$(python -c "print($safe_balance < $suggested_amount)")" == "True" ]; do
266266
echo "Safe's balance: $safe_balance WEI."
267267
echo "The safe address needs to be funded."
268268
echo "Please fund it with the amount you want to use for trading (at least 0.5 xDAI) to continue."
@@ -321,4 +321,4 @@ poetry run autonomy deploy build --n $n_agents -ltm
321321
cd ..
322322

323323
# Run the deployment
324-
poetry run autonomy deploy run --build-dir $directory
324+
poetry run autonomy deploy run --build-dir $directory --detach

0 commit comments

Comments
 (0)