Skip to content

Commit

Permalink
Merge pull request #22 from valory-xyz/chore/update_version
Browse files Browse the repository at this point in the history
Update scripts
  • Loading branch information
DavidMinarsch authored Sep 16, 2023
2 parents 48c4a9e + e972e0f commit a5fc37a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion run_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions trades.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
QUERY_BATCH_SIZE = 1000
DUST_THRESHOLD = 10000000000000
INVALID_ANSWER = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FPMM_CREATOR = "0x89c5cc945dd550bcffb72fe42bff002429f46fec"

headers = {
"Accept": "application/json, multipart/mixed",
Expand All @@ -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
Expand Down Expand Up @@ -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.lower(),
first=QUERY_BATCH_SIZE,
skip=skip
)
content_json = _to_content(query)
res = requests.post(url, headers=headers, json=content_json)
Expand Down

0 comments on commit a5fc37a

Please sign in to comment.