Skip to content

bug(forge script): msg.sender is not set to TURNKEY_ADDRESS when using --turnkey #12916

@zjesko

Description

@zjesko

Component

Forge

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

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.5.0-stable Commit SHA: 1c57854 Build Timestamp: 2025-11-26T09:16:58.269730000Z (1764148618) Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.3.0

What command(s) is the bug in?

forge script --turnkey

Operating System

None

Describe the bug

forge script currently allows using --turnkey by passing the following variables:
TURNKEY_API_PRIVATE_KEY
TURNKEY_ORGANIZATION_ID
TURNKEY_ADDRESS

currently, when we run forge script --turnkey, the msg.sender used in the scripts is the default one (0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38)

instead msg.sender should automatically change to the TURNKEY_ADDRESS. currently to achieve this we have to forcefully also do forge script --turnkey --sender TURNKEY_ADDRESS which seems redundant

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions