Skip to content

Error: Could not find target contract #3076

@4x4x4

Description

@4x4x4

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0

What command(s) is the bug in?

forge script

Operating System

Linux

Describe the bug

Upon running my command:

forge script script/deploy-token.s.sol:MyScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_KEY -vvvv --slow

I am getting kicked out with an error saying that could not find the target contract. I have double checked and spelling and paths seem to be correct.

This is the bug that I am running into.

Error: Could not find target contract: /home/user/Hello_foundry/script/deploy-token.s.sol:MyScript

Here listed below is the link to the project.
the files i checked are in src and script
https://github.com/4x4x4/Hello_foundry

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions