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: ibc transfer action #14

Merged

Conversation

KacperKoza343
Copy link
Collaborator

@KacperKoza343 KacperKoza343 commented Jan 8, 2025

How to test

Open Keplr wallet and click Add Wallet
image
Create new one with recovery phrases and save them.
Select Osomosis Testnet and Neutron Testnet chains:
image
Add OSMO to your osmosis account: https://faucet.testnet.osmosis.zone/
When your wallet has OSMOS account selected set it's recovery phrases in project's envs and also two testnests

COSMOS_RECOVERY_PHRASE=indicate slight just ....
COSMOS_AVAILABLE_CHAINS=osmosistestnet,neutrontestnet

Start Eliza
pnpm run start --characters="../characters/cosmosHelper.character.json"

Try to make IBC transfer with prompt like that:

Make an IBC transfer 0.0001 OSMO to neutron1f0y9ajzslq24qja455l7eq7fq3hv9c8548u2q8 from osmosistestnet to neutrontestnet

or be more explicit if it doesn't work

Make an IBC transfer 0.0001 OSMO to neutron1f0y9ajzslq24qja455l7eq7fq3hv9c8548u2q8 from osmosistestnet to neutrontestnet  do that with COSMOS_IBC_TRANSFER 

This allows you to bridge tokens between your wallets like in Keplr wallet:
image
This should be a result in wallet:
image

@KacperKoza343 KacperKoza343 marked this pull request as draft January 8, 2025 12:52
import { MsgTransfer } from "interchain/dist/codegen/ibc/applications/transfer/v1/tx";
import { IBCTransferActionParams } from "../types.ts";

export class CosmosIBCTransferAction implements ICosmosActionService {
Copy link
Collaborator

Choose a reason for hiding this comment

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

if you have ibc-transfer-action-service name of file, I think the class should be IBCTransferActionService

@KacperKoza343 KacperKoza343 force-pushed the ELIZAAI-17-cross-chain-bridging-ibc-or-external-bridge branch from 860b0f6 to 2c4b037 Compare January 9, 2025 15:35
@KacperKoza343 KacperKoza343 marked this pull request as ready for review January 9, 2025 15:55
@@ -7,15 +7,17 @@ This plugin provides actions and utilities for interacting with Cosmos-compatibl
## Development

Prepare Eliza according to [README](../../README.md)
Add variables required for `@ai16z/plugin-cosmos` :
```
Add variables required for `@ai16z/plugin-cosmos` :
Copy link
Collaborator

Choose a reason for hiding this comment

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

name of package should be changed to @elizaos/plugin-cosmos

Comment on lines 221 to 224
"COSMOS_TRANSFER",
"COSMOS_SEND_TOKENS",
"COSMOS_TOKEN_TRANSFER",
"COSMOS_MOVE_TOKENS",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that these similes should be unique between actions but some of them are the same as for COSMOS_TRANSFER action (action from first PR).

@stanislawkurzypBD
Copy link
Collaborator

stanislawkurzypBD commented Jan 13, 2025

This PR should also change "@ai16z/plugin-cosmos": "workspace:*" to "@elizaos/plugin-cosmos": "workspace:*" in eliza/agent/package.json and corresponding import in eliza/src/index.ts

@KacperKoza343 KacperKoza343 force-pushed the ELIZAAI-17-cross-chain-bridging-ibc-or-external-bridge branch from 3cc478c to 64e6cb2 Compare January 13, 2025 10:05
@KacperKoza343
Copy link
Collaborator Author

This PR should also change "@ai16z/plugin-cosmos": "workspace:*" to "@elizaos/plugin-cosmos": "workspace:*" in eliza/agent/package.json and corresponding import in eliza/src/index.ts

this branch is merged with current develop that already has this changes

@KacperKoza343 KacperKoza343 merged commit 480e4f6 into develop Jan 14, 2025
7 checks passed
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.

4 participants