Skip to content

Commit 8e467ff

Browse files
committed
update: add IBC transfer action to README
1 parent 2c4b037 commit 8e467ff

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

packages/plugin-cosmos/README.md

+49-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ This plugin provides actions and utilities for interacting with Cosmos-compatibl
77
## Development
88

99
Prepare Eliza according to [README](../../README.md)
10-
Add variables required for `@ai16z/plugin-cosmos` :
11-
```
10+
Add variables required for `@ai16z/plugin-cosmos` :
11+
12+
```
1213
COSMOS_RECOVERY_PHRASE=your recovery phrase words
1314
COSMOS_AVAILABLE_CHAINS=chain1,chain2,chain3
14-
```
15+
```
1516

1617
Ensure the appropriate environment variables are added for the plugin. If they are correctly configured, the project will run with `@ai16z/plugin-cosmos`
1718

18-
Run Eliza
19+
Run Eliza
20+
1921
```
2022
pnpm run dev
2123
```
@@ -26,13 +28,12 @@ pnpm run dev
2628

2729
To start using the plugin, you need to provide your **Cosmos account recovery phrases** and the list of **available chains**. Add the following to your `.env` file:
2830

29-
3031
```env
3132
COSMOS_RECOVERY_PHRASE=your recovery phrase words
3233
COSMOS_AVAILABLE_CHAINS=chain1,chain2,chain3
3334
```
34-
Ensure that the chain names in `COSMOS_AVAILABLE_CHAINS` match the identifiers from the [chain-registry](https://github.com/cosmos/chain-registry) library for compatibility.
3535

36+
Ensure that the chain names in `COSMOS_AVAILABLE_CHAINS` match the identifiers from the [chain-registry](https://github.com/cosmos/chain-registry) library for compatibility.
3637

3738
### Using the Cosmos Helper Character
3839

@@ -51,9 +52,11 @@ To use the character, pass it with the `--characters` flag:
5152
---
5253

5354
### Custom chain configuration
55+
5456
Plugin allows you to pass you custom chain config to `createCosmosPlugin` function invoked in `../agent/src/index`.
5557

5658
Your custom configuration fulfills the interfaces from `chain-registry`
59+
5760
```
5861
import type { assets, chains } from "chain-registry";
5962
@@ -99,6 +102,46 @@ Yes
99102

100103
4. Action executed.
101104

105+
### Token IBC Transfer
106+
107+
This plugin supports a token transfer action, which allows users to transfer tokens between addresses on Cosmos-compatible blockchains between different chains.
108+
109+
#### Requirements
110+
111+
You need to set both chain that you want to transfer founds between in env file. For example:
112+
113+
```
114+
COSMOS_AVAILABLE_CHAINS=osmosistestnet,neutrontestnet
115+
```
116+
117+
If you want to transfer your tokens between Osmosis Testnet and Neutron Testnet
118+
119+
#### Example Prompts
120+
121+
Below are examples of how the ibc transfer action can be initiated and confirmed:
122+
123+
**Example**
124+
125+
1. User input:
126+
127+
```
128+
Make an IBC transfer 0.0001 OSMO to neutron1nk3uuw6zt5t5aqw5fvujkd54sa4uws9xg2nk82 from osmosistestnet to neutrontestnet
129+
```
130+
131+
2. Plugin response:
132+
133+
```
134+
Before making the IBC transfer, I would like to confirm the details. You would like to transfer 0.0001 OSMO from osmosistestnet to neutrontestnet, specifically to the address neutron1nk3uuw6zt5t5aqw5fvujkd54sa4uws9xg2nk82, is that correct?
135+
```
136+
137+
3. User confirmation:
138+
139+
```
140+
Yes
141+
```
142+
143+
4. Action executed.
144+
102145
---
103146

104147
## Contribution

0 commit comments

Comments
 (0)