• Mark Tyneway's avatar
    contracts: optimize `L1Block.setL1BlockValues` (#2596) · 2d791301
    Mark Tyneway authored
    * contracts: optimize `L1Block.setL1BlockValues`
    
    The amount of gas required to update the
    L1 block values can be reduced by ~5000 gas by tightly
    packing the `uint64`s into a single storage slot.
    This is important because there will be a single
    transaction at the beginning of each block that will
    be updating these values. ~100 gas is saved by using
    yul instead of straight solidity. I don't feel like the
    yul is particularly difficult to read in this context,
    and saving 100 gas per block will add up to a lot over
    the history of the chain. This logic is covered by foundry
    fuzzing.
    
    * op-bindings: regenerate
    2d791301
Name
Last commit
Last update
..
contracts Loading commit data...
deploy Loading commit data...
helpers Loading commit data...
scripts Loading commit data...
src Loading commit data...
tasks Loading commit data...
test 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...
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...