diff --git a/packages/packages.json b/packages/packages.json index 04e54c6fd..0cf49ceee 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -2,19 +2,19 @@ "dev": { "skill/valory/market_manager_abci/0.1.0": "bafybeifdf6uoscrgvlgqceqcph2pgoygobznw6hbodpav7lubbqsyh4kby", "skill/valory/decision_maker_abci/0.1.0": "bafybeibqsaei2puprlwdwtvt3bf6golmvpdozblcw22qurx5bdymmvwvzy", - "skill/valory/trader_abci/0.1.0": "bafybeidyej2rr2j25zv5uvohrc7nreygvg5tiq65xgjvpfkdlf7plvqfre", + "skill/valory/trader_abci/0.1.0": "bafybeih4bqbsyup3cvlzzbykffg3nhkjhriyyyvwdldrinzuffppagdmam", "contract/valory/market_maker/0.1.0": "bafybeiain372i5t6eteem36vzhwh6ppka6hc4oyrxjtyzuar6rd6bjocem", - "agent/valory/trader/0.1.0": "bafybeid75avdmbe5kpz4ngxtqqebwh57km4djvd4frefoufugjdmyd3p5e", - "service/valory/trader/0.1.0": "bafybeih7jf4bhw4quz7wmdb62wh6l7shjbg5klu3jwiwzjsfpkcwtxuxji", + "agent/valory/trader/0.1.0": "bafybeifew4rlur76tzunbsslp2u2idsugyiv4tqcdg5idg64mmjfyks7wa", + "service/valory/trader/0.1.0": "bafybeiaf4wppnrf6cddthat5xvle4267kfygttl75lofygtksvkmigau5a", "contract/valory/erc20/0.1.0": "bafybeiad6qbyhr3sgvclqne7tvyvqt32pcj5aq47hhkd2vmawaflhy5vna", - "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeib5gsvj7kbnaxadzim4nv5rktae5zpkqemooeh7at7adpj3ye754e", + "skill/valory/tx_settlement_multiplexer_abci/0.1.0": "bafybeifrh2pczxim4gvhookg7fvka266pqef3knifp35fvzvf6bljkhi74", "contract/valory/mech/0.1.0": "bafybeiauxqogu726oeethvzux6r77zgn7sw5j2l4uigqb47zlqawblkv6e", "contract/valory/realitio/0.1.0": "bafybeic5ie4oodetj4krdogydvbfxg4qggc3matpiflocah626tpevpreq", "contract/valory/realitio_proxy/0.1.0": "bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4", "contract/valory/conditional_tokens/0.1.0": "bafybeigucumqbsk74nj4rpm4p2cpiky4dj6uws7nfmgpimuviaxcamwqnu", "contract/valory/agent_registry/0.1.0": "bafybeia64nagvpw3rcxa7datevxhc57klbpaai5ntkthfjqdldxic3ywai", - "contract/valory/service_staking_token/0.1.0": "bafybeiafycks7yylhh7wi2yqakhxun3skz67t3gpob5amyrijugnyl3n6u", - "skill/valory/staking_abci/0.1.0": "bafybeiccopehegiiwxzghrttdhuxtnjp7zvuiclx5zchbtvqpy45rrvdxy" + "contract/valory/service_staking_token/0.1.0": "bafybeidl4ppp4yion7pdfcevlxsza6rzlf3f5gztzhcd672d3dfkdzplre", + "skill/valory/staking_abci/0.1.0": "bafybeigwpp474gw7yb3w3xm4ejz4nxm7n2l4d27po6pj3yh7w3idctge5i" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii", diff --git a/packages/valory/agents/trader/aea-config.yaml b/packages/valory/agents/trader/aea-config.yaml index a9728fb3b..b289f227e 100644 --- a/packages/valory/agents/trader/aea-config.yaml +++ b/packages/valory/agents/trader/aea-config.yaml @@ -26,7 +26,7 @@ contracts: - valory/realitio:0.1.0:bafybeic5ie4oodetj4krdogydvbfxg4qggc3matpiflocah626tpevpreq - valory/realitio_proxy:0.1.0:bafybeidx37xzjjmapwacedgzhum6grfzhp5vhouz4zu3pvpgdy5pgb2fr4 - valory/agent_registry:0.1.0:bafybeia64nagvpw3rcxa7datevxhc57klbpaai5ntkthfjqdldxic3ywai -- valory/service_staking_token:0.1.0:bafybeiafycks7yylhh7wi2yqakhxun3skz67t3gpob5amyrijugnyl3n6u +- valory/service_staking_token:0.1.0:bafybeidl4ppp4yion7pdfcevlxsza6rzlf3f5gztzhcd672d3dfkdzplre protocols: - open_aea/signing:1.0.0:bafybeie7xyems76v5b4wc2lmaidcujizpxfzjnnwdeokmhje53g7ym25ii - valory/abci:0.1.0:bafybeihmzlmmb4pdo3zkhg6ehuyaa4lhw7bfpclln2o2z7v3o6fcep26iu @@ -43,11 +43,11 @@ skills: - valory/reset_pause_abci:0.1.0:bafybeibnwjcjx4lluf4cwb6es5peelu3gm7vrzlieygrzpbjlubxpvbvzy - valory/termination_abci:0.1.0:bafybeifdtxgldw33kwvsavcituzewwbr6iqfcsgk5qouqfhpwdrivyyyom - valory/transaction_settlement_abci:0.1.0:bafybeifpnkwgwpzz6uwrvfgurm26allr6shjfbp7bfbrxwy64sw3nf3fsa -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeib5gsvj7kbnaxadzim4nv5rktae5zpkqemooeh7at7adpj3ye754e +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifrh2pczxim4gvhookg7fvka266pqef3knifp35fvzvf6bljkhi74 - valory/market_manager_abci:0.1.0:bafybeifdf6uoscrgvlgqceqcph2pgoygobznw6hbodpav7lubbqsyh4kby - valory/decision_maker_abci:0.1.0:bafybeibqsaei2puprlwdwtvt3bf6golmvpdozblcw22qurx5bdymmvwvzy -- valory/trader_abci:0.1.0:bafybeidyej2rr2j25zv5uvohrc7nreygvg5tiq65xgjvpfkdlf7plvqfre -- valory/staking_abci:0.1.0:bafybeiccopehegiiwxzghrttdhuxtnjp7zvuiclx5zchbtvqpy45rrvdxy +- valory/trader_abci:0.1.0:bafybeih4bqbsyup3cvlzzbykffg3nhkjhriyyyvwdldrinzuffppagdmam +- valory/staking_abci:0.1.0:bafybeigwpp474gw7yb3w3xm4ejz4nxm7n2l4d27po6pj3yh7w3idctge5i default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/valory/contracts/service_staking_token/contract.py b/packages/valory/contracts/service_staking_token/contract.py index e0e91a0b2..cd7687fbc 100644 --- a/packages/valory/contracts/service_staking_token/contract.py +++ b/packages/valory/contracts/service_staking_token/contract.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # -# Copyright 2023 Valory AG +# Copyright 2023-2024 Valory AG # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -133,3 +133,25 @@ def get_service_info( contract = cls.get_instance(ledger_api, contract_address) info = contract.functions.mapServiceInfo(service_id).call() return dict(data=info) + + @classmethod + def max_num_services( + cls, + ledger_api: LedgerApi, + contract_address: str, + ) -> JSONLike: + """Retrieve the max number of services.""" + contract = cls.get_instance(ledger_api, contract_address) + max_num_services = contract.functions.maxNumServices().call() + return dict(data=max_num_services) + + @classmethod + def get_service_ids( + cls, + ledger_api: LedgerApi, + contract_address: str, + ) -> JSONLike: + """Retrieve the service IDs.""" + contract = cls.get_instance(ledger_api, contract_address) + service_ids = contract.functions.getServiceIds().call() + return dict(data=service_ids) \ No newline at end of file diff --git a/packages/valory/contracts/service_staking_token/contract.yaml b/packages/valory/contracts/service_staking_token/contract.yaml index be6f3cf4b..93003fdd6 100644 --- a/packages/valory/contracts/service_staking_token/contract.yaml +++ b/packages/valory/contracts/service_staking_token/contract.yaml @@ -8,7 +8,7 @@ aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeid3wfzglolebuo6jrrsopswzu4lk77bm76mvw3euizlsjtnt3wmgu build/ServiceStakingToken.json: bafybeie2xbccvzmjuptqfqumctv6gtyyeoxe7fkx3t7fgbto7wbdugbqxm - contract.py: bafybeihhdg5mvd3jwc7q445ntdahaiyjpt2ne6ipkiaymycbrw5iwzuble + contract.py: bafybeif2c6sremwf6cgqcfuossbjm43rj7auredsgwafbxrrhzymsqyzmm fingerprint_ignore_patterns: [] contracts: [] class_name: ServiceStakingTokenContract diff --git a/packages/valory/services/trader/service.yaml b/packages/valory/services/trader/service.yaml index c25f71e44..a214346c6 100644 --- a/packages/valory/services/trader/service.yaml +++ b/packages/valory/services/trader/service.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeigtuothskwyvrhfosps2bu6suauycolj67dpuxqvnicdrdu7yhtvq fingerprint_ignore_patterns: [] -agent: valory/trader:0.1.0:bafybeid75avdmbe5kpz4ngxtqqebwh57km4djvd4frefoufugjdmyd3p5e +agent: valory/trader:0.1.0:bafybeifew4rlur76tzunbsslp2u2idsugyiv4tqcdg5idg64mmjfyks7wa number_of_agents: 4 deployment: {} --- diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 399ed1eef..2211a4669 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -19,7 +19,7 @@ fingerprint_ignore_patterns: [] connections: [] contracts: - valory/gnosis_safe:0.1.0:bafybeiegkl6zrbvlbpwmoziw4hfkocjfqdqphkmpgow7ovsmv7bwa3f4pe -- valory/service_staking_token:0.1.0:bafybeiafycks7yylhh7wi2yqakhxun3skz67t3gpob5amyrijugnyl3n6u +- valory/service_staking_token:0.1.0:bafybeidl4ppp4yion7pdfcevlxsza6rzlf3f5gztzhcd672d3dfkdzplre protocols: - valory/contract_api:1.0.0:bafybeialhbjvwiwcnqq3ysxcyemobcbie7xza66gaofcvla5njezkvhcka skills: diff --git a/packages/valory/skills/trader_abci/skill.yaml b/packages/valory/skills/trader_abci/skill.yaml index 61ebc9887..44c4b7d7b 100644 --- a/packages/valory/skills/trader_abci/skill.yaml +++ b/packages/valory/skills/trader_abci/skill.yaml @@ -26,8 +26,8 @@ skills: - valory/termination_abci:0.1.0:bafybeifdtxgldw33kwvsavcituzewwbr6iqfcsgk5qouqfhpwdrivyyyom - valory/market_manager_abci:0.1.0:bafybeifdf6uoscrgvlgqceqcph2pgoygobznw6hbodpav7lubbqsyh4kby - valory/decision_maker_abci:0.1.0:bafybeibqsaei2puprlwdwtvt3bf6golmvpdozblcw22qurx5bdymmvwvzy -- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeib5gsvj7kbnaxadzim4nv5rktae5zpkqemooeh7at7adpj3ye754e -- valory/staking_abci:0.1.0:bafybeiccopehegiiwxzghrttdhuxtnjp7zvuiclx5zchbtvqpy45rrvdxy +- valory/tx_settlement_multiplexer_abci:0.1.0:bafybeifrh2pczxim4gvhookg7fvka266pqef3knifp35fvzvf6bljkhi74 +- valory/staking_abci:0.1.0:bafybeigwpp474gw7yb3w3xm4ejz4nxm7n2l4d27po6pj3yh7w3idctge5i behaviours: main: args: {} diff --git a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml index daf001c75..303867278 100644 --- a/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml +++ b/packages/valory/skills/tx_settlement_multiplexer_abci/skill.yaml @@ -22,7 +22,7 @@ protocols: skills: - valory/abstract_round_abci:0.1.0:bafybeicrzndcdbue34yxwwb4hmmdhgzw4owcdcdag3ifj6thpx5wie3dp4 - valory/decision_maker_abci:0.1.0:bafybeibqsaei2puprlwdwtvt3bf6golmvpdozblcw22qurx5bdymmvwvzy -- valory/staking_abci:0.1.0:bafybeiccopehegiiwxzghrttdhuxtnjp7zvuiclx5zchbtvqpy45rrvdxy +- valory/staking_abci:0.1.0:bafybeigwpp474gw7yb3w3xm4ejz4nxm7n2l4d27po6pj3yh7w3idctge5i behaviours: main: args: {}