• Mark Tyneway's avatar
    contracts-bedrock: in place handling of immutables · a32e68ac
    Mark Tyneway authored
    This updates the hardhat task `genesis-l2` to handle
    setting the immutables in the deployed bytecode. This
    is necessary because the predeploys "live" in the L2
    state and are not deployed. Any immutables must be manually
    placed into the bytecode by looking at the compiler output
    and then finding the offsets and slicing in the values.
    
    A high level API is exposed for setting arbitrary immutables
    with the `replaceImmutables` function. This was inspired by
    smock's `computeStorageSlots`.
    
    Longer term, this code will be rewritten in go and be able to
    operate on either a LevelDB database (upgrade an existing system)
    or a `genesis.json` (good for starting a new network). This is
    a requirement because the state surgery is large enough such that
    it must bind directly to LevelDB and be in a language that is
    relatively fast.
    a32e68ac
Name
Last commit
Last update
..
common-ts Loading commit data...
contracts Loading commit data...
contracts-bedrock Loading commit data...
contracts-governance Loading commit data...
contracts-periphery Loading commit data...
core-utils Loading commit data...
data-transport-layer Loading commit data...
drippie-mon Loading commit data...
fault-detector Loading commit data...
hardhat-deploy-config Loading commit data...
integration-tests-bedrock Loading commit data...
message-relayer Loading commit data...
replica-healthcheck Loading commit data...
sdk Loading commit data...