• Mark Tyneway's avatar
    state-surgery: handle empty label bug (#3262) · 692ca3ff
    Mark Tyneway authored
    Someplace in foundry it seems to not populate the
    key value correctly in the compiler storage layout type.
    Unclear why its not always populated, it is in some cases
    but not all. It could be anywhere between solc, foundry and
    the foundry hardhat plugin.
    
    The information is still there, it just needs to be parsed
    from a different field. This PR uses a regex to parse the value
    to pull it out. It recursively calls itself and we can be sure
    that it will not infinitely recurse because a non empty string
    is passed in the second time.
    
    With this PR, I am able to successfully build the L2 genesis
    state.
    
    bugfix
    
    fix
    Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    692ca3ff
encoding.go 12.1 KB