diff --git a/packages/packages.json b/packages/packages.json index eaf0ac6..6d82fa6 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -8,10 +8,10 @@ "contract/valory/merkl_distributor/0.1.0": "bafybeihaqsvmncuzmwv2r6iuzc5t7ur6ugdhephz7ydftypksjidpsylbq", "contract/valory/staking_token/0.1.0": "bafybeifrvtkofw5c26b3irm6izqfdpik6vpjhm6hqwcdzx333h6vhdanai", "contract/valory/staking_activity_checker/0.1.0": "bafybeibjzsi2r5b6xd4iwl4wbwldptnynryzsdpifym4mkv32ynswx22ou", - "skill/valory/liquidity_trader_abci/0.1.0": "bafybeibb37nibvq6ceseuptyqid6oevdr5taywmt5xrnyv4aom2yuboszy", - "skill/valory/optimus_abci/0.1.0": "bafybeiddcr6ynnhmpdxojtyf7inervcqjbar3wlujgauwvd27tuv2mctqe", - "agent/valory/optimus/0.1.0": "bafybeif57cip6khg67sczuw5rb77uzmuwmxdsmrzn2m44up2phktrill54", - "service/valory/optimus/0.1.0": "bafybeic2mihsbjf4cmgnztgcyvx3hluuicc6tgeja6dthflptgrur7b5iq" + "skill/valory/liquidity_trader_abci/0.1.0": "bafybeich6pbchgdy7v56dwfdq6btb2blcagfquhytdhaemdfgmtgk4hbv4", + "skill/valory/optimus_abci/0.1.0": "bafybeigdgah43tm2byc5ilynpxkcjkt2lh5euwjbb36shxjyn57alfb77i", + "agent/valory/optimus/0.1.0": "bafybeihoajamcrdv3yxsgrmfaeyhspjc6vt4jbwn3egmzcdszihtpjdno4", + "service/valory/optimus/0.1.0": "bafybeiasbh4wha2soe62izwwwtgf2vxcjyxe5nxqen4t66amfwbyho4v2u" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/optimus/aea-config.yaml b/packages/valory/agents/optimus/aea-config.yaml index b9f4494..9b26e8b 100644 --- a/packages/valory/agents/optimus/aea-config.yaml +++ b/packages/valory/agents/optimus/aea-config.yaml @@ -35,8 +35,8 @@ protocols: skills: - valory/abstract_abci:0.1.0:bafybeidz54kvxhbdmpruzguuzzq7bjg4pekjb5amqobkxoy4oqknnobopu - valory/abstract_round_abci:0.1.0:bafybeiajjzuh6vf23crp55humonknirvv2f4s3dmdlfzch6tc5ow52pcgm -- valory/liquidity_trader_abci:0.1.0:bafybeibb37nibvq6ceseuptyqid6oevdr5taywmt5xrnyv4aom2yuboszy -- valory/optimus_abci:0.1.0:bafybeiddcr6ynnhmpdxojtyf7inervcqjbar3wlujgauwvd27tuv2mctqe +- valory/liquidity_trader_abci:0.1.0:bafybeich6pbchgdy7v56dwfdq6btb2blcagfquhytdhaemdfgmtgk4hbv4 +- valory/optimus_abci:0.1.0:bafybeigdgah43tm2byc5ilynpxkcjkt2lh5euwjbb36shxjyn57alfb77i - valory/registration_abci:0.1.0:bafybeiffipsowrqrkhjoexem7ern5ob4fabgif7wa6gtlszcoaop2e3oey - valory/reset_pause_abci:0.1.0:bafybeif4lgvbzsmzljesxbphycdv52ka7qnihyjrjpfaseclxadcmm6yiq - valory/termination_abci:0.1.0:bafybeiekkpo5qef5zaeagm3si6v45qxcojvtjqe4a5ceccvk4q7k3xi3bi diff --git a/packages/valory/services/optimus/service.yaml b/packages/valory/services/optimus/service.yaml index 123bf69..f0a4b6a 100644 --- a/packages/valory/services/optimus/service.yaml +++ b/packages/valory/services/optimus/service.yaml @@ -6,7 +6,7 @@ aea_version: '>=1.0.0, <2.0.0' license: Apache-2.0 fingerprint: {} fingerprint_ignore_patterns: [] -agent: valory/optimus:0.1.0:bafybeif57cip6khg67sczuw5rb77uzmuwmxdsmrzn2m44up2phktrill54 +agent: valory/optimus:0.1.0:bafybeihoajamcrdv3yxsgrmfaeyhspjc6vt4jbwn3egmzcdszihtpjdno4 number_of_agents: 1 deployment: {} --- diff --git a/packages/valory/skills/liquidity_trader_abci/behaviours.py b/packages/valory/skills/liquidity_trader_abci/behaviours.py index b853323..287913d 100644 --- a/packages/valory/skills/liquidity_trader_abci/behaviours.py +++ b/packages/valory/skills/liquidity_trader_abci/behaviours.py @@ -118,7 +118,6 @@ INTEGRATOR = "valory" WAITING_PERIOD_FOR_BALANCE_TO_REFLECT = 5 WaitableConditionType = Generator[None, None, Any] -HTTP_OK = 200 HTTP_NOT_FOUND = 404 RETRIES = 5 @@ -955,7 +954,7 @@ def _fetch_all_pools(self) -> Generator[None, None, Optional[Dict[str, Any]]]: headers={"accept": "application/json"}, ) - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: self.context.logger.error( f"Could not retrieve data from url {api_url}. Status code {response.status_code}. Error Message: {response.body}" ) @@ -1165,7 +1164,7 @@ def to_content(query: str) -> bytes: url=url, headers={"Content-Type": "application/json"}, ) - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: self.context.logger.error( f"Received status code {response.status_code} from the API. Response: {response.body}" ) @@ -1297,7 +1296,7 @@ def _get_top_tokens_by_value(self) -> Generator[None, None, Optional[List[Any]]] if not chain or not asset_address: continue balance = asset.get("balance", 0) - if balance > 0: + if balance and balance > 0: token_balances.append( { "chain": chain, @@ -1708,7 +1707,7 @@ def _get_rewards( headers={"accept": "application/json"}, ) - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: self.context.logger.error( f"Could not retrieve data from url {api_url}. Status code {response.status_code}. Error Message: {response.body}" ) @@ -2056,7 +2055,7 @@ def get_swap_status( yield from self.sleep(self.params.waiting_period_for_status_check) continue - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: self.context.logger.error( f"Received status code {response.status_code} from url {url}." f"Message {response.body}" @@ -2567,7 +2566,7 @@ def _get_step_transaction( }, ) - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: response = json.loads(response.body) self.context.logger.error(f"Error encountered: {response['message']}") return None @@ -2812,7 +2811,7 @@ def _simulate_execution_bundle( }, ) - if response.status_code != HTTP_OK: + if response.status_code not in HTTP_OK: self.context.logger.error( f"Could not retrieve data from url {api_url}. Status code {response.status_code}. Error Message {response.body}" ) diff --git a/packages/valory/skills/liquidity_trader_abci/skill.yaml b/packages/valory/skills/liquidity_trader_abci/skill.yaml index b89c79a..2f462be 100644 --- a/packages/valory/skills/liquidity_trader_abci/skill.yaml +++ b/packages/valory/skills/liquidity_trader_abci/skill.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeia7bn2ahqqwkf63ptje6rfnftuwrsp33sswgpcbh5osbesxxr6g4m - behaviours.py: bafybeiaktfldwuypicsiqbyxjulesfxhfbbjzu6p7bwtpvfwx2cdyweqmq + behaviours.py: bafybeifrmkalngpld57inxxtyvdpqllfxjfornafbtovxamkmpadh6zpk4 dialogues.py: bafybeiay23otskx2go5xhtgdwfw2kd6rxd62sxxdu3njv7hageorl5zxzm fsm_specification.yaml: bafybeiabbiulb7k6xkjysulmy6o4ugnhxlpp5jiaeextvwj65q4ttadoeq handlers.py: bafybeidxw2lvgiifmo4siobpwuwbxscuifrdo3gnkjyn6bgexotj5f7zf4 diff --git a/packages/valory/skills/optimus_abci/skill.yaml b/packages/valory/skills/optimus_abci/skill.yaml index dc0e05d..270cbb8 100644 --- a/packages/valory/skills/optimus_abci/skill.yaml +++ b/packages/valory/skills/optimus_abci/skill.yaml @@ -22,7 +22,7 @@ skills: - valory/registration_abci:0.1.0:bafybeiffipsowrqrkhjoexem7ern5ob4fabgif7wa6gtlszcoaop2e3oey - valory/reset_pause_abci:0.1.0:bafybeif4lgvbzsmzljesxbphycdv52ka7qnihyjrjpfaseclxadcmm6yiq - valory/termination_abci:0.1.0:bafybeiekkpo5qef5zaeagm3si6v45qxcojvtjqe4a5ceccvk4q7k3xi3bi -- valory/liquidity_trader_abci:0.1.0:bafybeibb37nibvq6ceseuptyqid6oevdr5taywmt5xrnyv4aom2yuboszy +- valory/liquidity_trader_abci:0.1.0:bafybeich6pbchgdy7v56dwfdq6btb2blcagfquhytdhaemdfgmtgk4hbv4 - valory/transaction_settlement_abci:0.1.0:bafybeielv6eivt2z6nforq43xewl2vmpfwpdu2s2vfogobziljnwsclmlm behaviours: main: