From 57dab4f096c540fc371527045780c42a6298bed7 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 15 Sep 2023 20:11:21 +0200 Subject: [PATCH 1/2] chore: update scripts --- run_service.sh | 2 +- trades.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/run_service.sh b/run_service.sh index fdbe5b9..3aab164 100755 --- a/run_service.sh +++ b/run_service.sh @@ -193,7 +193,7 @@ fi directory="trader" # This is a tested version that works well. # Feel free to replace this with a different version of the repo, but be careful as there might be breaking changes -service_version="v0.6.0" +service_version="v0.6.0.post1" service_repo=https://github.com/valory-xyz/$directory.git if [ -d $directory ] then diff --git a/trades.py b/trades.py index 7a411bc..a6b5fed 100644 --- a/trades.py +++ b/trades.py @@ -32,6 +32,7 @@ QUERY_BATCH_SIZE = 1000 DUST_THRESHOLD = 10000000000000 INVALID_ANSWER = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FPMM_CREATOR = "0x89c5cc945dd550bcffb72fe42bff002429f46fec" headers = { "Accept": "application/json, multipart/mixed", @@ -43,7 +44,7 @@ """ { fpmmTrades( - where: {type: Buy, creator: "${creator}"} + where: {type: Buy, creator: "${creator}" fpmm_: {creator: "${fpmm_creator}"} } first: ${first} skip: ${skip} orderBy: creationTimestamp @@ -168,7 +169,10 @@ def _query_omen_xdai_subgraph() -> dict[str, Any]: skip = 0 while True: query = omen_xdai_trades_query.substitute( - creator=creator.lower(), first=QUERY_BATCH_SIZE, skip=skip + creator=creator.lower(), + fpmm_creator=FPMM_CREATOR, + first=QUERY_BATCH_SIZE, + skip=skip ) content_json = _to_content(query) res = requests.post(url, headers=headers, json=content_json) From e972e0f1d17923921e24489e9f435d5489e6e2c6 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 15 Sep 2023 20:33:45 +0200 Subject: [PATCH 2/2] fix: lowercase --- trades.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trades.py b/trades.py index a6b5fed..c9a06e4 100644 --- a/trades.py +++ b/trades.py @@ -170,7 +170,7 @@ def _query_omen_xdai_subgraph() -> dict[str, Any]: while True: query = omen_xdai_trades_query.substitute( creator=creator.lower(), - fpmm_creator=FPMM_CREATOR, + fpmm_creator=FPMM_CREATOR.lower(), first=QUERY_BATCH_SIZE, skip=skip )