From 4990927a6b9a5f2bd8247eb016c69c67d8f57a70 Mon Sep 17 00:00:00 2001 From: Ardian Date: Thu, 21 Dec 2023 21:19:23 +0100 Subject: [PATCH] chore: lint --- packages/packages.json | 10 +- .../agents/market_maker/aea-config.yaml | 6 +- packages/valory/contracts/realtio/contract.py | 2 +- .../valory/contracts/realtio/contract.yaml | 2 +- .../valory/services/market_maker/service.yaml | 2 +- .../behaviours.py | 103 +++++++++++------- .../fsm_specification.yaml | 8 +- .../market_creation_manager_abci/prompts.py | 10 +- .../market_creation_manager_abci/rounds.py | 6 +- .../market_creation_manager_abci/skill.yaml | 10 +- .../market_maker_abci/fsm_specification.yaml | 8 +- .../skills/market_maker_abci/skill.yaml | 4 +- 12 files changed, 102 insertions(+), 69 deletions(-) diff --git a/packages/packages.json b/packages/packages.json index 05340fb..9079eff 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -2,11 +2,11 @@ "dev": { "contract/valory/conditional_tokens/0.1.0": "bafybeifbhritgoqecuilj35uzrrokm2ngfmwkoafbmzxgvpa4q3wpi6i64", "contract/valory/fpmm_deterministic_factory/0.1.0": "bafybeih5yb4df6plwsxicp4jtywvpqmjnvfw55zw35yuycwxrx7mehoowy", - "contract/valory/realtio/0.1.0": "bafybeib54zmyanceeqy4336xc5ttxyo5t3jnbdn4evfazjzded2wuwxqeq", - "skill/valory/market_creation_manager_abci/0.1.0": "bafybeiaonlf7blpoxovwl6fjatnve37dqxppmgfrveknuedvkbskwa7ite", - "skill/valory/market_maker_abci/0.1.0": "bafybeibc24foti7z52qqrw7ttnbnssnwtnsl6ziyx6succdqee2avx2zci", - "agent/valory/market_maker/0.1.0": "bafybeifjke4ee6umxrogyncoqul2gyl2s6t65qan5g2kqeop44r6tt2e3i", - "service/valory/market_maker/0.1.0": "bafybeihepsg5z7y5fkidl4yfzdbxjckoffridm4wt7klr6mx5x74kxcvia", + "contract/valory/realtio/0.1.0": "bafybeihtclasbb447mr4qospsmw6lmfzplomusxxjzrobakca4svusrpze", + "skill/valory/market_creation_manager_abci/0.1.0": "bafybeiee4janebu34kde25urs7bwehrg6docvbrz47rj3cjqdxtoj2wboe", + "skill/valory/market_maker_abci/0.1.0": "bafybeigxg3yts6s47nzbe7aaskxuchtxm3nhz5iwx2mlykxklrlwhwbbwu", + "agent/valory/market_maker/0.1.0": "bafybeibkgs5gbyr4a37xetrdbgn6fsfza2y7xhstdifwjesehvrwcfkkdu", + "service/valory/market_maker/0.1.0": "bafybeidk4e7yh7easbjuvqkmylwkyiz3y6qdo66pt6cyhkhf63sy75ifte", "contract/valory/wxdai/0.1.0": "bafybeidalocwbhmbto6ii6adldtpcughtdt6j3v4tv36utevjk2wrdyqie", "contract/valory/fpmm/0.1.0": "bafybeiai2ruj27nnglvn7yc5atojyojo3fkmofw6wrjgz2ybps2uwdizx4" }, diff --git a/packages/valory/agents/market_maker/aea-config.yaml b/packages/valory/agents/market_maker/aea-config.yaml index 0ae80d6..c8a50b2 100644 --- a/packages/valory/agents/market_maker/aea-config.yaml +++ b/packages/valory/agents/market_maker/aea-config.yaml @@ -18,7 +18,7 @@ contracts: - valory/gnosis_safe:0.1.0:bafybeidll7frtdsq2ckiluazkwk4zpkp7natt4kdejjehwvykqwzyuf6ei - valory/gnosis_safe_proxy_factory:0.1.0:bafybeidvcgnbbmjtha6tl7st2ysna2l3iiqfhnzjfasyvml5unecozeeka - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y -- valory/realtio:0.1.0:bafybeib54zmyanceeqy4336xc5ttxyo5t3jnbdn4evfazjzded2wuwxqeq +- valory/realtio:0.1.0:bafybeihtclasbb447mr4qospsmw6lmfzplomusxxjzrobakca4svusrpze - valory/conditional_tokens:0.1.0:bafybeifbhritgoqecuilj35uzrrokm2ngfmwkoafbmzxgvpa4q3wpi6i64 - valory/fpmm_deterministic_factory:0.1.0:bafybeih5yb4df6plwsxicp4jtywvpqmjnvfw55zw35yuycwxrx7mehoowy - valory/service_registry:0.1.0:bafybeia2swgpmczn3iykmptigabklk2eqbqxzhmbnunq3givmjygvmgtbm @@ -37,9 +37,9 @@ protocols: skills: - valory/abstract_abci:0.1.0:bafybeiflcfufixmsrhobf56bn5745m2iipcfqyulwk2qegtnagb3kvaaxi - valory/abstract_round_abci:0.1.0:bafybeiaqcl7h2famylusiffigwem7tevkcsyocdu5xd42jkmgq6kvowzgq -- valory/market_maker_abci:0.1.0:bafybeibc24foti7z52qqrw7ttnbnssnwtnsl6ziyx6succdqee2avx2zci +- valory/market_maker_abci:0.1.0:bafybeigxg3yts6s47nzbe7aaskxuchtxm3nhz5iwx2mlykxklrlwhwbbwu - valory/registration_abci:0.1.0:bafybeic2ynseiak7jpta7jfwuqwyp453b4p7lolr4wihxmpn633uekv5am -- valory/market_creation_manager_abci:0.1.0:bafybeiaonlf7blpoxovwl6fjatnve37dqxppmgfrveknuedvkbskwa7ite +- valory/market_creation_manager_abci:0.1.0:bafybeiee4janebu34kde25urs7bwehrg6docvbrz47rj3cjqdxtoj2wboe - valory/reset_pause_abci:0.1.0:bafybeidzajbe3erygeh2xbd6lrjv7nsptznjuzrt24ykgvhgotdeyhfnba - valory/termination_abci:0.1.0:bafybeie4zvjfxvdu7qrulmur3chpjz3kpj5m4bjsxvpk4gvj5zbyyayfaa - valory/transaction_settlement_abci:0.1.0:bafybeiaefgqbs7zsn5xe5kdwrujj7ivygkn3ujpw6crnvi3knvxw75qmja diff --git a/packages/valory/contracts/realtio/contract.py b/packages/valory/contracts/realtio/contract.py index 12d5b22..1c0ffc0 100644 --- a/packages/valory/contracts/realtio/contract.py +++ b/packages/valory/contracts/realtio/contract.py @@ -251,6 +251,6 @@ def get_submit_answer_tx( question_id, answer, max_previous, - ] + ], ) return dict(data=data) diff --git a/packages/valory/contracts/realtio/contract.yaml b/packages/valory/contracts/realtio/contract.yaml index c43ef7a..8272ec3 100644 --- a/packages/valory/contracts/realtio/contract.yaml +++ b/packages/valory/contracts/realtio/contract.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeieeus2bbbexmthy4pnsdtgen4flxzk3ao5ekjbocvmrkhhszffbgu build/Realtio.json: bafybeifhuqnulohagjvlzvwis3uj3wgq4jdfugdtjeam5ic2m6eln4ldba - contract.py: bafybeiag2ykw75qvboddy5avmt6ph35hrrddom5pj7ayfzr5owcq7yrj24 + contract.py: bafybeiaweooggdd3ii5maa3ovlcjuc6wy2lmjxaia4pcubuflq3rghgzpi fingerprint_ignore_patterns: [] class_name: RealtioContract contract_interface_paths: diff --git a/packages/valory/services/market_maker/service.yaml b/packages/valory/services/market_maker/service.yaml index 2b6675c..7fd1e0f 100644 --- a/packages/valory/services/market_maker/service.yaml +++ b/packages/valory/services/market_maker/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeibwz3af6326msp4h3kqehijvmyhaytvyfbo3o2npc2w4b6zrg6pfq fingerprint_ignore_patterns: [] -agent: valory/market_maker:0.1.0:bafybeifjke4ee6umxrogyncoqul2gyl2s6t65qan5g2kqeop44r6tt2e3i +agent: valory/market_maker:0.1.0:bafybeibkgs5gbyr4a37xetrdbgn6fsfza2y7xhstdifwjesehvrwcfkkdu number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/market_creation_manager_abci/behaviours.py b/packages/valory/skills/market_creation_manager_abci/behaviours.py index b38c2fb..8ca9922 100644 --- a/packages/valory/skills/market_creation_manager_abci/behaviours.py +++ b/packages/valory/skills/market_creation_manager_abci/behaviours.py @@ -83,15 +83,20 @@ ) from packages.valory.skills.market_creation_manager_abci.payloads import ( ApproveMarketsPayload, + CloseMarketsPayload, CollectProposedMarketsPayload, DepositDaiPayload, PostTxPayload, RemoveFundingPayload, - SyncMarketsPayload, CloseMarketsPayload, + SyncMarketsPayload, +) +from packages.valory.skills.market_creation_manager_abci.prompts import ( + OUTCOME_PROMPT_TEMPLATE, + URL_QUERY_PROMPT_TEMPLATE, ) -from packages.valory.skills.market_creation_manager_abci.prompts import URL_QUERY_PROMPT_TEMPLATE, OUTCOME_PROMPT_TEMPLATE from packages.valory.skills.market_creation_manager_abci.rounds import ( ApproveMarketsRound, + CloseMarketsRound, CollectProposedMarketsRound, CollectRandomnessPayload, CollectRandomnessRound, @@ -110,7 +115,7 @@ SelectKeeperPayload, SelectKeeperRound, SyncMarketsRound, - SynchronizedData, CloseMarketsRound, + SynchronizedData, ) from packages.valory.skills.transaction_settlement_abci.payload_tools import ( hash_payload_to_hex, @@ -129,17 +134,15 @@ "%Y-%m-%d", ) - _ONE_DAY = 86400 ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" ZERO_HASH = "0x0000000000000000000000000000000000000000000000000000000000000000" ANSWER_NO, ANSWER_YES = ( - '0x0000000000000000000000000000000000000000000000000000000000000000', - '0x0000000000000000000000000000000000000000000000000000000000000001', + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000001", ) - FPMM_POOL_MEMBERSHIPS_QUERY = Template( """ { fpmmPoolMemberships( @@ -196,7 +199,7 @@ where: { creator: "$creator" openingTimestamp_lt: $current_timestamp - answerFinalizedTimestamp: null + answerFinalizedTimestamp: null currentAnswerBond: null } first: 100 @@ -209,7 +212,7 @@ creationTimestamp currentAnswer id - answerFinalizedTimestamp + answerFinalizedTimestamp openingTimestamp question { id @@ -222,12 +225,13 @@ }""" ) -TOP_HEADLINES = 'top-headlines' -EVERYTHING = 'everything' +TOP_HEADLINES = "top-headlines" +EVERYTHING = "everything" ARTICLE_LIMIT = 1_000 ADDITIONAL_INFO_LIMIT = 5_000 + def to_content(query: str) -> bytes: """Convert the given query string to payload content, i.e., add it under a `queries` key and convert it to bytes.""" finalized_query = {"query": query} @@ -1378,7 +1382,7 @@ def _gather_data(self) -> Generator[None, None, str]: "pageSize": "100", } # only get articles from top headlines - url = f'{self.params.newsapi_endpoint}/{TOP_HEADLINES}' + url = f"{self.params.newsapi_endpoint}/{TOP_HEADLINES}" response = yield from self.get_http_response( method="GET", url=url, @@ -2090,14 +2094,18 @@ def _get_unanswered_questions( return [] return response.get("data", {}).get("fixedProductMarketMakers", []) - def _parse_llm_output(self, output: str, required_fields: Optional[List[str]] = None) -> Optional[Dict[str, Any]]: + def _parse_llm_output( + self, output: str, required_fields: Optional[List[str]] = None + ) -> Optional[Dict[str, Any]]: """Parse the llm output to json.""" try: json_data = json.loads(output) if required_fields is not None: for field in required_fields: if field not in json_data: - self.context.logger.error(f"Field {field} not in json_data {json_data}") + self.context.logger.error( + f"Field {field} not in json_data {json_data}" + ) return None return json_data except json.JSONDecodeError as e: @@ -2128,9 +2136,9 @@ def _get_answer(self, question: str) -> Generator[None, None, Optional[str]]: llm_response_message = yield from self.do_llm_request( request_llm_message, llm_dialogue ) - result = llm_response_message.value.replace("OUTPUT:", "").rstrip().lstrip() - self.context.logger.info(f"Got LLM response: {result}") - result = self._parse_llm_output(result, required_fields=["queries"]) + result_str = llm_response_message.value.replace("OUTPUT:", "").rstrip().lstrip() + self.context.logger.info(f"Got LLM response: {result_str}") + result = self._parse_llm_output(result_str, required_fields=["queries"]) if result is None: self.context.logger.info(f"Could not parse LLM response: {result}") return None @@ -2145,7 +2153,9 @@ def _get_answer(self, question: str) -> Generator[None, None, Optional[str]]: for query in queries: news_articles = yield from self._get_news(query) if news_articles is None: - self.context.logger.info(f"Could not get news articles for query {query}") + self.context.logger.info( + f"Could not get news articles for query {query}" + ) continue for article in news_articles: title = article["title"] @@ -2175,20 +2185,22 @@ def _get_answer(self, question: str) -> Generator[None, None, Optional[str]]: llm_response_message = yield from self.do_llm_request( request_llm_message, llm_dialogue ) - result = llm_response_message.value.replace("OUTPUT:", "").rstrip().lstrip() - json_data = self._parse_llm_output(result, required_fields=["has_occurred"]) + result_str = llm_response_message.value.replace("OUTPUT:", "").rstrip().lstrip() + json_data = self._parse_llm_output(result_str, required_fields=["has_occurred"]) if json_data is None: self.context.logger.info(f"Could not parse LLM response: {result}") return None has_occurred = bool(json_data["has_occurred"]) - self.context.logger.info(f'Has "{question}" occurred?: {has_occurred}') + self.context.logger.info(f'Has "{question!r}" occurred?: {has_occurred}') if has_occurred: return ANSWER_YES return ANSWER_NO - def _get_news(self, query: str) -> Generator[None, None, Optional[List[Dict[str, Any]]]]: + def _get_news( + self, query: str + ) -> Generator[None, None, Optional[List[Dict[str, Any]]]]: """Auxiliary method to collect data from endpoint.""" headers = {"X-Api-Key": self.params.newsapi_api_key} @@ -2197,7 +2209,7 @@ def _get_news(self, query: str) -> Generator[None, None, Optional[List[Dict[str, "pageSize": "100", } # search through all articles everything - url = f'{self.params.newsapi_endpoint}/{EVERYTHING}' + url = f"{self.params.newsapi_endpoint}/{EVERYTHING}" response = yield from self.get_http_response( method="GET", url=url, @@ -2217,22 +2229,24 @@ def _get_news(self, query: str) -> Generator[None, None, Optional[List[Dict[str, ) return response_data["articles"] - def _get_answer_tx(self, question_id: str, answer: str) -> Generator[None, None, Optional[Dict[str, Any]]]: + def _get_answer_tx( + self, question_id: str, answer: str + ) -> Generator[None, None, Optional[Dict[str, Any]]]: """Get an answer a tx.""" response = yield from self.get_contract_api_response( - performative=ContractApiMessage.Performative.GET_STATE, # type: ignore - contract_address=self.params.realitio_contract, - contract_id=str(RealtioContract.contract_id), - contract_callable="get_submit_answer_tx", - question_id=bytes.fromhex(question_id[2:]), - answer=bytes.fromhex(answer[2:]), - max_previous=MAX_PREVIOUS, - ) + performative=ContractApiMessage.Performative.GET_STATE, # type: ignore + contract_address=self.params.realitio_contract, + contract_id=str(RealtioContract.contract_id), + contract_callable="get_submit_answer_tx", + question_id=bytes.fromhex(question_id[2:]), + answer=bytes.fromhex(answer[2:]), + max_previous=MAX_PREVIOUS, + ) if response.performative != ContractApiMessage.Performative.STATE: self.context.logger.error( - f"Couldn't get submitAnswer transaction. " - f"Expected response performative {ContractApiMessage.Performative.STATE.value}, " # type: ignore - f"received {response.performative.value}." + f"Couldn't get submitAnswer transaction. " + f"Expected response performative {ContractApiMessage.Performative.STATE.value}, " # type: ignore + f"received {response.performative.value}." ) return None @@ -2256,8 +2270,7 @@ def get_payload(self) -> Generator[None, None, str]: return CloseMarketsRound.NO_TX self.context.logger.info( - f"Got {len(questions)} questions to close. " - f"Questions: {questions}" + f"Got {len(questions)} questions to close. " f"Questions: {questions}" ) # get the answers for those questions @@ -2265,14 +2278,18 @@ def get_payload(self) -> Generator[None, None, str]: for question in questions: answer = yield from self._get_answer(question["title"]) if answer is None: - self.context.logger.warning(f"Couldn't get answer for question {question}") + self.context.logger.warning( + f"Couldn't get answer for question {question}" + ) continue question_to_answer[question["question"]["id"]] = answer if len(question_to_answer) == self.params.num_questions_to_close: break - self.context.logger.info(f"Got answers for {len(question_to_answer)} questions. ") + self.context.logger.info( + f"Got answers for {len(question_to_answer)} questions. " + ) if len(question_to_answer) == 0: # we couldn't get any answers, no tx to be made return CloseMarketsRound.NO_TX @@ -2283,13 +2300,17 @@ def get_payload(self) -> Generator[None, None, str]: tx = yield from self._get_answer_tx(question_id, answer) if tx is None: # something went wrong, skip the current tx - self.context.logger.warning(f"Couldn't get tx for question {question_id} with answer {answer}") + self.context.logger.warning( + f"Couldn't get tx for question {question_id} with answer {answer}" + ) continue txs.append(tx) if len(txs) == 0: # something went wrong, respond with ERROR payload for now - self.context.logger.error("Couldn't get any txs for questions that we have answers for.") + self.context.logger.error( + "Couldn't get any txs for questions that we have answers for." + ) return CloseMarketsRound.ERROR_PAYLOAD multisend_tx_str = yield from self._to_multisend(txs) diff --git a/packages/valory/skills/market_creation_manager_abci/fsm_specification.yaml b/packages/valory/skills/market_creation_manager_abci/fsm_specification.yaml index ade5a15..b8f6158 100644 --- a/packages/valory/skills/market_creation_manager_abci/fsm_specification.yaml +++ b/packages/valory/skills/market_creation_manager_abci/fsm_specification.yaml @@ -24,6 +24,7 @@ start_states: - PostTransactionRound states: - ApproveMarketsRound +- CloseMarketsRound - CollectProposedMarketsRound - CollectRandomnessRound - DataGatheringRound @@ -44,6 +45,11 @@ transition_func: (ApproveMarketsRound, ERROR): DataGatheringRound (ApproveMarketsRound, MAX_RETRIES_REACHED): DataGatheringRound (ApproveMarketsRound, ROUND_TIMEOUT): DataGatheringRound + (CloseMarketsRound, DONE): FinishedMarketCreationManagerRound + (CloseMarketsRound, ERROR): CollectRandomnessRound + (CloseMarketsRound, NO_MAJORITY): CollectRandomnessRound + (CloseMarketsRound, NO_TX): CollectRandomnessRound + (CloseMarketsRound, ROUND_TIMEOUT): CloseMarketsRound (CollectProposedMarketsRound, DONE): ApproveMarketsRound (CollectProposedMarketsRound, ERROR): DataGatheringRound (CollectProposedMarketsRound, MAX_APPROVED_MARKETS_REACHED): DataGatheringRound @@ -70,7 +76,7 @@ transition_func: (MarketProposalRound, ERROR): RetrieveApprovedMarketRound (MarketProposalRound, MARKET_PROPOSAL_ROUND_TIMEOUT): RetrieveApprovedMarketRound (MarketProposalRound, NO_MAJORITY): RetrieveApprovedMarketRound - (PostTransactionRound, DONE): CollectRandomnessRound + (PostTransactionRound, DONE): CloseMarketsRound (PostTransactionRound, ERROR): PostTransactionRound (PostTransactionRound, NO_MAJORITY): PostTransactionRound (PrepareTransactionRound, DONE): FinishedMarketCreationManagerRound diff --git a/packages/valory/skills/market_creation_manager_abci/prompts.py b/packages/valory/skills/market_creation_manager_abci/prompts.py index 0b04493..99ed53b 100644 --- a/packages/valory/skills/market_creation_manager_abci/prompts.py +++ b/packages/valory/skills/market_creation_manager_abci/prompts.py @@ -40,8 +40,8 @@ OUTPUT_FORMAT * Your output response must be only a single JSON object to be parsed by Python's "json.loads()". * The JSON must contain two fields: "queries", and "urls". - - "queries": An array of strings of size between 1 and 5. Each string must be a search engine query that can help - obtain relevant information to check that the event in "USER_PROMPT" occurs. + - "queries": An array of strings of size between 1 and 5. Each string must be a search engine query that can help + obtain relevant information to check that the event in "USER_PROMPT" occurs. You must provide original information in each query, and they should not overlap. or lead to obtain the same set of results. * Output only the JSON object. Do not include any other contents in your response. @@ -55,7 +55,7 @@ INSTRUCTIONS * Read the input under the label "USER_PROMPT" delimited by three backticks. * The "USER_PROMPT" specifies an event. -* The "USER_PROMPT" will contain a date which in the past. +* The "USER_PROMPT" will contain a date which in the past. * The event will only have two possible outcomes: either the event has happened or the event has not happened. * If the event has more than two possible outcomes, you must ignore the rest of the instructions and output the response "Error". * You must provide a decision whether the event in "USER_PROMPT" has occurred or not. @@ -77,7 +77,7 @@ OUTPUT_FORMAT * Your output response must be only a single JSON object to be parsed by Python's "json.loads()". -* The JSON must contain one field: "has_occurred". When the event in "USER_PROMPT" has occurred, the value of +* The JSON must contain one field: "has_occurred". When the event in "USER_PROMPT" has occurred, the value of "has_occurred" must be true if it has occurred, and false if it has not. * Output only the JSON object. Do not include any other contents in your response. -""" \ No newline at end of file +""" diff --git a/packages/valory/skills/market_creation_manager_abci/rounds.py b/packages/valory/skills/market_creation_manager_abci/rounds.py index f64d7cf..18367a1 100644 --- a/packages/valory/skills/market_creation_manager_abci/rounds.py +++ b/packages/valory/skills/market_creation_manager_abci/rounds.py @@ -36,6 +36,7 @@ ) from packages.valory.skills.market_creation_manager_abci.payloads import ( ApproveMarketsPayload, + CloseMarketsPayload, CollectProposedMarketsPayload, CollectRandomnessPayload, DataGatheringPayload, @@ -46,7 +47,7 @@ RemoveFundingPayload, RetrieveApprovedMarketPayload, SelectKeeperPayload, - SyncMarketsPayload, CloseMarketsPayload, + SyncMarketsPayload, ) from packages.valory.skills.transaction_settlement_abci.rounds import ( SynchronizedData as TxSynchronizedData, @@ -668,7 +669,6 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: return None - class CloseMarketsRound(CollectSameUntilThresholdRound): """CloseMarketsRound""" @@ -694,7 +694,7 @@ def end_block(self) -> Optional[Tuple[BaseSynchronizedData, Enum]]: get_name( SynchronizedData.most_voted_tx_hash ): self.most_voted_payload, - } + }, ) return state, Event.DONE if not self.is_majority_possible( diff --git a/packages/valory/skills/market_creation_manager_abci/skill.yaml b/packages/valory/skills/market_creation_manager_abci/skill.yaml index 8760906..1ea595a 100644 --- a/packages/valory/skills/market_creation_manager_abci/skill.yaml +++ b/packages/valory/skills/market_creation_manager_abci/skill.yaml @@ -10,14 +10,14 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: .gitignore: bafybeihdfdezgtr3s2lzq5y3oaitfrdy4u4pehionju2bdez35wcjgqx6y __init__.py: bafybeibkyjt4covc4yhd22aw7kav45zozk3exdv344emt3lilln64soaxm - behaviours.py: bafybeigvwfxayyl4cgo4pfq6qfiwu35oiibarharn4a7b56gnhlv5wt4ua + behaviours.py: bafybeidnlhb7z7tg26fp66pfvcpwbboz3cub2dzjxqekgr3mzy2rl6mbtq dialogues.py: bafybeicmaufkl7vdomnfciv7lw4536ssld7x4uemdapuhsyvfpd4ncibza - fsm_specification.yaml: bafybeihbesgz2dosveibkqxryyimdrxipbfjgoohg2xefipgkwb5uftq24 + fsm_specification.yaml: bafybeiglegr5e55k3kra4movl5klfoqc6c2lm4cbh3fzicilwq6lhmnmxa handlers.py: bafybeietxjfli2i57kb7heoy772rcq2znusl36gg7jjj5g3pddw7egny3q models.py: bafybeic2aara424fcojfrwhzpwukyzvp5hi2wd3balgjunn3w5jcfg4gou payloads.py: bafybeib5nbork6jlowjwovjhfooddcks63ylqziz2sp6u6frmztx5nxtai - prompts.py: bafybeifub6vvxemlhmjin44wcy2mybnltyeypuydntjq2ioihxq4uancdu - rounds.py: bafybeidqrsjnluqvf7mhpslifgablrtgpqnh2k3hktbx33ky7fm4t4xbli + prompts.py: bafybeia6ifucknu7qf7culhuey46n572ca3dr636vlm72ha36oilejiyrq + rounds.py: bafybeifwhp24f4bfueurlxjwhkbsjhagx4pir4gxb6ldhaqkj2fgzyn56e tests/__init__.py: bafybeihfxvqnyfly72tbxnnnglshcilm2kanihqnjiasvcz3ec3csw32ti fingerprint_ignore_patterns: [] connections: @@ -25,7 +25,7 @@ connections: contracts: - valory/gnosis_safe:0.1.0:bafybeidll7frtdsq2ckiluazkwk4zpkp7natt4kdejjehwvykqwzyuf6ei - valory/multisend:0.1.0:bafybeig5byt5urg2d2bsecufxe5ql7f4mezg3mekfleeh32nmuusx66p4y -- valory/realtio:0.1.0:bafybeib54zmyanceeqy4336xc5ttxyo5t3jnbdn4evfazjzded2wuwxqeq +- valory/realtio:0.1.0:bafybeihtclasbb447mr4qospsmw6lmfzplomusxxjzrobakca4svusrpze - valory/conditional_tokens:0.1.0:bafybeifbhritgoqecuilj35uzrrokm2ngfmwkoafbmzxgvpa4q3wpi6i64 - valory/fpmm_deterministic_factory:0.1.0:bafybeih5yb4df6plwsxicp4jtywvpqmjnvfw55zw35yuycwxrx7mehoowy - valory/wxdai:0.1.0:bafybeidalocwbhmbto6ii6adldtpcughtdt6j3v4tv36utevjk2wrdyqie diff --git a/packages/valory/skills/market_maker_abci/fsm_specification.yaml b/packages/valory/skills/market_maker_abci/fsm_specification.yaml index f921237..e382809 100644 --- a/packages/valory/skills/market_maker_abci/fsm_specification.yaml +++ b/packages/valory/skills/market_maker_abci/fsm_specification.yaml @@ -35,6 +35,7 @@ states: - ApproveMarketsRound - CheckLateTxHashesRound - CheckTransactionHistoryRound +- CloseMarketsRound - CollectProposedMarketsRound - CollectRandomnessRound - CollectSignatureRound @@ -75,6 +76,11 @@ transition_func: (CheckTransactionHistoryRound, NEGATIVE): SelectKeeperTransactionSubmissionBRound (CheckTransactionHistoryRound, NONE): ResetAndPauseRound (CheckTransactionHistoryRound, NO_MAJORITY): CheckTransactionHistoryRound + (CloseMarketsRound, DONE): RandomnessTransactionSubmissionRound + (CloseMarketsRound, ERROR): CollectRandomnessRound + (CloseMarketsRound, NO_MAJORITY): CollectRandomnessRound + (CloseMarketsRound, NO_TX): CollectRandomnessRound + (CloseMarketsRound, ROUND_TIMEOUT): CloseMarketsRound (CollectProposedMarketsRound, DONE): ApproveMarketsRound (CollectProposedMarketsRound, ERROR): DataGatheringRound (CollectProposedMarketsRound, MAX_APPROVED_MARKETS_REACHED): DataGatheringRound @@ -110,7 +116,7 @@ transition_func: (MarketProposalRound, ERROR): RetrieveApprovedMarketRound (MarketProposalRound, MARKET_PROPOSAL_ROUND_TIMEOUT): RetrieveApprovedMarketRound (MarketProposalRound, NO_MAJORITY): RetrieveApprovedMarketRound - (PostTransactionRound, DONE): CollectRandomnessRound + (PostTransactionRound, DONE): CloseMarketsRound (PostTransactionRound, ERROR): PostTransactionRound (PostTransactionRound, NO_MAJORITY): PostTransactionRound (PrepareTransactionRound, DONE): RandomnessTransactionSubmissionRound diff --git a/packages/valory/skills/market_maker_abci/skill.yaml b/packages/valory/skills/market_maker_abci/skill.yaml index 789ff92..4df4738 100644 --- a/packages/valory/skills/market_maker_abci/skill.yaml +++ b/packages/valory/skills/market_maker_abci/skill.yaml @@ -12,7 +12,7 @@ fingerprint: behaviours.py: bafybeibzkj5b7zymcz4c2befwyodkyyisvuni742rjtozqxlezktelk6fi composition.py: bafybeifbikpmoxy7fxamfdo67a3ctp3zuijwprp6motpmijc4c5ecwiasi dialogues.py: bafybeicintyylxt4nd5gcufh3rehbxr5jvdn6un7wvaoel7hvj3dmurlpy - fsm_specification.yaml: bafybeigbti64ivau5ilbm5yvptpydkfoyccpoivsyxcgtpc6hxvtgx6k6q + fsm_specification.yaml: bafybeiafsjardaq6mudqjmvkm5f3raxt7t26gwpgxy4pseqcuvtzv4gdey handlers.py: bafybeidlgouig5odju36dkjl5vdqx6mqrukaoyn2chnl5dv2ca6owqlecm models.py: bafybeie4rqji6a2hmlvk7jamfatwhkc2dd7oj5qd43fk524defc3lowxe4 tests/__init__.py: bafybeig7noiiz2y2b2scjeaalby56ft24eqj4o433blm2oze2pu3lljp44 @@ -24,7 +24,7 @@ skills: - valory/abstract_round_abci:0.1.0:bafybeiaqcl7h2famylusiffigwem7tevkcsyocdu5xd42jkmgq6kvowzgq - valory/registration_abci:0.1.0:bafybeic2ynseiak7jpta7jfwuqwyp453b4p7lolr4wihxmpn633uekv5am - valory/reset_pause_abci:0.1.0:bafybeidzajbe3erygeh2xbd6lrjv7nsptznjuzrt24ykgvhgotdeyhfnba -- valory/market_creation_manager_abci:0.1.0:bafybeiaonlf7blpoxovwl6fjatnve37dqxppmgfrveknuedvkbskwa7ite +- valory/market_creation_manager_abci:0.1.0:bafybeiee4janebu34kde25urs7bwehrg6docvbrz47rj3cjqdxtoj2wboe - valory/termination_abci:0.1.0:bafybeie4zvjfxvdu7qrulmur3chpjz3kpj5m4bjsxvpk4gvj5zbyyayfaa - valory/transaction_settlement_abci:0.1.0:bafybeiaefgqbs7zsn5xe5kdwrujj7ivygkn3ujpw6crnvi3knvxw75qmja behaviours: