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 Treasure Plugin #1247

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

karelvuong
Copy link

@karelvuong karelvuong commented Dec 19, 2024

Relates to:

Adds Treasure support for Eliza agents.

Risks

Low

Background

What does this PR do?

Treasure is a gaming-centric L2 rollup built on ZKsync. This PR adds support for Eliza to interact with the Treasure mainnet, with logic/implementation borrowed from #1225 and #1128.

Initially, only the transfer function has been supported with additional features to come to hook into the Treasure Development Kit (TDK), Magicswap, and other Treasure platform features.

What kind of change is this?

Feature

Documentation changes needed?

My changes do not require a change to the project documentation.

Testing

Where should a reviewer start?

Spin up an agent with the treasure plugin + review plugin-treasure.

Detailed testing steps

  1. In .env, should set the value for TREASURE_ADDRESS (public address for the agent account), TREASURE_PRIVATE_KEY (private key for the same account), and TREASURE_RPC_URL as https://rpc.treasure.lol.
    To test the transfer function properly, this address needs tokens. Treasure Bridge can be used to bridge MAGIC directly from arb1 to an address on treasure.
  2. Run the agent and prompt it with: "Send 0.1 MAGIC to " - e.g. "send 0.1 MAGIC to 0x7A6a48b8e7BD3451Fc57f01Ad9Aaea62cdf5956E"
  3. Assuming you had 1 MAGIC to send, the agent will confirm and respond with the tx hash, e.g. "Successfully sent 1 MAGIC to 0x7A6a48b8e7BD3451Fc57f01Ad9Aaea62cdf5956E
    Transaction: 0x45759cf3e76d26610154a094c87572fbd7f5ef909f62c4ea13f7defb0d87cf0b"
    The tx hash can be checked on the Treasure Block Explorer (https://treasurescan.io/)

@karelvuong karelvuong reopened this Dec 23, 2024
@karelvuong
Copy link
Author

@odilitime would love your eyes on this 🙏 - similar basic implementation to other ZKsync chains like Abstract, Era, etc.

@wtfsayo
Copy link
Collaborator

wtfsayo commented Jan 6, 2025

@odilitime would love your eyes on this 🙏 - similar basic implementation to other ZKsync chains like Abstract, Era, etc.

will be reviewing

@wtfsayo wtfsayo self-requested a review January 6, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants