diff --git a/docs/index.md b/docs/index.md index 6e545702..8869aa00 100644 --- a/docs/index.md +++ b/docs/index.md @@ -31,7 +31,7 @@ In order to run a local demo service based on the IEKit: 2. Fetch the IEKit. ```bash - autonomy fetch valory/impact_evaluator:0.1.0:bafybeiatlrpepgcyxmiwlcfmudo4ea3dpytgo4ivkegqopugi2fbgwypsu --service + autonomy fetch valory/impact_evaluator:0.1.0:bafybeigexmn4jl2s43urlusyajcplmvf3sqcm3ty63ukzgloyfuigzude4 --service ``` 3. Build the Docker image of the service agents diff --git a/packages/packages.json b/packages/packages.json index 315032d0..eedea887 100644 --- a/packages/packages.json +++ b/packages/packages.json @@ -15,24 +15,24 @@ "connection/valory/twitter/0.1.0": "bafybeiankzrpgovfe34wbxxwzmrg6lbdpe2uegcu4ujtswuopr3b7fsqdq", "connection/valory/openai/0.1.0": "bafybeiaryip2lbiluf7vjsdq6r5qiqdesmhqevrzekfrxpugfypqja6gae", "connection/valory/farcaster/0.1.0": "bafybeibbdas7lxbipksodaphjms3uop7vnzjqkroktjq2g6wbvgtlldaxi", - "skill/valory/dynamic_nft_abci/0.1.0": "bafybeibjo44mdovoaimfsagxxrvmj2nh7w22wig3xq7xx4x3ksrj3wi3pm", - "skill/valory/twitter_scoring_abci/0.1.0": "bafybeibowidqjmxzgvi2s3yocrsolkbofao5sjir6boapyja3s27jbkwc4", + "skill/valory/dynamic_nft_abci/0.1.0": "bafybeigyn5xcndifdqceieqotpkhmmadacybojdl4zl3bnpromrg5e4thi", + "skill/valory/twitter_scoring_abci/0.1.0": "bafybeibpevvo25gngej3mtd3ilkoevieq74d5ag5mevgycgtzd7r3ceemu", "skill/valory/ceramic_read_abci/0.1.0": "bafybeibph35jhtvn6kgytj6mqdz4lpjkvtfqd75qorrt4onv6i2trxfttu", "skill/valory/ceramic_write_abci/0.1.0": "bafybeihez2zrvvt6cyi5vu3fpomjlbo3v4fzyf4buv7ysxzj4dntr2wy3q", - "skill/valory/impact_evaluator_abci/0.1.0": "bafybeic5n47n3m5e6a62sscfafubmqughrw2mrt5tcoe34pbjnqpi36g5u", - "skill/valory/generic_scoring_abci/0.1.0": "bafybeih3zk4zx4ul3rkl5s4yaqxl5wkl723j23t5ggbzsn2u7t5w5abbsy", + "skill/valory/impact_evaluator_abci/0.1.0": "bafybeiarfz5dvfksl5gzeepe5o23sqngcfvck4u5xmqnb3rpgljomlozvy", + "skill/valory/generic_scoring_abci/0.1.0": "bafybeiho6p6ahlrbbavssqe6mgigj6lbpkifc2gspzfe2b6ayib3le4oxm", "skill/valory/twitter_write_abci/0.1.0": "bafybeig4dc4cereyshk535pfpparvxiuaimdu4lsm3hnl5li7pxafho6lu", "skill/valory/llm_abci/0.1.0": "bafybeihpfesi2sjqdcb2j2mqybhz7av7jlvf27ozk32wbwmklkdugycxyq", - "skill/valory/decision_making_abci/0.1.0": "bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm", - "skill/valory/olas_week_abci/0.1.0": "bafybeibzg3jo5ilrii6f5cgk2htuipjueuyzjj6vfcqlnug4ooforjizni", + "skill/valory/decision_making_abci/0.1.0": "bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74", + "skill/valory/olas_week_abci/0.1.0": "bafybeibjfxhu3j7ww2lxcekwtw7uiq7iptmhkzgjhk2342mbamrmvol7ma", "skill/valory/mech_interact_abci/0.1.0": "bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64", "skill/valory/farcaster_write_abci/0.1.0": "bafybeibbbfui3g2s63cg5vsvxqpzzdg2uxhd7a4ikwfo6dy7b2klqthvu4", "skill/valory/farcaster_test_abci/0.1.0": "bafybeiblauv376hvy7dzi232fxf6iq5nxxnhvk2gy6g7kcsj7a4r2bilqa", - "skill/valory/staking_abci/0.1.0": "bafybeicabieii5mlugcq34hk4ylmmti5judectixo4y6kxzolzw7gexgl4", - "agent/valory/impact_evaluator/0.1.0": "bafybeifp66n4kppy52hovt3tc3an7s5bcqbfrbhfpt3spd4sizb6mcofdi", + "skill/valory/staking_abci/0.1.0": "bafybeiffqyu4plhkkezhz6oabgx6nb6v2ozhs53iruw7p4ucclbgvo5u24", + "agent/valory/impact_evaluator/0.1.0": "bafybeicsncua573sgxisxkxf3f6xflt2plyxeejh4lbstr6ybywuj6ekqi", "agent/valory/farcaster_test/0.1.0": "bafybeig6yilme5s7fvru2b44dtr5xxqz3gf7p56swr7c5hip775l5wally", - "service/valory/impact_evaluator/0.1.0": "bafybeiatlrpepgcyxmiwlcfmudo4ea3dpytgo4ivkegqopugi2fbgwypsu", - "service/valory/impact_evaluator_local/0.1.0": "bafybeihy5xsp5muo55glmq4sih2jln7lfkqhokasg6ttunik3zqk2ci5a4" + "service/valory/impact_evaluator/0.1.0": "bafybeigexmn4jl2s43urlusyajcplmvf3sqcm3ty63ukzgloyfuigzude4", + "service/valory/impact_evaluator_local/0.1.0": "bafybeiczd3xkxlfzrpwhu5sqsj5z5d4i2ijlk5xmzf2466de2drn7snvhi" }, "third_party": { "protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi", diff --git a/packages/valory/agents/impact_evaluator/aea-config.yaml b/packages/valory/agents/impact_evaluator/aea-config.yaml index 23e13af4..f0bff806 100644 --- a/packages/valory/agents/impact_evaluator/aea-config.yaml +++ b/packages/valory/agents/impact_evaluator/aea-config.yaml @@ -46,22 +46,22 @@ protocols: skills: - valory/abstract_abci:0.1.0:bafybeif2naoydlrqkdpnig34uejedwgurjwyvmbpcz53tif7pyukfdophq - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm -- valory/impact_evaluator_abci:0.1.0:bafybeic5n47n3m5e6a62sscfafubmqughrw2mrt5tcoe34pbjnqpi36g5u -- valory/generic_scoring_abci:0.1.0:bafybeih3zk4zx4ul3rkl5s4yaqxl5wkl723j23t5ggbzsn2u7t5w5abbsy -- valory/twitter_scoring_abci:0.1.0:bafybeibowidqjmxzgvi2s3yocrsolkbofao5sjir6boapyja3s27jbkwc4 +- valory/impact_evaluator_abci:0.1.0:bafybeiarfz5dvfksl5gzeepe5o23sqngcfvck4u5xmqnb3rpgljomlozvy +- valory/generic_scoring_abci:0.1.0:bafybeiho6p6ahlrbbavssqe6mgigj6lbpkifc2gspzfe2b6ayib3le4oxm +- valory/twitter_scoring_abci:0.1.0:bafybeibpevvo25gngej3mtd3ilkoevieq74d5ag5mevgycgtzd7r3ceemu - valory/ceramic_read_abci:0.1.0:bafybeibph35jhtvn6kgytj6mqdz4lpjkvtfqd75qorrt4onv6i2trxfttu - valory/ceramic_write_abci:0.1.0:bafybeihez2zrvvt6cyi5vu3fpomjlbo3v4fzyf4buv7ysxzj4dntr2wy3q -- valory/dynamic_nft_abci:0.1.0:bafybeibjo44mdovoaimfsagxxrvmj2nh7w22wig3xq7xx4x3ksrj3wi3pm +- valory/dynamic_nft_abci:0.1.0:bafybeigyn5xcndifdqceieqotpkhmmadacybojdl4zl3bnpromrg5e4thi - valory/registration_abci:0.1.0:bafybeiagi6e2h7kochmlemy5c5yk6hwn37tfxiqvk2en74jhowsdwlmrny - valory/reset_pause_abci:0.1.0:bafybeiezfedmmseox3ce5aucxsiszdmvskrwwbtpb2a3vw3sbmc5jt7nri - valory/termination_abci:0.1.0:bafybeiea67epwwgngp7b3wavs6hpkaxv6etyaps6g6325bchfnf354mibq - valory/transaction_settlement_abci:0.1.0:bafybeifmgmwdkx4esemxjacjwzqkqymkuklb5nehkwqkx7v335fllgswcq - valory/twitter_write_abci:0.1.0:bafybeig4dc4cereyshk535pfpparvxiuaimdu4lsm3hnl5li7pxafho6lu -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 - valory/llm_abci:0.1.0:bafybeihpfesi2sjqdcb2j2mqybhz7av7jlvf27ozk32wbwmklkdugycxyq -- valory/olas_week_abci:0.1.0:bafybeibzg3jo5ilrii6f5cgk2htuipjueuyzjj6vfcqlnug4ooforjizni +- valory/olas_week_abci:0.1.0:bafybeibjfxhu3j7ww2lxcekwtw7uiq7iptmhkzgjhk2342mbamrmvol7ma - valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64 -- valory/staking_abci:0.1.0:bafybeicabieii5mlugcq34hk4ylmmti5judectixo4y6kxzolzw7gexgl4 +- valory/staking_abci:0.1.0:bafybeiffqyu4plhkkezhz6oabgx6nb6v2ozhs53iruw7p4ucclbgvo5u24 default_ledger: ethereum required_ledgers: - ethereum diff --git a/packages/valory/services/impact_evaluator/service.yaml b/packages/valory/services/impact_evaluator/service.yaml index 3306515c..7c4b2d0e 100644 --- a/packages/valory/services/impact_evaluator/service.yaml +++ b/packages/valory/services/impact_evaluator/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeign56hilwuoa6bgos3uqabss4gew4vadkik7vhj3ucpqw6nxtqtpe fingerprint_ignore_patterns: [] -agent: valory/impact_evaluator:0.1.0:bafybeifp66n4kppy52hovt3tc3an7s5bcqbfrbhfpt3spd4sizb6mcofdi +agent: valory/impact_evaluator:0.1.0:bafybeicsncua573sgxisxkxf3f6xflt2plyxeejh4lbstr6ybywuj6ekqi number_of_agents: 4 deployment: agent: diff --git a/packages/valory/services/impact_evaluator_local/service.yaml b/packages/valory/services/impact_evaluator_local/service.yaml index 7d7fca63..3cdbe75a 100644 --- a/packages/valory/services/impact_evaluator_local/service.yaml +++ b/packages/valory/services/impact_evaluator_local/service.yaml @@ -8,7 +8,7 @@ license: Apache-2.0 fingerprint: README.md: bafybeign56hilwuoa6bgos3uqabss4gew4vadkik7vhj3ucpqw6nxtqtpe fingerprint_ignore_patterns: [] -agent: valory/impact_evaluator:0.1.0:bafybeifp66n4kppy52hovt3tc3an7s5bcqbfrbhfpt3spd4sizb6mcofdi +agent: valory/impact_evaluator:0.1.0:bafybeicsncua573sgxisxkxf3f6xflt2plyxeejh4lbstr6ybywuj6ekqi number_of_agents: 1 deployment: agent: diff --git a/packages/valory/skills/decision_making_abci/skill.yaml b/packages/valory/skills/decision_making_abci/skill.yaml index c14ef809..8d59db1f 100644 --- a/packages/valory/skills/decision_making_abci/skill.yaml +++ b/packages/valory/skills/decision_making_abci/skill.yaml @@ -20,7 +20,7 @@ fingerprint: tasks/read_stream_preparation.py: bafybeicmjasiyecopfweobodzbmn3tbluu5q724uzzqkit6urn3lb5q354 tasks/score_preparations.py: bafybeie7cfot24zcyod5becz6t5lasvva77httfkw57qmvgjk35d3qluxa tasks/signature_validation.py: bafybeihbwrv72hnh3ytko2i5oszqgdky2j6h2wse45wvuhf2j32lo2tsjy - tasks/staking.py: bafybeihg54pf7ekzzped6tulzfv74vkeyfijlgzsgmlr7ndyq642qtixtu + tasks/staking.py: bafybeicpdqbvzx5prfpngb54m5nicisavufapfywtvt33dbmtvkl7fjadu tasks/task_preparations.py: bafybeihfm3ms665fvz2qwmhmcwgl2ws5mt62pykomowoxpm6a46jlqvsmu tasks/tweet_validation_preparation.py: bafybeif3wbfskiyuij7unx72euklms7owrzwzgdu462xatvypalm6xrgca tasks/twitter_preparation.py: bafybeicn7stcvmd6oex55dwptwxpikpssbcwnj2d3xkercikg5nlzqh4k4 @@ -58,7 +58,7 @@ protocols: skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm - valory/ceramic_read_abci:0.1.0:bafybeibph35jhtvn6kgytj6mqdz4lpjkvtfqd75qorrt4onv6i2trxfttu -- valory/staking_abci:0.1.0:bafybeicabieii5mlugcq34hk4ylmmti5judectixo4y6kxzolzw7gexgl4 +- valory/staking_abci:0.1.0:bafybeiffqyu4plhkkezhz6oabgx6nb6v2ozhs53iruw7p4ucclbgvo5u24 behaviours: main: args: {} diff --git a/packages/valory/skills/decision_making_abci/tasks/staking.py b/packages/valory/skills/decision_making_abci/tasks/staking.py index d7987fa4..6a9cd52b 100644 --- a/packages/valory/skills/decision_making_abci/tasks/staking.py +++ b/packages/valory/skills/decision_making_abci/tasks/staking.py @@ -200,6 +200,31 @@ def get_staking_contract( return None return staking_contract_address + def get_staked_services( + self, staking_contract_address: str + ) -> Generator[None, None, Optional[List]]: + """Get the services staked on a contract""" + contract_api_msg = yield from self.behaviour.get_contract_api_response( + performative=ContractApiMessage.Performative.GET_STATE, # type: ignore + contract_address=staking_contract_address, + contract_id=str(Staking.contract_id), + contract_callable="get_service_ids", + chain_id=BASE_CHAIN_ID, + ) + if contract_api_msg.performative != ContractApiMessage.Performative.STATE: + self.context.logger.error( + f"Error getting the service ids: [{contract_api_msg.performative}]" + ) + return None + + service_ids = cast(str, contract_api_msg.state.body["service_ids"]) + + self.context.logger.info( + f"Got {len(service_ids)} staked services for contract {staking_contract_address}" + ) + + return service_ids + class StakingActivityPreparation(StakingPreparation): """StakingActivityPreparation""" @@ -363,6 +388,13 @@ def check_extra_conditions(self): yield for staking_contract_address in self.params.staking_contract_addresses: + # Check if there is some service staked on this contract + services_staked = yield from self.get_staked_services( + staking_contract_address + ) + if not services_staked: + continue + is_checkpoint_callable = yield from self.is_checkpoint_callable( staking_contract_address ) diff --git a/packages/valory/skills/dynamic_nft_abci/skill.yaml b/packages/valory/skills/dynamic_nft_abci/skill.yaml index be4e2fae..4b0e5f98 100644 --- a/packages/valory/skills/dynamic_nft_abci/skill.yaml +++ b/packages/valory/skills/dynamic_nft_abci/skill.yaml @@ -31,7 +31,7 @@ protocols: - valory/http:1.0.0:bafybeifugzl63kfdmwrxwphrnrhj7bn6iruxieme3a4ntzejf6kmtuwmae skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 behaviours: main: args: {} diff --git a/packages/valory/skills/generic_scoring_abci/skill.yaml b/packages/valory/skills/generic_scoring_abci/skill.yaml index caa56917..01e9ba26 100644 --- a/packages/valory/skills/generic_scoring_abci/skill.yaml +++ b/packages/valory/skills/generic_scoring_abci/skill.yaml @@ -28,7 +28,7 @@ contracts: [] protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 behaviours: main: args: {} diff --git a/packages/valory/skills/impact_evaluator_abci/skill.yaml b/packages/valory/skills/impact_evaluator_abci/skill.yaml index c1c92259..70b7469d 100644 --- a/packages/valory/skills/impact_evaluator_abci/skill.yaml +++ b/packages/valory/skills/impact_evaluator_abci/skill.yaml @@ -25,20 +25,20 @@ protocols: [] skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm - valory/ceramic_read_abci:0.1.0:bafybeibph35jhtvn6kgytj6mqdz4lpjkvtfqd75qorrt4onv6i2trxfttu -- valory/generic_scoring_abci:0.1.0:bafybeih3zk4zx4ul3rkl5s4yaqxl5wkl723j23t5ggbzsn2u7t5w5abbsy -- valory/twitter_scoring_abci:0.1.0:bafybeibowidqjmxzgvi2s3yocrsolkbofao5sjir6boapyja3s27jbkwc4 +- valory/generic_scoring_abci:0.1.0:bafybeiho6p6ahlrbbavssqe6mgigj6lbpkifc2gspzfe2b6ayib3le4oxm +- valory/twitter_scoring_abci:0.1.0:bafybeibpevvo25gngej3mtd3ilkoevieq74d5ag5mevgycgtzd7r3ceemu - valory/ceramic_write_abci:0.1.0:bafybeihez2zrvvt6cyi5vu3fpomjlbo3v4fzyf4buv7ysxzj4dntr2wy3q -- valory/dynamic_nft_abci:0.1.0:bafybeibjo44mdovoaimfsagxxrvmj2nh7w22wig3xq7xx4x3ksrj3wi3pm +- valory/dynamic_nft_abci:0.1.0:bafybeigyn5xcndifdqceieqotpkhmmadacybojdl4zl3bnpromrg5e4thi - valory/registration_abci:0.1.0:bafybeiagi6e2h7kochmlemy5c5yk6hwn37tfxiqvk2en74jhowsdwlmrny - valory/reset_pause_abci:0.1.0:bafybeiezfedmmseox3ce5aucxsiszdmvskrwwbtpb2a3vw3sbmc5jt7nri - valory/termination_abci:0.1.0:bafybeiea67epwwgngp7b3wavs6hpkaxv6etyaps6g6325bchfnf354mibq - valory/transaction_settlement_abci:0.1.0:bafybeifmgmwdkx4esemxjacjwzqkqymkuklb5nehkwqkx7v335fllgswcq -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 - valory/llm_abci:0.1.0:bafybeihpfesi2sjqdcb2j2mqybhz7av7jlvf27ozk32wbwmklkdugycxyq - valory/twitter_write_abci:0.1.0:bafybeig4dc4cereyshk535pfpparvxiuaimdu4lsm3hnl5li7pxafho6lu -- valory/olas_week_abci:0.1.0:bafybeibzg3jo5ilrii6f5cgk2htuipjueuyzjj6vfcqlnug4ooforjizni +- valory/olas_week_abci:0.1.0:bafybeibjfxhu3j7ww2lxcekwtw7uiq7iptmhkzgjhk2342mbamrmvol7ma - valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64 -- valory/staking_abci:0.1.0:bafybeicabieii5mlugcq34hk4ylmmti5judectixo4y6kxzolzw7gexgl4 +- valory/staking_abci:0.1.0:bafybeiffqyu4plhkkezhz6oabgx6nb6v2ozhs53iruw7p4ucclbgvo5u24 behaviours: main: args: {} diff --git a/packages/valory/skills/olas_week_abci/skill.yaml b/packages/valory/skills/olas_week_abci/skill.yaml index 592fdcf1..e5d53916 100644 --- a/packages/valory/skills/olas_week_abci/skill.yaml +++ b/packages/valory/skills/olas_week_abci/skill.yaml @@ -31,7 +31,7 @@ protocols: - valory/llm:1.0.0:bafybeihj2orqapokafg7co3wlogwgf6cckaaj2bz3nuv4rm3opkoyhrlp4 skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 behaviours: main: args: {} diff --git a/packages/valory/skills/staking_abci/behaviours.py b/packages/valory/skills/staking_abci/behaviours.py index 59e887a9..1d13098c 100644 --- a/packages/valory/skills/staking_abci/behaviours.py +++ b/packages/valory/skills/staking_abci/behaviours.py @@ -359,6 +359,11 @@ def get_checkpoint_hash(self) -> Generator[None, None, Optional[str]]: for staking_contract_address in self.params.staking_contract_addresses: + # Check if there is some service staked on this contract + services_staked = yield from self.get_staked_services(staking_contract_address) + if not services_staked: + continue + # Check if this checkpoint needs to be called is_checkpoint_callable = yield from self.is_checkpoint_callable(staking_contract_address) if not is_checkpoint_callable: diff --git a/packages/valory/skills/staking_abci/skill.yaml b/packages/valory/skills/staking_abci/skill.yaml index 3e7eba9d..68de6def 100644 --- a/packages/valory/skills/staking_abci/skill.yaml +++ b/packages/valory/skills/staking_abci/skill.yaml @@ -7,7 +7,7 @@ license: Apache-2.0 aea_version: '>=1.0.0, <2.0.0' fingerprint: __init__.py: bafybeie3oujhxxdr5s2lvc6cosbysezqycagw5mbwvxjw24k3dzcbtgg5m - behaviours.py: bafybeihuxzvd2hk27cebcazmudclzdtdr7mjpejqou2q3xbkxlftlso37y + behaviours.py: bafybeih35xwfoigo5c5demf53bxkcbptfks5qzti7rkuokwec4nirljbli dialogues.py: bafybeifmmpyiwetlcgykczsq4dgwvm7tipdupf2rwcndg5cmtm7jfoxwxm fsm_specification.yaml: bafybeicjj2blynjtxejcjkr3fmb5mlvfxu4zpymqwurdciqvj5biz37ruu handlers.py: bafybeiaufft2fwbbjbbc77md6xkq7prnzzi2nkkm2fipapgx54myabmb7y diff --git a/packages/valory/skills/twitter_scoring_abci/skill.yaml b/packages/valory/skills/twitter_scoring_abci/skill.yaml index b3ca6d77..357a0d77 100644 --- a/packages/valory/skills/twitter_scoring_abci/skill.yaml +++ b/packages/valory/skills/twitter_scoring_abci/skill.yaml @@ -32,7 +32,7 @@ protocols: - valory/contract_api:1.0.0:bafybeidgu7o5llh26xp3u3ebq3yluull5lupiyeu6iooi2xyymdrgnzq5i skills: - valory/abstract_round_abci:0.1.0:bafybeigjddhk7epta7xpnfvv426xedff5abh4xlkwi6cqgp4vkutgkvydm -- valory/decision_making_abci:0.1.0:bafybeiem7f6g5d72xbtfus52sypg5rykqzf5dzonoxx4s6aonewwmv3jrm +- valory/decision_making_abci:0.1.0:bafybeibovigvsxoq2huixbpeb7z5mxfvkwzf2zltveibj55eqbaepy2a74 - valory/mech_interact_abci:0.1.0:bafybeib4vn6m2yumwoclh5aatcdt5yxcjc5owxmxy5o7t3nfzormgwkr64 behaviours: main: diff --git a/scripts/check_staking.py b/scripts/check_staking.py index a4a0747b..01f63d3b 100644 --- a/scripts/check_staking.py +++ b/scripts/check_staking.py @@ -132,6 +132,11 @@ def get_contract_info() -> Dict: contract_info = STAKING_CONTRACTS + table = Table(title="Contribute staking contracts") + columns = ["Name", "Adress", "Epoch", "Epoch end", "Used slots"] + + for column in columns: + table.add_column(column) for contract_name, contract_data in STAKING_CONTRACTS.items(): staking_token_contract = load_contract( @@ -148,8 +153,21 @@ def get_contract_info() -> Dict: contract_info[contract_name]["used_slots"] = len(ids) contract_info[contract_name]["free_slots"] = contract_data["slots"] - len(ids) + row = [ + contract_name, + contract_data["address"], + str(epoch), + next_epoch_start.strftime("%Y-%m-%d %H:%M:%S"), + f"{len(ids):3d} / {contract_data['slots']:3d}" + ] + table.add_row(*row, style=GREEN) + + console = Console() + console.print(table, justify="center") + return contract_info + def get_user_info(user_data: Dict, contract_info: Dict, contributors_contract: Contract) -> Dict: # pylint: disable=too-many-locals """Get user info"""