Add swaps with PlunderSwap plugin and wrap/unwrap of WZIL. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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,and pick any random private key, e.g.,
You can get ZIL for the account from https://dev-wallet.zilliqa.com/faucet?network=testnet.
Actions
GET_SWAP_TOKENS
GET_SWAP_BALANCE
GET_SWAP_QUOTE
PERFORM_SWAP
https://otterscan.testnet.zilliqa.com/tx/0x57dcbea402f860be264cfc3761b7a36f555114707cf29ef3295c3d1c350aa971
https://otterscan.testnet.zilliqa.com/tx/0x6b012de48a953e95105c1780b5bd818b64ec8f464bf73310c2f72560cf27c648
WRAP_ZIL
https://otterscan.testnet.zilliqa.com/tx/0xf1c733a9495286bbd2a68de2357dcad361148a2fcaabd937bd8b940b4ae5f48a
UNWRAP_ZIL
https://otterscan.testnet.zilliqa.com/tx/0x46dc6f7e26a00e9382473f8f4a85c065e00280a75f7e4c250ef74f0ebefe58c4