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: update agent addresses #173

Merged
merged 28 commits into from
Oct 6, 2023
Merged

feat: update agent addresses #173

merged 28 commits into from
Oct 6, 2023

Conversation

Alejandro-Morales
Copy link
Contributor

@Alejandro-Morales Alejandro-Morales commented Sep 27, 2023

Agents have a new test attribute that will default True when initialized. This indicates if agent will be registered on testnet or mainnet contracts.

When agents want to communicate with other agents, they can use agent.identifier that will contain a network prefix + agent.address:

Addresses with prefix:

  • test-agent:// will resolve via testnet contracts
  • agent:// will resolve via mainnet contracts
  • agent addresses without any prefix will resolve to testnet to preserve backwards compatibility

python/src/uagents/agent.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jrriehl jrriehl left a comment

Choose a reason for hiding this comment

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

Looks good!

@jrriehl jrriehl enabled auto-merge (squash) October 6, 2023 08:40
@jrriehl jrriehl merged commit 79d232f into main Oct 6, 2023
8 checks passed
@jrriehl jrriehl deleted the feat/update-agent-addresses branch October 6, 2023 08:44
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.

Update almanac resolver to resolve both test-agent:// and agent:// addresses
2 participants