optimism icon indicating copy to clipboard operation
optimism copied to clipboard

feature: add support to initialize genesis contracts by function call

Open zhiqiangxu opened this issue 1 year ago • 1 comments

Currently the genesis contracts can only be initialized by manually specifying the state variables here.

It becomes hard if the state variable to initialize is a mapping or there're multiple inherits involved, it's boring to manually gather all the state variables modified .

In general, it's more feasible to allow initializing the contracts by function call instead, which is more flexible.

zhiqiangxu avatar Mar 05 '24 14:03 zhiqiangxu

We will shortly be rewriting the L2 genesis generation in solidity to decouple releases of the predeploys from releases of op-node. You are correct that our storage setting library doesn't support mappings right now, its possible to add but we didn't need it so we didn't implement it at the time

tynes avatar Mar 05 '24 16:03 tynes