Skip to content

bug(cast erc20): --browser wallet fails with "Address already in use" for Tempo txs #13104

@mablr

Description

@mablr

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

cast 1.5.1-dev (a92a1c3)

What version of Foundryup are you on?

No response

What command(s) is the bug in?

./target/debug/cast erc20 transfer 0x20c0000000000000000000000000000000000000 0x0000000000000000000000000000000000000001 1000 --tempo.fee-token 0x20c0000000000000000000000000000000000003 --browser --rpc-url https://rpc.moderato.tempo.xyz

Operating System

macOS (Apple Silicon)

Describe the bug

We had to introduce a workaround in cast erc20 to handle tempo txs (see: #13002 (review)).

However, there’s a downside to this when using cast erc20 in conjunction with the —browser wallet. It leads to the creation of a second signer, which in this case would be a second BrowserWalletServer instance. Therefore, the result is:

Error: Server error: Server error: Address already in use (os error 48)

Root cause is here:

let signer = send_tx.eth.wallet.signer().await?;

Since send_erc20_tx helper is a temporary shim, adding complexity on top the existing workaround doesn't make sense to me. This will be naturally resolved once Tempo transaction signing is natively supported in FoundryNetwork and the redundant initialization is removed. In the meantime i'm raising this issue to keep track of this bug.

This is kinda folded/related with #13103 & #12958

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-bugType: bugT-needs-triageType: this issue needs to be labelled

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions