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

Add swaps with PlunderSwap plugin and wrap/unwrap of WZIL. #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtbc
Copy link

@mtbc mtbc commented Feb 12, 2025

Adds to the Zilliqa plugin the functionality offered by https://www.npmjs.com/package/@goat-sdk/plugin-zilliqa to convert tokens between ZIL and WZIL and to swap between WZIL and other tokens on the Zilliqa blockchain. Uses a second wallet class, a variant that fits the expectations of the plugin. Supersedes elizaOS/eliza#3267. An introductory video:

Eliza-PlunderSwap.mp4

Deployment

Because the develop branch of the code for Eliza's agent no longer called the plugin's constructor, this was tested in with the help of elizaOS/eliza#3458.

In .env you can use,

ZILLIQA_PROVIDER_URL=https://api.testnet.zilliqa.com

and pick any random private key, e.g.,

ZILLIQA_PRIVATE_KEY=0x04970afc7a0aaaa9c9884231d48e89c25fb67ebc96573ed36728d3f1bd0c4549

You can get ZIL for the account from https://dev-wallet.zilliqa.com/faucet?network=testnet.

Actions

GET_SWAP_TOKENS

tokens

GET_SWAP_BALANCE

balance

GET_SWAP_QUOTE

quote

PERFORM_SWAP

swap

https://otterscan.testnet.zilliqa.com/tx/0x57dcbea402f860be264cfc3761b7a36f555114707cf29ef3295c3d1c350aa971
https://otterscan.testnet.zilliqa.com/tx/0x6b012de48a953e95105c1780b5bd818b64ec8f464bf73310c2f72560cf27c648

WRAP_ZIL

wrap

https://otterscan.testnet.zilliqa.com/tx/0xf1c733a9495286bbd2a68de2357dcad361148a2fcaabd937bd8b940b4ae5f48a

UNWRAP_ZIL

unwrap

https://otterscan.testnet.zilliqa.com/tx/0x46dc6f7e26a00e9382473f8f4a85c065e00280a75f7e4c250ef74f0ebefe58c4

@mtbc mtbc force-pushed the add-plunderswap-wzil branch 3 times, most recently from d0a73e8 to c1513ad Compare February 17, 2025 10:08
@mtbc mtbc force-pushed the add-plunderswap-wzil branch from c1513ad to 670c669 Compare February 17, 2025 10:08
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.

1 participant