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

Adding plugin for Cronos ZKEVM #1128

Closed
wants to merge 7 commits into from

Conversation

thomas-nguy
Copy link
Contributor

@thomas-nguy thomas-nguy commented Dec 16, 2024

Relates to:

ZKSYNC integration PR

Risks

Low
Main implementation risk is that the Plugin doesn't work correctly.

Background

Cronos zkEVM is a L2 zk chain network by CronosLabs and based on the zksync stack framework. This PR implements a plugin for agents to be able to interact with Cronos ZKEVM.

In this first version, only the transfer function is supported. Further work will extend this functionality.

What does this PR do?

Features (non-breaking change which adds functionality)

What kind of change is this?

Features (non-breaking change which adds functionality)

Why are we doing this? Any context or related work?

We're seeing a huge proliferation of AI agents being able to manage value on-chain. This is similar conceptually to these plugins (e.g. plugin-solana and others)

Documentation changes needed?

This plugin follows the standards set by other crypto integrations, including things like the SEND_TOKENS action. Changes to the overall project documentation don't seem to be required.

Testing

Where should a reviewer start?

Most of the changes are in plugin-cronoszkevm

Detailed testing steps

In .env you should set the value for CRONOSZKEVM_ADDRESS (this is the public address for the agent account) and CRONOSZKEVM_PRIVATE_KEY (private key for the same account).
To test the transfer function properly, this address needs tokens. Crypto.com can be used to send ZKCRO directly to an address on Cronos zkEVM

Run the agent and prompt it with: "send 0.5 ZKCRO to " - e.g. "send 1 ZKCRO to 0xee0c40F86544a8b0616BC827728f714a8B4cEeE7"

Assuming you had 1 ZKCRP to send, the agent will confirm and respond with the tx hash, e.g. Transfer completed successfully! "tx: 0x45759cf3e76d26610154a094c87572fbd7f5ef909f62c4ea13f7defb0d87cf0b"
The tx hash can be checked on the Cronos zkEVM explorer (https://explorer.zkevm.cronos.org/)

@odilitime odilitime added the Plugin_new Mark PRs that are a new plugin label Dec 17, 2024
@odilitime odilitime deleted the branch elizaOS:develop December 17, 2024 02:33
@odilitime odilitime closed this Dec 17, 2024
@odilitime odilitime reopened this Dec 17, 2024
@shakkernerd shakkernerd deleted the branch elizaOS:develop December 17, 2024 03:45
@odilitime odilitime reopened this Dec 17, 2024
@shakkernerd shakkernerd deleted the branch elizaOS:develop December 22, 2024 07:01
@odilitime odilitime reopened this Dec 22, 2024
@samarth30
Copy link
Collaborator

@thomas-nguy I noticed some conflicts in your branch. I’ve resolved a few and raised a new PR to address them. I’ll be closing this PR for now. Let me know if you have any questions Happy to help and thanks again for your contribution !

#1464

@samarth30 samarth30 closed this Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin_new Mark PRs that are a new plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants