• 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
..
contracts Loading commit data...
deploy Loading commit data...
deploy-config Loading commit data...
deployments/goerli Loading commit data...
scripts Loading commit data...
src Loading commit data...
tasks Loading commit data...
.eslintignore Loading commit data...
.eslintrc.js Loading commit data...
.gas-snapshot Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.prettierignore Loading commit data...
.prettierrc.js Loading commit data...
.solhint.json Loading commit data...
.solhintignore Loading commit data...
.storage-layout Loading commit data...
CHANGELOG.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
foundry.toml Loading commit data...
hardhat.config.ts Loading commit data...
package.json Loading commit data...
slither.config.json Loading commit data...
slither.db.json Loading commit data...
tsconfig.json Loading commit data...