Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add quickstart scripts #690

Open
wants to merge 19 commits into
base: fix/meme-staging
Choose a base branch
from

Conversation

OjusWiZard
Copy link
Member

Proposed changes

Add the quickstart CLI commands

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Comment on lines +62 to +68

# TODO: These links may break in the future, use a more robust approach
MECH_CONTRACT_JSON_URL = "https://raw.githubusercontent.com/valory-xyz/mech/refs/tags/v0.8.0/packages/valory/contracts/agent_mech/build/AgentMech.json"
STAKING_TOKEN_INSTANCE_ABI_PATH = 'https://raw.githubusercontent.com/valory-xyz/trader/refs/tags/v0.23.0/packages/valory/contracts/staking_token/build/StakingToken.json'
MECH_ACTIVITY_CHECKER_JSON_URL = 'https://raw.githubusercontent.com/valory-xyz/autonolas-staking-programmes/refs/heads/main/abis/0.8.25/SingleMechActivityChecker.json'
SERVICE_REGISTRY_TOKEN_UTILITY_JSON_URL = "https://raw.githubusercontent.com/valory-xyz/open-autonomy/refs/tags/v0.18.4/packages/valory/contracts/service_registry_token_utility/build/ServiceRegistryTokenUtility.json"
MECH_AGENT_FACTORY_JSON_URL = "https://raw.githubusercontent.com/valory-xyz/ai-registry-mech/main/abis/0.8.25/AgentFactory.json"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't we using the built-in framework contracts ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean from open-autonomy? They are not there.

Comment on lines 89 to 104
"quickstart_beta_hobbyist": "0x389B46c259631Acd6a69Bde8B6cEe218230bAE8C",
"quickstart_beta_hobbyist_2": "0x238EB6993b90a978ec6AAD7530d6429c949C08DA",
"quickstart_beta_expert": "0x5344B7DD311e5d3DdDd46A4f71481bD7b05AAA3e",
"quickstart_beta_expert_2": "0xb964e44c126410df341ae04B13aB10A985fE3513",
"quickstart_beta_expert_3": "0x80faD33Cadb5F53f9D29F02Db97D682E8b101618",
"quickstart_beta_expert_4": "0xaD9d891134443B443D7F30013c7e14Fe27F2E029",
"quickstart_beta_expert_5": "0xE56dF1E563De1B10715cB313D514af350D207212",
"quickstart_beta_expert_6": "0x2546214aEE7eEa4bEE7689C81231017CA231Dc93",
"quickstart_beta_expert_7": "0xD7A3C8b975f71030135f1a66e9e23164d54fF455",
"quickstart_beta_expert_8": "0x356C108D49C5eebd21c84c04E9162de41933030c",
"quickstart_beta_expert_9": "0x17dBAe44BC5618Cc254055b386A29576b4F87015",
"quickstart_beta_expert_10": "0xB0ef657b8302bd2c74B6E6D9B2b4b39145b19c6f",
"quickstart_beta_expert_11": "0x3112c1613eAC3dBAE3D4E38CeF023eb9E2C91CF7",
"quickstart_beta_expert_12": "0xF4a75F476801B3fBB2e7093aCDcc3576593Cc1fc",
"quickstart_beta_expert_15": "0x88eB38FF79fBa8C19943C0e5Acfa67D5876AdCC1",
"quickstart_beta_expert_16": "0x6c65430515c70a3f5E62107CC301685B7D46f991",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@truemiller will these be passed to Pearl UI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, we should check the same after this is achieved

hash: str
image: str
description: str
service_version: str
home_chain: str
staking_programs: t.Dict[str, str]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I need you to check a service template of the quickstart
I'm basically planning to move these staking_programs mapping from operate/ledger/profiles.py:STAKING to the service template. So that the middleware is configurable and agent-agnostic

Copy link
Collaborator

@jmoreira-valory jmoreira-valory Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense moving the staking program to the service template, but the staking contract addresses are per chain. I.e., let's not assume they can only be made on the home chain.

Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
@@ -75,7 +82,7 @@ def __init__(
) -> None:
"""Initialize object."""
super().__init__()
self._path = (home or (Path.cwd() / OPERATE)).resolve()
self._path = (home or OPERATE_HOME).resolve()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the removal of Path.cwd not cause any issue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPERATE_HOME is already defined as Path.cwd() / OPERATE in operate/constants.py

operate/cli.py Outdated Show resolved Hide resolved
OjusWiZard and others added 5 commits January 23, 2025 18:49
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
Signed-off-by: OjusWiZard <ojuswimail@gmail.com>
* added validator and slots avail handler

* changes as per comments on PR

* updated PR with latest#2 comments

* removing test setup

* removed self.logger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants