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

Commit 9db1618

Browse files
authored
Merge pull request #274 from valory-xyz/develop
Release v0.14.3
2 parents 1af3242 + 67be72a commit 9db1618

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

run_service.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,6 @@ export CUSTOM_GNOSIS_SAFE_SAME_ADDRESS_MULTISIG_ADDRESS="0x6e7f594f680f7aBad18b7
604604
export CUSTOM_MULTISEND_ADDRESS="0x40A2aCCbd92BCA938b02010E17A5b8929b49130D"
605605
export WXDAI_ADDRESS="0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
606606
export MECH_CONTRACT_ADDRESS="0x77af31De935740567Cf4fF1986D04B2c964A786a"
607-
export MECH_WRAPPED_NATIVE_TOKEN_ADDRESS=$WXDAI_ADDRESS
608-
export DISABLE_TRADING=false
609-
export STOP_TRADING_IF_STAKING_KPI_MET=true
610-
export RESET_PAUSE_DURATION=120
611-
export MECH_CHAIN_ID=ethereum
612607

613608
# check if USE_NEVERMINED is set to true
614609
if [ "$USE_NEVERMINED" == "true" ];
@@ -1063,8 +1058,15 @@ export OMEN_CREATORS='["0x89c5cc945dd550BcFfb72Fe42BfF002429F46Fec"]'
10631058
# 10 cents minimum bet amount. Also, the bet will not be placed if expected returns - bet_threshold <= 0
10641059
export BET_THRESHOLD=100000000000000000
10651060
export TRADING_STRATEGY=kelly_criterion
1061+
export STRATEGIES_KWARGS='[["bet_kelly_fraction",1],["floor_balance",500000000000000000],["bet_amount_per_threshold",{"0.0":0,"0.1":0,"0.2":0,"0.3":0,"0.4":0,"0.5":0,"0.6":30000000000000000,"0.7":40000000000000000,"0.8":80000000000000000,"0.9":1000000000000000000,"1.0":1000000000000000000}]]'
10661062
export PROMPT_TEMPLATE="Please take over the role of a Data Scientist to evaluate the given question. With the given question \"@{question}\" and the \`yes\` option represented by \`@{yes}\` and the \`no\` option represented by \`@{no}\`, what are the respective probabilities of \`p_yes\` and \`p_no\` occurring?"
1067-
export IRRELEVANT_TOOLS='["claude-prediction-online","prediction-request-reasoning","prediction-online","prediction-offline","prediction-offline-sme","deepmind-optimization", "deepmind-optimization-strong", "openai-gpt-3.5-turbo", "openai-gpt-3.5-turbo-instruct", "openai-gpt-4", "openai-text-davinci-002", "openai-text-davinci-003", "prediction-online-sum-url-content", "prediction-online-summarized-info", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1", "stabilityai-stable-diffusion-v1-5", "stabilityai-stable-diffusion-xl-beta-v2-2-2"]'
1063+
export IRRELEVANT_TOOLS='["prediction-request-rag","prediction-request-reasoning-claude","prediction-url-cot-claude","claude-prediction-offline","claude-prediction-online","prediction-offline-sme","deepmind-optimization", "deepmind-optimization-strong", "openai-gpt-3.5-turbo", "openai-gpt-3.5-turbo-instruct", "openai-gpt-4", "openai-text-davinci-002", "openai-text-davinci-003", "prediction-online-sum-url-content", "prediction-online-summarized-info", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1", "stabilityai-stable-diffusion-v1-5", "stabilityai-stable-diffusion-xl-beta-v2-2-2"]'
1064+
export STAKING_CONTRACT_ADDRESS=$CUSTOM_STAKING_ADDRESS
1065+
export DISABLE_TRADING=false
1066+
export STOP_TRADING_IF_STAKING_KPI_MET=true
1067+
export RESET_PAUSE_DURATION=120
1068+
export MECH_WRAPPED_NATIVE_TOKEN_ADDRESS=$WXDAI_ADDRESS
1069+
export MECH_CHAIN_ID=ethereum
10681070

10691071
service_dir="trader_service"
10701072
build_dir="abci_build"

scripts/mech_events.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import json
2424
import os
25+
import sys
2526
import time
2627
from dataclasses import dataclass
2728
from pathlib import Path
@@ -166,6 +167,12 @@ def _read_mech_events_data_from_file() -> Dict[str, Any]:
166167
except FileNotFoundError:
167168
mech_events_data = {}
168169
mech_events_data["db_version"] = MECH_EVENTS_DB_VERSION
170+
except json.decoder.JSONDecodeError:
171+
print(
172+
f'\nERROR: The local Mech events database "{MECH_EVENTS_JSON_PATH.resolve()}" is corrupted. Please try delete or rename the file, and run the script again.'
173+
)
174+
sys.exit(1)
175+
169176
return mech_events_data
170177

171178

@@ -302,7 +309,7 @@ def get_mech_requests(
302309
all_mech_events = _get_mech_events(sender, MechRequest)
303310
filtered_mech_events = {}
304311
for event_id, event_data in all_mech_events.items():
305-
block_timestamp = event_data["block_timestamp"]
312+
block_timestamp = int(event_data["block_timestamp"])
306313
if from_timestamp <= block_timestamp <= to_timestamp:
307314
filtered_mech_events[event_id] = event_data
308315

0 commit comments

Comments
 (0)