Skip to content

Scripting bug in foundry v1.3.1 #11351

@rin-st

Description

@rin-st

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

1.3.1

What version of Foundryup are you on?

1.3.0

What command(s) is the bug in?

forge script

Operating System

macOS (Apple Silicon)

Describe the bug

To reproduce:
Do everything described in https://getfoundry.sh/guides/scripting-with-solidity
When I have in foundry.toml

[etherscan]
sepolia = { key = "${ETHERSCAN_API_KEY}" }

and in .env

ETHERSCAN_API_KEY=<my key>

and run

forge script script/Counter.s.sol:CounterScript --fork-url http://localhost:8545 --broadcast --interactives 1

I'm getting error

forge script script/Counter.s.sol:CounterScript --fork-url http://localhost:8545 --broadcast --interactives 1

[⠊] Compiling...
No files changed, compilation skipped
Enter private key:
Error: No known Etherscan API URL for chain `anvil-hardhat`. To fix this, please:
1. Specify a `url` 
2. Verify the chain `anvil-hardhat` is correct

I think this PR caused the error: #11194

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions