• Mark Tyneway's avatar
    contracts: update `OVM_GasPriceOracle` · 1b917041
    Mark Tyneway authored
    Add a setter for L1 base fee. The trusted oracle can update it over
    time. Eventually this will become trustless, but this is a quick and
    easy approach for now.
    
    Also add a setter/getter for the per batch overhead and the scalar.
    
    Also emit events for when the values are updated. This will make it much
    easier to track historical gas prices over time.
    
    Add tests for new functionality. L2 geth will consume the new value in
    the `OVM_GasPriceOracle`
    
    Add getters that make it easy for users to know the L1 costs.
    - `getL1Fee` returns the L1 fee given the current L1 base fee known by
      the L2 node
    - `getL1GasUsed` counts the bytes and creates a sum for the gas cost of
      submitting the data to L1
    1b917041
Name
Last commit
Last update
.changeset Loading commit data...
.github Loading commit data...
.husky Loading commit data...
.vscode Loading commit data...
go Loading commit data...
integration-tests Loading commit data...
l2geth Loading commit data...
ops Loading commit data...
packages Loading commit data...
patches Loading commit data...
specs Loading commit data...
.dockerignore Loading commit data...
.editorconfig Loading commit data...
.eslintrc.js Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.nvmrc Loading commit data...
.prettierrc.js Loading commit data...
.prettierrc.json Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
lerna.json Loading commit data...
package.json Loading commit data...
tsconfig.build.json Loading commit data...
tsconfig.json Loading commit data...
yarn.lock Loading commit data...