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

Fix PlunderSwap plugin API: remove ignored tool parameter. #313

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

mtbc
Copy link
Contributor

@mtbc mtbc commented Feb 5, 2025

Relates to:

No issue/ticket.

Background

What does this PR do?

Removes toAddress parameter from the plunderswap_swap tool: it is misleading to offer it because the tool ignores it.

(For safety, the tool's actual implementation always deposits currency back into the user's wallet. We don't want the user accidentally giving somebody else the tokens because their address was in the conversation history.)

Testing

Use the instructions from the description of elizaOS/eliza#3267 to get going with ElizaOS. Locally, adjust packages/plugin-zilliqa/package.json to have ElizaOS' @goat-sdk/plugin-plunderswap dependency link to wherever this branch's typescript/packages/plugins/plunderswap is.

Try doing any swap with plunderswap_swap and see that the tokens are deposited back into your wallet.

Detailed testing results

swap-1

swap-2

Links to transactions:

  1. Wrap the ZIL: https://otterscan.testnet.zilliqa.com/tx/0x479c2970d396b60651069483ca27d6da2f6bf1e346a552363cc5e2740eb29dba
  2. Do the swap: approve spending in https://otterscan.testnet.zilliqa.com/tx/0x1c6d647cb7e651c5d4d0ef799af2f8d5422e29945b9e9b8b9391dd6d7763a377 then swap in https://otterscan.testnet.zilliqa.com/tx/0xfb8d3e9dad171b96820c3c7cd5f426c6e8f02cc2114c8fd20c813ebdc0cb51a6.

Docs

My changes do not require a change to the project documentation.

For plugins

  • I have tested this change locally with key pair wallets
  • I have tested this change locally with hosted wallets (e.g. Crossmint Smart Wallets, etc.)
  • Package exists in the goat workspace file

Discord username

none

Copy link

changeset-bot bot commented Feb 5, 2025

⚠️ No Changeset found

Latest commit: 43b45eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@0xaguspunk 0xaguspunk merged commit 3a95d40 into goat-sdk:main Feb 11, 2025
2 checks passed
@mtbc mtbc deleted the plunderswap-plugin-swap-toAddress branch February 11, 2025 08:43
zoli added a commit to zoli/goat that referenced this pull request Feb 11, 2025
* main:
  Release packages (goat-sdk#328)
  Feat/safe wallet readme update (goat-sdk#324)
  Fix PlunderSwap plugin API: remove ignored tool parameter. (goat-sdk#313)
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.

2 participants