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

Issue with Bridging and Swapping Tokens in plugin-evm #3234

Open
AzanAdnan23 opened this issue Feb 4, 2025 · 2 comments
Open

Issue with Bridging and Swapping Tokens in plugin-evm #3234

AzanAdnan23 opened this issue Feb 4, 2025 · 2 comments

Comments

@AzanAdnan23
Copy link

AzanAdnan23 commented Feb 4, 2025

Description:
I am encountering issues with bridging and swapping tokens using the plugin-evm. The only function that seems to be working correctly is the transfer function.

Can you confirm if the plugin swap and bridge functionality can be tested on a testnet like Sepolia or Base Sepolia? If not, is there an alternative way to test these functionalities before deploying to mainnet?

Error Details

SWAP Issue

Swap Error

[2025-02-04 15:24:28] ERROR: Error in swap handler: Address "ETH" is invalid.

- Address must be a hex value of 20 bytes (40 hex characters).
- Address must match its checksum counterpart.

Raw Call Arguments:
  to:    ETH
  data:  0x313ce567

Contract Call:
  address:   ETH
  function:  decimals()

Docs: https://viem.sh/docs/contract/readContract
Version: [email protected]

BRIDGE Issue

Bridge Error

Received response from OpenAI model.
Bridge action handler called
[2025-02-04 15:27:25] ERROR:
    err: {
      "type": "TypeError",
      "message": "Cannot read properties of undefined (reading 'default')",
      "stack":
          TypeError: Cannot read properties of undefined (reading 'default')
              at file:///home/azan/Work/eliza/packages/plugin-evm/dist/index.js:362:63
              at Array.map (<anonymous>)
              at new BridgeAction (file:///home/azan/Work/eliza/packages/plugin-evm/dist/index.js:346:63)
              at Object.handler (file:///home/azan/Work/eliza/packages/plugin-evm/dist/index.js:405:24)
              at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
              at async AgentRuntime.processActions (file:///home/azan/Work/eliza/packages/core/dist/index.js:37181:17)
              at async file:///home/azan/Work/eliza/packages/client-direct/dist/index.js:4678:13
    }

Steps to Reproduce:

  1. Attempt to swap tokens.
  2. Observe the invalid address error.
  3. Attempt to bridge tokens.
  4. Encounter the TypeError in the bridge action handler.

Expected Behavior:

  • The swap function should correctly identify and process token addresses.
  • The bridge function should handle actions without encountering undefined properties.

Environment Details:

  • Network: ** baseSepolia, Sepolia **

Any guidance on resolving these errors would be greatly appreciated. Thanks!

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Hello @AzanAdnan23! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!

@AzanAdnan23
Copy link
Author

even provided WETH address.

Image

[2025-02-04 17:56:37] ERROR: Error in getBebopQuote: Cannot read properties of undefined (reading '0')
[2025-02-04 17:56:37] ERROR: Failed to execute lifi quote: Error: SDK Execution Provider not found.
[2025-02-04 17:56:37] ERROR: Error in swap handler: Execution failed

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

No branches or pull requests

1 participant