Skip to content

The --froms flag consumes too many args #10840

Open
@CodeSandwich

Description

@CodeSandwich

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.2.3-stable

What version of Foundryup are you on?

0.3.3

What command(s) is the bug in?

forge script

Operating System

Linux

Describe the bug

I'm trying to use the --froms flag to impersonate an account when test running a script on anvil forking a mainnet blockchain. Here's how I'm running the script:

forge script --froms 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 script/GetRich.sol

I'm getting an error:

error: invalid value 'script/GetRich.sol' for '--froms [<ADDRESSES>...]': invalid string length

--froms doesn't seem to know when its input should end. I tried wrapping the address in [] and adding a comma at the end to mark the end of a list, but I can't nail the syntax.

It may be a bug, but I also may be doing it wrong, but then IMO it's a docs issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions