Skip to content

Cannot find the storage slot for a public string variable #3869

@simontianx

Description

@simontianx

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 (b28119b 2022-11-23T03:06:50.152811Z)

What command(s) is the bug in?

forge test

Operating System

Windows

Describe the bug

For a simple storage layout given below, it's possible to find the storage slot for owner and number by running stdstore.target(address(test)).sig("owner()").find(); or stdstore.target(address(test)).sig("number()").find();, but it's failing when running stdstore.target(address(test)).sig("sentence()").find();.

contract SimpleStorage {
    address public owner;
    string public sentence;
    uint256 public number;
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions