Skip to content

Commit

Permalink
fix: filtered markets with 2 answers on Reality
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Sep 15, 2023
1 parent 2ecb648 commit 4959cda
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 20 deletions.
12 changes: 6 additions & 6 deletions packages/packages.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"dev": {
"skill/valory/market_manager_abci/0.1.0": "bafybeia3d2eri2fll6cu2ksg5riyhgn2i3ofn767sdj5xhwnfyidnaolpu",
"skill/valory/decision_maker_abci/0.1.0": "bafybeihyuoyu4dowmwf3ajkxgll5ysjvzfr6p27cxqqfdq7fvp2kwsq56y",
"skill/valory/trader_abci/0.1.0": "bafybeiaumqislfwbsswcpoid2pdq6psq5e77aihjhnmrn6ygx2k6dk2ehq",
"skill/valory/market_manager_abci/0.1.0": "bafybeiewxh5wcmmuzzlk2d2bcyyoilbawokcgc2elle3u33vjta5q3v53a",
"skill/valory/decision_maker_abci/0.1.0": "bafybeihgrzhstkblhfhf5an3k5luou7j3nndadwdrctex6g7l4vxdki2se",
"skill/valory/trader_abci/0.1.0": "bafybeib2lotl5mzyd5h4glmdkzlrnyqgbzynbibyw3e65nsdrgmlehhity",
"contract/valory/market_maker/0.1.0": "bafybeiftimqgvrbval2lxp7au6y72amioo4gtcdth2dflrbwa47i6opyb4",
"agent/valory/trader/0.1.0": "bafybeiefd67r3etu5xhgwxwjxsu2g6nfophralgvqldjbstlcwboy32gdi",
"service/valory/trader/0.1.0": "bafybeia66mugb3foqfh5gjrgjovgnyc4uvjiowkqrbikdekhs2veiszidi",
"agent/valory/trader/0.1.0": "bafybeialywy3upqhisoniv2w4aqgexdxtb7qwnh6rexnomisc5wknw564i",
"service/valory/trader/0.1.0": "bafybeifhemanhp4sjjqn6htt77qqf6ajcym7a667hndrgu4nts6lij7iq4",
"contract/valory/erc20/0.1.0": "bafybeifjwr6rwklgg2uk2zkfysn55qqy7dfi4jx7sek6lzdup37fynhpxe",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeicd7gho5rxde57tsjsu7puooxcogomrfd4fgfuoveos2l5lqtnnuu",
"skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeiexiryecvv7fe6veshnkqx6p3rahkir3klata2ynjo7vk7kosbeja",
"contract/valory/mech/0.1.0": "bafybeie753wdqks6k4x5fqlpo7tgll2avutjcaodpwlptqvzefsi5xbvai",
"contract/valory/realitio/0.1.0": "bafybeigb722aznqhc5lsbt3dn4bpyaqe5hnl5onmnestqmzliwtvl3eaom",
"contract/valory/realitio_proxy/0.1.0": "bafybeibvndq6756qck7forgeavhdbn6ykgqs2ufyg7n5g6qdfpveatxuwy",
Expand Down
8 changes: 4 additions & 4 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeifoihgilpfr76hc5skzspm6qehkwivx7ld2cy3veipcsi4gr2c7na
- valory/termination_abci:0.1.0:bafybeigcsls72uosoui2y5ppmnvsljjhnxakkeh3fdohklcg66aqq4g7xu
- valory/transaction_settlement_abci:0.1.0:bafybeiglsnh2hvfau5gab7requh34k4sbqwbjvrhhqjpes4hakcwq46cpi
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicd7gho5rxde57tsjsu7puooxcogomrfd4fgfuoveos2l5lqtnnuu
- valory/market_manager_abci:0.1.0:bafybeia3d2eri2fll6cu2ksg5riyhgn2i3ofn767sdj5xhwnfyidnaolpu
- valory/decision_maker_abci:0.1.0:bafybeihyuoyu4dowmwf3ajkxgll5ysjvzfr6p27cxqqfdq7fvp2kwsq56y
- valory/trader_abci:0.1.0:bafybeiaumqislfwbsswcpoid2pdq6psq5e77aihjhnmrn6ygx2k6dk2ehq
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiexiryecvv7fe6veshnkqx6p3rahkir3klata2ynjo7vk7kosbeja
- valory/market_manager_abci:0.1.0:bafybeiewxh5wcmmuzzlk2d2bcyyoilbawokcgc2elle3u33vjta5q3v53a
- valory/decision_maker_abci:0.1.0:bafybeihgrzhstkblhfhf5an3k5luou7j3nndadwdrctex6g7l4vxdki2se
- valory/trader_abci:0.1.0:bafybeib2lotl5mzyd5h4glmdkzlrnyqgbzynbibyw3e65nsdrgmlehhity
default_ledger: ethereum
required_ledgers:
- ethereum
Expand Down
2 changes: 1 addition & 1 deletion packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license: Apache-2.0
fingerprint:
README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq
fingerprint_ignore_patterns: []
agent: valory/trader:0.1.0:bafybeiefd67r3etu5xhgwxwjxsu2g6nfophralgvqldjbstlcwboy32gdi
agent: valory/trader:0.1.0:bafybeialywy3upqhisoniv2w4aqgexdxtb7qwnh6rexnomisc5wknw564i
number_of_agents: 4
deployment: {}
---
Expand Down
1 change: 1 addition & 0 deletions packages/valory/skills/decision_maker_abci/redeem_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class Question:

id: bytes
data: str
answers: List

def __post_init__(self) -> None:
"""Post initialization to adjust the values."""
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fingerprint:
handlers.py: bafybeihj33szgrcxnpd73s4nvluyxwwsvhjum2cuq3ilhhe6vfola3k7vy
models.py: bafybeibqou3ryuszu2vbwdp5b7fkj5oxmflgh3z3a7tuajbdxgzdolgmee
payloads.py: bafybeifbnyviargcj5w5kbuuvc3o4y5sdogtuynd2b4ca4xsfbi3cqcwlm
redeem_info.py: bafybeie3s7syjr5dfwg33l4663zhkeiokvpulenndwboiyv4imzxr4bdyy
redeem_info.py: bafybeic7de4hrsgjmxbjht5ihasm5t7bykuonei5xxhpf3lpzq35fuxy74
rounds.py: bafybeihpstybessozkb3hjxhf3gvf323zw4d575ihmxrsuzcyhqtbsruoq
states/__init__.py: bafybeid23llnyp6j257dluxmrnztugo5llsrog7kua53hllyktz4dqhqoy
states/base.py: bafybeif42mqu6wu55iyjyqxto3poyta22gdsswgtus55lo4qpmv74wvlmm
Expand All @@ -53,7 +53,7 @@ protocols:
- valory/contract_api:1.0.0:bafybeiasywsvax45qmugus5kxogejj66c5taen27h4voriodz7rgushtqa
skills:
- valory/abstract_round_abci:0.1.0:bafybeif3cqkks5qx3lqi6nwwhebcirhazt2vidw3sueeqsyxvjeszjt3om
- valory/market_manager_abci:0.1.0:bafybeia3d2eri2fll6cu2ksg5riyhgn2i3ofn767sdj5xhwnfyidnaolpu
- valory/market_manager_abci:0.1.0:bafybeiewxh5wcmmuzzlk2d2bcyyoilbawokcgc2elle3u33vjta5q3v53a
- valory/transaction_settlement_abci:0.1.0:bafybeiglsnh2hvfau5gab7requh34k4sbqwbjvrhhqjpes4hakcwq46cpi
behaviours:
main:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
orderBy: creationTimestamp
orderDirection: desc
first: 1000
){
id
title
Expand Down Expand Up @@ -67,6 +68,7 @@
}
orderBy: fpmm__creationTimestamp
orderDirection: asc
first: 1000
){
fpmm {
answerFinalizedTimestamp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ def _fetch_redeem_info(self) -> Generator[None, None, Optional[list]]:
res_context="trades",
)

return redeem_info
filtered_redeem_info = [
entry for entry in redeem_info if len(entry.get("fpmm", {}).get("question", {}).get("answers", [])) == 1
]

return filtered_redeem_info

def _fetch_block_number(
self, timestamp: int
Expand Down
4 changes: 2 additions & 2 deletions packages/valory/skills/market_manager_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fingerprint:
graph_tooling/__init__.py: bafybeigzo7nhbzafyq3fuhrlewksjvmzttiuk4vonrggtjtph4rw4ncpk4
graph_tooling/queries/__init__.py: bafybeihbybnl53i7k57ql5ujt5ru5n2eg324jfndh4lcnm4fk52mwbkjda
graph_tooling/queries/network.py: bafybeigeq72ys2nrjqspj2uacaudrgljrne5a3o5jvzsktldxdq6m2xmeu
graph_tooling/queries/omen.py: bafybeihfppuyr6pth3vpd7iuqzqt567j37fgyegubttp4v2wo6r2knwuwe
graph_tooling/requests.py: bafybeibaghhrjesca7dbjxyjct6jaak6ozpa4ltzd6c5sxbq5nlq22ulkq
graph_tooling/queries/omen.py: bafybeiajk65gvqkxvxekywqqy2kob3vobjsealqlyxis3z6mpwhyng7hh4
graph_tooling/requests.py: bafybeif6om3siuc54ridmqaz2x2nm7yvue7jcs6pgv5tuhhiwk3qjjegce
handlers.py: bafybeihot2i2yvfkz2gcowvt66wdu6tkjbmv7hsmc4jzt4reqeaiuphbtu
models.py: bafybeiaplszooak63fo3i6agaoyol4tpof4q4tvoj4j6f2cr2corajnl3a
payloads.py: bafybeiamavgddfbzofpsjthmw6j7g2dyxm7fb6hvdb47kweyrx4w2ihcfi
Expand Down
6 changes: 3 additions & 3 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeifoihgilpfr76hc5skzspm6qehkwivx7ld2cy3veipcsi4gr2c7na
- valory/transaction_settlement_abci:0.1.0:bafybeiglsnh2hvfau5gab7requh34k4sbqwbjvrhhqjpes4hakcwq46cpi
- valory/termination_abci:0.1.0:bafybeigcsls72uosoui2y5ppmnvsljjhnxakkeh3fdohklcg66aqq4g7xu
- valory/market_manager_abci:0.1.0:bafybeia3d2eri2fll6cu2ksg5riyhgn2i3ofn767sdj5xhwnfyidnaolpu
- valory/decision_maker_abci:0.1.0:bafybeihyuoyu4dowmwf3ajkxgll5ysjvzfr6p27cxqqfdq7fvp2kwsq56y
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeicd7gho5rxde57tsjsu7puooxcogomrfd4fgfuoveos2l5lqtnnuu
- valory/market_manager_abci:0.1.0:bafybeiewxh5wcmmuzzlk2d2bcyyoilbawokcgc2elle3u33vjta5q3v53a
- valory/decision_maker_abci:0.1.0:bafybeihgrzhstkblhfhf5an3k5luou7j3nndadwdrctex6g7l4vxdki2se
- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeiexiryecvv7fe6veshnkqx6p3rahkir3klata2ynjo7vk7kosbeja
behaviours:
main:
args: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ contracts: []
protocols: []
skills:
- valory/abstract_round_abci:0.1.0:bafybeif3cqkks5qx3lqi6nwwhebcirhazt2vidw3sueeqsyxvjeszjt3om
- valory/decision_maker_abci:0.1.0:bafybeihyuoyu4dowmwf3ajkxgll5ysjvzfr6p27cxqqfdq7fvp2kwsq56y
- valory/decision_maker_abci:0.1.0:bafybeihgrzhstkblhfhf5an3k5luou7j3nndadwdrctex6g7l4vxdki2se
behaviours:
main:
args: {}
Expand Down

0 comments on commit 4959cda

Please sign in to comment.