Skip to content

Commit

Permalink
Merge pull request #115 from dvilelaf/fix/round_info
Browse files Browse the repository at this point in the history
Fix/round info
  • Loading branch information
dvilelaf authored Dec 20, 2024
2 parents 0335ecf + 2d03575 commit 84b97d3
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 98 deletions.
4 changes: 2 additions & 2 deletions packages/dvilela/agents/memeooorr/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ skills:
- valory/transaction_settlement_abci:0.1.0:bafybeigh2vkt74jrad5gtsczrgqcuhcqe7jkgjy7jdw56yamlzwwnaymjy
- valory/registration_abci:0.1.0:bafybeib3n6vqkfbrcubcbliebjnuwyywdinxkbzt76n6gbn2kg7ace47dq
- valory/reset_pause_abci:0.1.0:bafybeihkj6lmaypspyxe5qqrjgnolyck62pyvqoylr24ab6ue4steqcw7e
- dvilela/memeooorr_abci:0.1.0:bafybeidyyjc7qesjslym6t3cc2b3vmhuyzmbiu6qycaoq3iu6tyatihivi
- dvilela/memeooorr_chained_abci:0.1.0:bafybeiamvw6iq7cp5nazxrr55xf7luer3mid2kxx5zka3r6eiugrz4kpb4
- dvilela/memeooorr_abci:0.1.0:bafybeigegmsisv4p4pvswa4o4ee3jkzolhkq2zxjbzc5whmzlc4czcmm3a
- dvilela/memeooorr_chained_abci:0.1.0:bafybeiaeiey7apjsxzlewmsleh7oz5u565qrrax27ra53ukjvyxz7lafkm
default_ledger: ethereum
required_ledgers:
- ethereum
Expand Down
2 changes: 1 addition & 1 deletion packages/dvilela/services/memeooorr/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: bafybeiaekcmielp6mb4qvmo2twwkpmoun36bqajrh7wnnkcpdnia45ycl4
fingerprint_ignore_patterns: []
agent: dvilela/memeooorr:0.1.0:bafybeiemvdscxlq5364byr7jsib2k2fym6xhh46rjhyumag2akv6mmao7m
agent: dvilela/memeooorr:0.1.0:bafybeigfxu7enol76ycvbbm7pzxjw3t72habr6rvldxhumtejm3s73omau
number_of_agents: 1
deployment:
agent:
Expand Down
10 changes: 6 additions & 4 deletions packages/dvilela/skills/memeooorr_abci/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ def setup(self) -> None:
# Load round info for the healthcheck
fsm = load_fsm_spec()

self.rounds_info: Dict = { # pylint: disable=attribute-defined-outside-init
camel_to_snake(k): v for k, v in ROUNDS_INFO.items()
}
self.rounds_info: Dict = ( # pylint: disable=attribute-defined-outside-init
ROUNDS_INFO
)
for source_info, target_round in fsm["transition_func"].items():
source_round, event = source_info[1:-1].split(", ")
self.rounds_info[camel_to_snake(source_round)]["transitions"][
source_round = camel_to_snake(source_round)
self.rounds_info[source_round]["transitions"] = {} # type: ignore
self.rounds_info[source_round]["transitions"][ # type: ignore
event.lower()
] = camel_to_snake(target_round)

Expand Down
141 changes: 57 additions & 84 deletions packages/dvilela/skills/memeooorr_abci/rounds_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,139 +21,112 @@


ROUNDS_INFO = {
"ActionDecisionRound": {
"name": "Taking a decision on what to do with the token",
"description": "Takes a decision about whether to interact with other tokens",
"transitions": {},
},
"ActionPreparationRound": {
"name": "Preparing the token action transaction",
"description": "Prepares a transaction to unleash, hearth, collect or burn a token",
"transitions": {},
},
"ActionTweetRound": {
"name": "Tweeting about the token action",
"description": "Publishes a tweet announcing the performed token action",
"transitions": {},
},
"AnalizeFeedbackRound": {
"name": "Analyzing Twitter feedback",
"description": "Analyzes responses to agent tweets and extracts feedback from them",
"transitions": {},
},
"CheckFundsRound": {
"name": "Checking funds",
"description": "Checks the agetn has enough funds to send a transaction",
"transitions": {},
},
"CheckLateTxHashesRound": {
"action_decision_round": {
"name": "Deciding Next Action",
"description": "Evaluates current meme tokens and chooses a strategic move—investing, unleashing, collecting, or doing nothing—to optimise returns",
},
"action_preparation_round": {
"name": "Preparing Action Transaction",
"description": "Constructs the exact on-chain command for the chosen token action, ensuring all parameters are set for successful execution",
},
"action_tweet_round": {
"name": "Posting Action Tweet",
"description": "Notifies followers about the executed token action, reinforcing engagement and transparency in the ongoing narrative",
},
"analize_feedback_round": {
"name": "Analyzing Feedback",
"description": "Examines audience reactions and engagement metrics to decide whether to refine the persona or proceed with token creation",
},
"check_funds_round": {
"name": "Checking Funds",
"description": "Verifies available currency to ensure the feasibility of deploying tokens or conducting further actions",
},
"check_late_tx_hashes_round": {
"name": "Checking late transaction hashes",
"description": "Checks late transaction hashes",
"transitions": {},
},
"CheckTransactionHistoryRound": {
"check_transaction_history_round": {
"name": "Checking the transaction history",
"description": "Checks the transaction history",
"transitions": {},
},
"CollectFeedbackRound": {
"name": "Collecting feedback from Twitter",
"description": "Collects responses to agent tweets",
"transitions": {},
"collect_feedback_round": {
"name": "Collecting Feedback",
"description": "Compiles replies from the latest tweet, extracting conditions and sentiments that guide future persona or strategy adjustments",
},
"CollectSignatureRound": {
"collect_signature_round": {
"name": "Collecting agent signatures",
"description": "Collects agent signatures for a transaction",
"transitions": {},
},
"DeploymentRound": {
"name": "Preparing a token deployment",
"description": "Prepares a token deployment transaction",
"transitions": {},
"deployment_round": {
"name": "Deploying Meme Token",
"description": "Initiates the on-chain setup of a new meme token based on the assessed demand, preparing it for liquidity and community interaction",
},
"EngageRound": {
"engage_round": {
"name": "Engaging with other agents",
"description": "Responds to tweets from other agents",
"transitions": {},
},
"FinalizationRound": {
"finalization_round": {
"name": "Sending a transaction",
"description": "Sends a transaction for mining",
"transitions": {},
},
"LoadDatabaseRound": {
"name": "Loading the database",
"description": "Loads the database",
"transitions": {},
"load_database_round": {
"name": "Loading Database",
"description": "Retrieves saved persona and latest tweet data from storage, ensuring the activity restarts with consistent context",
},
"PostAnnouncementRound": {
"name": "Twitting about the token deployment",
"description": "Publishes a tweet about the token deployment",
"transitions": {},
"post_announcement_round": {
"name": "Posting Announcement",
"description": "Publishes a follow-up tweet to inform followers about newly launched tokens, highlighting their significance and availability",
},
"PostTweetRound": {
"name": "Publishing a tweet",
"description": "Publishes a tweet",
"transitions": {},
"post_tweet_round": {
"name": "Posting New Tweet",
"description": "Generates and shares a fresh tweet aligned with the persona, initiating engagement and gathering audience responses",
},
"PullMemesRound": {
"name": "Pulling other tokens from the subgraph",
"description": "Pulls other tokens from the subgraph",
"transitions": {},
"pull_memes_round": {
"name": "Pulling Meme Data",
"description": "Fetches updated information on existing meme tokens, determining which may benefit from actions like hearting or unleashing",
},
"RandomnessTransactionSubmissionRound": {
"randomness_transaction_submission_round": {
"name": "Getting some randomness",
"description": "Gets randomness from a decentralized randomness source",
"transitions": {},
},
"RegistrationRound": {
"registration_round": {
"name": "Registering agents ",
"description": "Initializes the agent registration process",
"transitions": {},
},
"RegistrationStartupRound": {
"registration_startup_round": {
"name": "Registering agents at startup",
"description": "Initializes the agent registration process",
"transitions": {},
},
"ResetAndPauseRound": {
"reset_and_pause_round": {
"name": "Cleaning up and sleeping for some time",
"description": "Cleans up and sleeps for some time before running again",
"transitions": {},
},
"ResetRound": {
"reset_round": {
"name": "Cleaning up and resetting",
"description": "Cleans up and resets the agent",
"transitions": {},
},
"SelectKeeperTransactionSubmissionARound": {
"select_keeper_transaction_submission_a_round": {
"name": "Selecting an agent to send the transaction",
"description": "Selects an agent to send the transaction",
"transitions": {},
},
"SelectKeeperTransactionSubmissionBAfterTimeoutRound": {
"select_keeper_transaction_submission_b_after_timeout_round": {
"name": "Selecting an agent to send the transaction",
"description": "Selects an agent to send the transaction",
"transitions": {},
},
"SelectKeeperTransactionSubmissionBRound": {
"select_keeper_transaction_submission_b_round": {
"name": "Selecting an agent to send the transaction",
"description": "Selects an agent to send the transaction",
"transitions": {},
},
"SynchronizeLateMessagesRound": {
"synchronize_late_messages_round": {
"name": "Synchronizing late messages",
"description": "Synchronizes late messages",
"transitions": {},
},
"TransactionMultiplexerRound": {
"name": "Selecting next round",
"description": "Decides where to transition next based on the state previous to the transaction",
"transitions": {},
"transaction_multiplexer_round": {
"name": "Orchestrating Transactions",
"description": "Coordinates multiple blockchain operations into a coherent sequence, ensuring efficient and timely execution of strategic steps",
},
"ValidateTransactionRound": {
"validate_transaction_round": {
"name": "Validating the transaction",
"description": "Checks that the transaction was succesful",
"transitions": {},
"description": "Checks that the transaction was successful",
},
}
4 changes: 2 additions & 2 deletions packages/dvilela/skills/memeooorr_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ fingerprint:
behaviours.py: bafybeibdbimezloiomvsv3zgfdug4tw276gt7tb5agnezl2nuqcfcplscu
dialogues.py: bafybeiaygigeleloplgrsg2sovv463uvzk3zc2tupgazn4ak2vqcangksu
fsm_specification.yaml: bafybeif4kr2lnj4ppaaxveej2a3gq2gul6gicu2rar2yeyhg4mspqsikxy
handlers.py: bafybeigdxkm45w27sh7cpgiwuperjldql6oupbhxqtizhbwfv7abxe3dku
handlers.py: bafybeibnnxjczbaeqzxvg4s5mmrogzhgpswwwwpmw6gds6mltgrq27r67y
models.py: bafybeid5kwqwuxj3chu2ijkf4cily2bu3en2czqwhkf7kkzt7l5acov5du
payloads.py: bafybeibyukr3aewwlbx6c6xe43j6nhgdqwqdgbemswrsvnqp3ftqodvvmi
prompts.py: bafybeiguzllaoupwzyiob6iufx77czkj6a7xe3mdporjtrfnm5m4grzhbe
rounds.py: bafybeiezr7wrjl7k3ojvjqdbpp6vs7u2lmgwdjuhi62sy4hedpe4euwswq
rounds_info.py: bafybeieqaemvqwiwku7nlxkdebsqzldpvvidijf6wcwy7e3xbyz335jr6i
rounds_info.py: bafybeieepy67c2g7dtkeuueuldhvcpbeavvtkg36gmoempftiic2tqxb4y
fingerprint_ignore_patterns: []
connections:
- dvilela/kv_store:0.1.0:bafybeiekugvb2kan4342hliluxl3h5och3fjwqoafdyttpcn57evvyztq4
Expand Down
2 changes: 1 addition & 1 deletion packages/dvilela/skills/memeooorr_chained_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ skills:
- valory/reset_pause_abci:0.1.0:bafybeihkj6lmaypspyxe5qqrjgnolyck62pyvqoylr24ab6ue4steqcw7e
- valory/transaction_settlement_abci:0.1.0:bafybeigh2vkt74jrad5gtsczrgqcuhcqe7jkgjy7jdw56yamlzwwnaymjy
- valory/termination_abci:0.1.0:bafybeifi2uodnrjsrivj53g3sjutocmyusbx6mlsb6oanqdyt2mfbyvusy
- dvilela/memeooorr_abci:0.1.0:bafybeidyyjc7qesjslym6t3cc2b3vmhuyzmbiu6qycaoq3iu6tyatihivi
- dvilela/memeooorr_abci:0.1.0:bafybeigegmsisv4p4pvswa4o4ee3jkzolhkq2zxjbzc5whmzlc4czcmm3a
behaviours:
main:
args: {}
Expand Down
8 changes: 4 additions & 4 deletions packages/packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"contract/dvilela/meme_factory/0.1.0": "bafybeibkuiylm2qiivyrlue6opw3jxuyrh55f3r6lx5bqk7lnx6uc4yasu",
"contract/dvilela/service_registry/0.1.0": "bafybeie2rrgzcjehlp2feff6bhkuindxzrnuwxe2jcrsy2thcdtrsp2o24",
"connection/dvilela/twikit/0.1.0": "bafybeibglc42u6krxzzhdsnixhdwblefcolhulzckyfmek4hg4chvgpwza",
"skill/dvilela/memeooorr_abci/0.1.0": "bafybeidyyjc7qesjslym6t3cc2b3vmhuyzmbiu6qycaoq3iu6tyatihivi",
"skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiamvw6iq7cp5nazxrr55xf7luer3mid2kxx5zka3r6eiugrz4kpb4",
"agent/dvilela/memeooorr/0.1.0": "bafybeiemvdscxlq5364byr7jsib2k2fym6xhh46rjhyumag2akv6mmao7m",
"service/dvilela/memeooorr/0.1.0": "bafybeidt5vao63jarowkqzjtrwiw6b42gponznwzesll3vdcmtcmpffc5u"
"skill/dvilela/memeooorr_abci/0.1.0": "bafybeigegmsisv4p4pvswa4o4ee3jkzolhkq2zxjbzc5whmzlc4czcmm3a",
"skill/dvilela/memeooorr_chained_abci/0.1.0": "bafybeiaeiey7apjsxzlewmsleh7oz5u565qrrax27ra53ukjvyxz7lafkm",
"agent/dvilela/memeooorr/0.1.0": "bafybeigfxu7enol76ycvbbm7pzxjw3t72habr6rvldxhumtejm3s73omau",
"service/dvilela/memeooorr/0.1.0": "bafybeie5xgroxr7ie2okpd3oph4mir3pd3v4v6hdcasfe2g4qnneauetom"
},
"third_party": {
"protocol/open_aea/signing/1.0.0": "bafybeihv62fim3wl2bayavfcg3u5e5cxu3b7brtu4cn5xoxd6lqwachasi",
Expand Down

0 comments on commit 84b97d3

Please sign in to comment.