Skip to content

l2geth: remove SignatureHashType#752

Merged
gakonst merged 5 commits intoregenesis/0.4.0from
fix/remove-tx-type
May 20, 2021
Merged

l2geth: remove SignatureHashType#752
gakonst merged 5 commits intoregenesis/0.4.0from
fix/remove-tx-type

Conversation

@tynes
Copy link
Copy Markdown
Contributor

@tynes tynes commented May 4, 2021

Description
Removes the SignatureHashType from l2geth as it is deprecated and no longer required. This is a breaking change for the db so it must be introduced with a regenesis as to not require a migration

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 4, 2021

🦋 Changeset detected

Latest commit: 0d39631

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/l2geth Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tynes
Copy link
Copy Markdown
Contributor Author

tynes commented May 4, 2021

This should be moved to the 0.4.0-rc release

@smartcontracts smartcontracts added A-geth C-chore Category: Code, docs or tooling maintenance labels May 7, 2021
@snario
Copy link
Copy Markdown
Contributor

snario commented May 19, 2021

This needs to re-target regenesis/0.4.0.

@gakonst gakonst changed the base branch from v0.3.0-rc to regenesis/0.4.0 May 19, 2021 17:01
@gakonst gakonst changed the base branch from regenesis/0.4.0 to v0.3.0-rc May 19, 2021 17:01
@gakonst gakonst force-pushed the fix/remove-tx-type branch from 1768570 to 0cd4c3f Compare May 20, 2021 08:45
@tynes tynes requested a review from K-Ho as a code owner May 20, 2021 08:45
@gakonst gakonst changed the base branch from v0.3.0-rc to regenesis/0.4.0 May 20, 2021 08:45
@gakonst gakonst force-pushed the fix/remove-tx-type branch from 0cd4c3f to cf21eea Compare May 20, 2021 08:47
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 20, 2021

Codecov Report

Merging #752 (af62a0c) into regenesis/0.4.0 (f3e4ee9) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           regenesis/0.4.0     #752   +/-   ##
================================================
  Coverage            85.76%   85.76%           
================================================
  Files                   51       51           
  Lines                 1967     1967           
  Branches               317      317           
================================================
  Hits                  1687     1687           
  Misses                 280      280           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3e4ee9...af62a0c. Read the comment docs.

@github-actions github-actions bot added A-integration-tests A-pkg-core-utils Area: packages/core-utils labels May 20, 2021
@gakonst gakonst merged this pull request into regenesis/0.4.0 May 20, 2021
@gakonst gakonst deleted the fix/remove-tx-type branch May 20, 2021 10:07
gakonst added a commit that referenced this pull request May 20, 2021
* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
gakonst added a commit that referenced this pull request May 21, 2021
* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
smartcontracts pushed a commit that referenced this pull request May 28, 2021
* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
CAPtheorem added a commit to omgnetwork/optimism that referenced this pull request Jun 23, 2021
* chore: reduce hardhat timeout to 20 seconds (ethereum-optimism#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (ethereum-optimism#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (ethereum-optimism#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (ethereum-optimism#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (ethereum-optimism#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (ethereum-optimism#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (ethereum-optimism#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million ethereum-optimism#870 (ethereum-optimism#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (ethereum-optimism#921)

* fix: disable upgradability from ECDSA Account (ethereum-optimism#885)

* l2geth: remove `SignatureHashType` (ethereum-optimism#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (ethereum-optimism#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (ethereum-optimism#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (ethereum-optimism#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (ethereum-optimism#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (ethereum-optimism#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (ethereum-optimism#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (ethereum-optimism#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (ethereum-optimism#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (ethereum-optimism#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (ethereum-optimism#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (ethereum-optimism#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (ethereum-optimism#994)

* feat[message-relayer]: relay tx generator (ethereum-optimism#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (ethereum-optimism#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (ethereum-optimism#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (ethereum-optimism#1000)

* fix[message-relayer]: remove spreadsheet mode (ethereum-optimism#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (ethereum-optimism#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (ethereum-optimism#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (ethereum-optimism#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (ethereum-optimism#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (ethereum-optimism#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (ethereum-optimism#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (ethereum-optimism#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (ethereum-optimism#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (ethereum-optimism#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on ethereum-optimism#912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (ethereum-optimism#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (ethereum-optimism#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (ethereum-optimism#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (ethereum-optimism#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (ethereum-optimism#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (ethereum-optimism#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (ethereum-optimism#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (ethereum-optimism#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (ethereum-optimism#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (ethereum-optimism#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (ethereum-optimism#1025)

* fix[dtl]: fix dtl bug breaking verifiers (ethereum-optimism#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (ethereum-optimism#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (ethereum-optimism#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (ethereum-optimism#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (ethereum-optimism#1037)

* Version Packages (ethereum-optimism#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (ethereum-optimism#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (ethereum-optimism#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (ethereum-optimism#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (ethereum-optimism#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (ethereum-optimism#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (ethereum-optimism#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (ethereum-optimism#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (ethereum-optimism#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (ethereum-optimism#1023)

* fix: abi encoded tx (ethereum-optimism#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (ethereum-optimism#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (ethereum-optimism#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (ethereum-optimism#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (ethereum-optimism#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (ethereum-optimism#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (ethereum-optimism#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (ethereum-optimism#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (ethereum-optimism#1071)

* fix: monotonicity auto healer (ethereum-optimism#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (ethereum-optimism#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (ethereum-optimism#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (ethereum-optimism#1073)

* fix: use predeploy constant lib for em wrapper (ethereum-optimism#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (ethereum-optimism#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (ethereum-optimism#1080)

* refactor[contracts]: move account contracts to predeploy folder (ethereum-optimism#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (ethereum-optimism#1086)

* fix[bs]: disambiguate generic submission errors (ethereum-optimism#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (ethereum-optimism#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (ethereum-optimism#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (ethereum-optimism#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (ethereum-optimism#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (ethereum-optimism#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (ethereum-optimism#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (ethereum-optimism#1098)

* deploy: goerli 0.4.0 (ethereum-optimism#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (ethereum-optimism#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (ethereum-optimism#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (ethereum-optimism#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (ethereum-optimism#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (ethereum-optimism#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (ethereum-optimism#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (ethereum-optimism#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (ethereum-optimism#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (ethereum-optimism#1123)

* fix[dtl]: remove old stringification function (ethereum-optimism#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (ethereum-optimism#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (ethereum-optimism#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (ethereum-optimism#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (ethereum-optimism#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (ethereum-optimism#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (ethereum-optimism#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (ethereum-optimism#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (ethereum-optimism#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (ethereum-optimism#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (ethereum-optimism#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (ethereum-optimism#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (ethereum-optimism#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (ethereum-optimism#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (ethereum-optimism#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (ethereum-optimism#1111)

* go: add utils module

* readme: update

* Version Packages (ethereum-optimism#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (ethereum-optimism#1146)

* feat[contracts]: add mainnet deploy script (ethereum-optimism#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (ethereum-optimism#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (ethereum-optimism#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (ethereum-optimism#1151)

* Version Packages (ethereum-optimism#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (ethereum-optimism#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (ethereum-optimism#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>
tynes added a commit that referenced this pull request Jun 25, 2021
* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
InoMurko added a commit to omgnetwork/optimism that referenced this pull request Jul 15, 2021
* Fixed wallet integration test (#95)

* Update watcher-utils.ts

* Fixed contracts

* remove GH actions that break due to missing permissions

* naming consistency, added comments to code snippets that will need to be changed when the message-relayer-fast autodeploys

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Fixed CrossDomainMessenger name (#96)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

* Keep the user logged in after changing chain (#99)

* Keep the user logged in after changing chain

* Update Nft.js

* Detect if user is in the wrong chain

Co-authored-by: cby3149 <cby3149@outlook.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Merge conflics resolve (#110)

* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files

* [pull] develop from ethereum-optimism:develop (#91)

* chore: reduce hardhat timeout to 20 seconds (#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million #870 (#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (#921)

* fix: disable upgradability from ECDSA Account (#885)

* l2geth: remove `SignatureHashType` (#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (#994)

* feat[message-relayer]: relay tx generator (#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (#1000)

* fix[message-relayer]: remove spreadsheet mode (#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on #912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (#1025)

* fix[dtl]: fix dtl bug breaking verifiers (#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (#1037)

* Version Packages (#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (#1023)

* fix: abi encoded tx (#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (#1071)

* fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8f67974d0a3e65fc000f08858328a4bbbc.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (#1073)

* fix: use predeploy constant lib for em wrapper (#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (#1080)

* refactor[contracts]: move account contracts to predeploy folder (#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (#1086)

* fix[bs]: disambiguate generic submission errors (#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (#1098)

* deploy: goerli 0.4.0 (#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (#1123)

* fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>

* Re-apply key changes on top of optimism most current develop

* Add docker-compose-replica.yml (#109)

* Create docker-compose-replica.yml

* Add replica service

* Update docker-compose-omgx-replica.yml

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix linter; patch gethl2

* configure the deployer correctly

* fix proposer / batch submitter

* update chainIDs

* update rpc test

* Create README_OMGX.md

* upstream - needs more work

* Adds delay to watcher (#1159)

* Adds delay to watcher

* Simplifies delay

* Adds changeset

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

* fix: bind dtl functions for missing event codepath (#1161)

* dtl: bind this in L1 missing element error handlers

* dtl: add additional logline

* chore: add changeset

* dtl: add more metrics

* dtl: use counter instead of gauge

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* fix: remove 'editor.formatOnSave' from global settings' (#1163)

* merge conflicts

* Update pre-commit

* Version Packages (#1167)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* minor

* Update pre-commit

* Fix wallet test (#119)

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Reapply standard changes on top of current develop

* Update package.json

* doc: add notes for releasing new versions with changesets (#1166)

* Bind correct object to method handler in DTL (#1168)

* fix: bind correct object to method handler

* build: add changeset

* Version Packages (#1169)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix web wallet

* Fix integration test (#124)

* Fix integration test (#125)

* Fix integration test

* Fix integration test

* Fix wallet_react

* Fix lint test

* Remove package-lock

* Update integration.yml

* Fix wallet deployer

* Collect docker log

* Fix l1-l2-deposit-withdrawal test

* Fix sync test

* Add chainID to deployer config

* make sync tests dispatch only

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Add short contribution section to primary README (#1157)

* Add short contribution section to primary README

* Update README.md

* fix: prevent batch submitter from submitting batches if low on ETH

* build: add changeset

* Eslint ignore the hardhat folder

* Update README.md

* Beginning to add working examples

* hardhart and waffle example tests

* document/check waffle

* test l1-l2 example

* add patch-package

* Update package.json

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

* merge conflict squash

* Daily sync up (#137)

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Update message relayer fast contracts (#139)

* prepare for wallet reorg

* Create yarn.lock

* fix hardhat bug

* merge conflict resolve

* daily sync up (#141)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* fix(contracts): prevent L2->L1 calls to system contracts

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: ben <ben@pseudonym.party>

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

* DRAFT move react wallet and the contracts to more clear folders (#138)

* DRAFT move react wallet and the contracts to more clear folders

* merging the axios integration chagnes

* updated the message-relayer-fast contracts

* integrate message-relayer-fast into standard dockers

* Dockerize the message-relayer-fast

* update Readme.md

* remove duplicated contracts - just keep everything in /contracts

* add deploy for fast messenger

* message-relayer-fast testing

* Update serve.sh

* Delete yarn.lock

* Update constants.ts

* Create yarn.lock

* Update constants.ts

* Update function-manipulation.spec.ts

* increase the retries and other minor fixes

* Improved documentation

* fix omgx integration tests

* Update omgx-integration.yml

* integration test remove duplicated tests

* Fix units test configuration

* Update docker-compose-omgx-services.yml

* integration test setup fixes

* fix wallet integration test

* fix for crash on return

* integration tests for `message-relayer-fast`

* Update env.ts

* Autodeploy Token Bridges

* Update wallet contracts

* Update utils.ts

* improve omgx integration tests

* Add address manager address to GH actions for now

Co-authored-by: sahil kashetwar <>
Co-authored-by: Sahil k <sahil@enya.ai>
Co-authored-by: cby3149 <cby3149@outlook.com>

* merge conflicts

* GH actions regular changes

* husky

* Daily sync up (#144)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben <ben@pseudonym.party>
Co-authored-by: elenadimitrova <elena@arenabg.com>
Co-authored-by: Reggie Gomez <reggieag@gmail.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* docker: pin to alpine 3.13 for l2geth

A bug has appeared when older versions of Docker are used to build
alpine based images in alpine version 3.14. To prevent this problem
from happening to the users, this PR pins the version to 3.13.

The observed problem is that `make` cannot run any command and
the error message states `Operation not permitted.` Removing
`make` was one way to solve the problem but that would increase
the diff from upstream geth.

See these links for details:
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0

* fix: update statement for skipping codechecks

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* removed unused functions from core utils

* [added] changeset

* next gen integration tests for the OMGX stack (#149)

* next gen integration tests for the OMGX stack

* finish first pass integration test outline

* move LP tests to the `message-relayer-fast`

* Update omgx-integration.yml

* add more tests to message-relayer-fast

* connect up the .env variables

* hard code URIs

* Update utils.ts

* Update omgx-integration.yml

* fix - should have been 8080

* Update omgx-integration.yml

* which address to use?

* Update omgx-integration.yml

* removing not needed code

* remove superfluous logging code

* Update utils.ts

* Update utils.ts

* additional comments and formatting improvements

* fix: use older changes on tests (#152)

* fix: use older structure

* correct messenger

* LP fees on the correct side

* correct messenger

* rearrange depl order

Co-authored-by: Souradeep Das <dsouradeep2@gmail.com>

* Update README_OMGX.md (#150)

Refactored some changes and added some comments I thought might be helpful for people.

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: re-enable all tests (#155)

* re-enable all tests

* re-enable all tests

* Add solhint to contracts package

* Turn off compiler-version rule in solhint

* Add suggestions by @maurelian
https://github.com/ethereum-optimism/optimism/pull/1033#issuecomment-866146467

* Change solhint output formatting to table

* Disable contract-name-camelcase rule in solhint

* Fix max-line-length linting issues in contracts

* Fix quotes linting issues in contracts

* Remove private-vars-leading-underscore rule in solhint

* Add contracts linting to github action

* Fix for hardhat account balance parsing

* Disable generating the bytecodeHash in hardhat contract artifacts

* Review fixes

* Fix review notes

* Fix smockit for a change in hardhat ^2.4.0
which changes the way it parses errors from returndata
Fix provided by @smartcontracts

* dtl: configurable gas price backend

Adds a new config option `--l1-gas-price-backend` or
`DATA_TRANSPORT_LAYER_L1_GAS_PRICE_BACKEND` that can be set to `l1` or
`l2`. This impacts the behavior of the HTTP endpoint `GET /eth/gasprice`
by changing what is queried to return the L1 gas price. The L1 gas price
is required to compute the L2 fee since the L2 fee consists of
`L1 gas price * L1 gas used + L1 gas price * L2 gas limit`. If the L1
gas price differs too much between different L2 providers, then users
using `eth_estimateGas` may submit transactions with too low of a fee
and be unable to submit transactions to the sequencer.

By configuring the DTL to use L2 as the L1 gas price backend, it will
call the Sequencer's RPC endpoint `rollup_gasPrices` which returns the
L1 and L2 gas prices from the point of view of the sequencer. The L2 gas
price exists in the state, so that will always be the same between the
sequencer and any replicas. The L1 gas price does not live on chain, so
querying for it from the sequencer directly will ensure that users send
transactions with a fee that is large enough.

Also adds eth/gasprice info to README.

* Remove bl wl service  (#154)

* replace `bl-wl` with direct calls the `omgx_deployer`

* Update docker-compose-omgx-services.yml

* Update up_local.sh

* Add CORS headers to http servers

* updated frontend to use the two new HTTP servers for the addresses

* update webwallet to work with both local and rinkeby

* Add missing .env variables to GH actions

* re-enable docker tages

* re-enable wallet transaction history

* Update up_local.sh

* Update up_local.sh

* Add flag to omgx_deployer to only serve addresses w/o deploying new contracts

* Update docker-compose-omgx-services.yml

* Add back tagging system and improved reliability of GH actions

* removed commented out service

* add rinkeby token addresses (#161)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix: lint deploy-l2 folder in contracts

* Add AWS integration (#159)

* Add AWS integration

* Remove artifacts

* updated ops_omgx/README.md and added .github/workflows/deploy2aws-integration.yml and .github/workflows/push2aws.yml

* add automated provision and deletion of an ec2 instance for running the integration tests

Co-authored-by: Petar Denev <pdenev@gmail.com>

* fix: update CI to avoid running out of memory

* Version Packages

* ci: release latest image tags on release

* feat: update README to include info about rebasing

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* merge conflicts

* re-comment out the usual GH actions

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

* Add replica (#169)

* fix: update erc20 deposits (#166)

* fix: update erc20 deposits

* fix: auto default token

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* resolve merge conflicts

* Update docker-compose.yml

* Update docker-compose.yml

* [pull] develop from ethereum-optimism:develop (#164)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Ben Wilson <bwilson@optimism.io>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Liam Horne <li…
InoMurko added a commit to omgnetwork/optimism that referenced this pull request Jul 15, 2021
* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Fixed CrossDomainMessenger name (#96)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

* Keep the user logged in after changing chain (#99)

* Keep the user logged in after changing chain

* Update Nft.js

* Detect if user is in the wrong chain

Co-authored-by: cby3149 <cby3149@outlook.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Merge conflics resolve (#110)

* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files

* [pull] develop from ethereum-optimism:develop (#91)

* chore: reduce hardhat timeout to 20 seconds (#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million #870 (#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (#921)

* fix: disable upgradability from ECDSA Account (#885)

* l2geth: remove `SignatureHashType` (#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (#994)

* feat[message-relayer]: relay tx generator (#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (#1000)

* fix[message-relayer]: remove spreadsheet mode (#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on #912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (#1025)

* fix[dtl]: fix dtl bug breaking verifiers (#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (#1037)

* Version Packages (#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (#1023)

* fix: abi encoded tx (#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (#1071)

* fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8f67974d0a3e65fc000f08858328a4bbbc.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (#1073)

* fix: use predeploy constant lib for em wrapper (#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (#1080)

* refactor[contracts]: move account contracts to predeploy folder (#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (#1086)

* fix[bs]: disambiguate generic submission errors (#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (#1098)

* deploy: goerli 0.4.0 (#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (#1123)

* fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>

* Re-apply key changes on top of optimism most current develop

* Add docker-compose-replica.yml (#109)

* Create docker-compose-replica.yml

* Add replica service

* Update docker-compose-omgx-replica.yml

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix linter; patch gethl2

* configure the deployer correctly

* fix proposer / batch submitter

* update chainIDs

* update rpc test

* Create README_OMGX.md

* upstream - needs more work

* Adds delay to watcher (#1159)

* Adds delay to watcher

* Simplifies delay

* Adds changeset

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

* fix: bind dtl functions for missing event codepath (#1161)

* dtl: bind this in L1 missing element error handlers

* dtl: add additional logline

* chore: add changeset

* dtl: add more metrics

* dtl: use counter instead of gauge

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* fix: remove 'editor.formatOnSave' from global settings' (#1163)

* merge conflicts

* Update pre-commit

* Version Packages (#1167)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* minor

* Update pre-commit

* Fix wallet test (#119)

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Reapply standard changes on top of current develop

* Update package.json

* doc: add notes for releasing new versions with changesets (#1166)

* Bind correct object to method handler in DTL (#1168)

* fix: bind correct object to method handler

* build: add changeset

* Version Packages (#1169)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix web wallet

* Fix integration test (#124)

* Fix integration test (#125)

* Fix integration test

* Fix integration test

* Fix wallet_react

* Fix lint test

* Remove package-lock

* Update integration.yml

* Fix wallet deployer

* Collect docker log

* Fix l1-l2-deposit-withdrawal test

* Fix sync test

* Add chainID to deployer config

* make sync tests dispatch only

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Add short contribution section to primary README (#1157)

* Add short contribution section to primary README

* Update README.md

* fix: prevent batch submitter from submitting batches if low on ETH

* build: add changeset

* Eslint ignore the hardhat folder

* Update README.md

* Beginning to add working examples

* hardhart and waffle example tests

* document/check waffle

* test l1-l2 example

* add patch-package

* Update package.json

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

* merge conflict squash

* Daily sync up (#137)

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Update message relayer fast contracts (#139)

* prepare for wallet reorg

* Create yarn.lock

* fix hardhat bug

* merge conflict resolve

* daily sync up (#141)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* fix(contracts): prevent L2->L1 calls to system contracts

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: ben <ben@pseudonym.party>

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

* DRAFT move react wallet and the contracts to more clear folders (#138)

* DRAFT move react wallet and the contracts to more clear folders

* merging the axios integration chagnes

* updated the message-relayer-fast contracts

* integrate message-relayer-fast into standard dockers

* Dockerize the message-relayer-fast

* update Readme.md

* remove duplicated contracts - just keep everything in /contracts

* add deploy for fast messenger

* message-relayer-fast testing

* Update serve.sh

* Delete yarn.lock

* Update constants.ts

* Create yarn.lock

* Update constants.ts

* Update function-manipulation.spec.ts

* increase the retries and other minor fixes

* Improved documentation

* fix omgx integration tests

* Update omgx-integration.yml

* integration test remove duplicated tests

* Fix units test configuration

* Update docker-compose-omgx-services.yml

* integration test setup fixes

* fix wallet integration test

* fix for crash on return

* integration tests for `message-relayer-fast`

* Update env.ts

* Autodeploy Token Bridges

* Update wallet contracts

* Update utils.ts

* improve omgx integration tests

* Add address manager address to GH actions for now

Co-authored-by: sahil kashetwar <>
Co-authored-by: Sahil k <sahil@enya.ai>
Co-authored-by: cby3149 <cby3149@outlook.com>

* merge conflicts

* GH actions regular changes

* husky

* Daily sync up (#144)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben <ben@pseudonym.party>
Co-authored-by: elenadimitrova <elena@arenabg.com>
Co-authored-by: Reggie Gomez <reggieag@gmail.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* docker: pin to alpine 3.13 for l2geth

A bug has appeared when older versions of Docker are used to build
alpine based images in alpine version 3.14. To prevent this problem
from happening to the users, this PR pins the version to 3.13.

The observed problem is that `make` cannot run any command and
the error message states `Operation not permitted.` Removing
`make` was one way to solve the problem but that would increase
the diff from upstream geth.

See these links for details:
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0

* fix: update statement for skipping codechecks

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* removed unused functions from core utils

* [added] changeset

* next gen integration tests for the OMGX stack (#149)

* next gen integration tests for the OMGX stack

* finish first pass integration test outline

* move LP tests to the `message-relayer-fast`

* Update omgx-integration.yml

* add more tests to message-relayer-fast

* connect up the .env variables

* hard code URIs

* Update utils.ts

* Update omgx-integration.yml

* fix - should have been 8080

* Update omgx-integration.yml

* which address to use?

* Update omgx-integration.yml

* removing not needed code

* remove superfluous logging code

* Update utils.ts

* Update utils.ts

* additional comments and formatting improvements

* fix: use older changes on tests (#152)

* fix: use older structure

* correct messenger

* LP fees on the correct side

* correct messenger

* rearrange depl order

Co-authored-by: Souradeep Das <dsouradeep2@gmail.com>

* Update README_OMGX.md (#150)

Refactored some changes and added some comments I thought might be helpful for people.

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: re-enable all tests (#155)

* re-enable all tests

* re-enable all tests

* Add solhint to contracts package

* Turn off compiler-version rule in solhint

* Add suggestions by @maurelian
https://github.com/ethereum-optimism/optimism/pull/1033#issuecomment-866146467

* Change solhint output formatting to table

* Disable contract-name-camelcase rule in solhint

* Fix max-line-length linting issues in contracts

* Fix quotes linting issues in contracts

* Remove private-vars-leading-underscore rule in solhint

* Add contracts linting to github action

* Fix for hardhat account balance parsing

* Disable generating the bytecodeHash in hardhat contract artifacts

* Review fixes

* Fix review notes

* Fix smockit for a change in hardhat ^2.4.0
which changes the way it parses errors from returndata
Fix provided by @smartcontracts

* dtl: configurable gas price backend

Adds a new config option `--l1-gas-price-backend` or
`DATA_TRANSPORT_LAYER_L1_GAS_PRICE_BACKEND` that can be set to `l1` or
`l2`. This impacts the behavior of the HTTP endpoint `GET /eth/gasprice`
by changing what is queried to return the L1 gas price. The L1 gas price
is required to compute the L2 fee since the L2 fee consists of
`L1 gas price * L1 gas used + L1 gas price * L2 gas limit`. If the L1
gas price differs too much between different L2 providers, then users
using `eth_estimateGas` may submit transactions with too low of a fee
and be unable to submit transactions to the sequencer.

By configuring the DTL to use L2 as the L1 gas price backend, it will
call the Sequencer's RPC endpoint `rollup_gasPrices` which returns the
L1 and L2 gas prices from the point of view of the sequencer. The L2 gas
price exists in the state, so that will always be the same between the
sequencer and any replicas. The L1 gas price does not live on chain, so
querying for it from the sequencer directly will ensure that users send
transactions with a fee that is large enough.

Also adds eth/gasprice info to README.

* Remove bl wl service  (#154)

* replace `bl-wl` with direct calls the `omgx_deployer`

* Update docker-compose-omgx-services.yml

* Update up_local.sh

* Add CORS headers to http servers

* updated frontend to use the two new HTTP servers for the addresses

* update webwallet to work with both local and rinkeby

* Add missing .env variables to GH actions

* re-enable docker tages

* re-enable wallet transaction history

* Update up_local.sh

* Update up_local.sh

* Add flag to omgx_deployer to only serve addresses w/o deploying new contracts

* Update docker-compose-omgx-services.yml

* Add back tagging system and improved reliability of GH actions

* removed commented out service

* add rinkeby token addresses (#161)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix: lint deploy-l2 folder in contracts

* Add AWS integration (#159)

* Add AWS integration

* Remove artifacts

* updated ops_omgx/README.md and added .github/workflows/deploy2aws-integration.yml and .github/workflows/push2aws.yml

* add automated provision and deletion of an ec2 instance for running the integration tests

Co-authored-by: Petar Denev <pdenev@gmail.com>

* fix: update CI to avoid running out of memory

* Version Packages

* ci: release latest image tags on release

* feat: update README to include info about rebasing

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* merge conflicts

* re-comment out the usual GH actions

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

* Add replica (#169)

* fix: update erc20 deposits (#166)

* fix: update erc20 deposits

* fix: auto default token

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* resolve merge conflicts

* Update docker-compose.yml

* Update docker-compose.yml

* [pull] develop from ethereum-optimism:develop (#164)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Ben Wilson <bwilson@optimism.io>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* Update docker-compose.yml

* adding l1-l2 test ecs scheduled task that does verify communication between L1 and L2 and L2 to L1 (#167)

Co-…
InoMurko added a commit to omgnetwork/optimism that referenced this pull request Jul 15, 2021
* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Fixed CrossDomainMessenger name (#96)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

* Keep the user logged in after changing chain (#99)

* Keep the user logged in after changing chain

* Update Nft.js

* Detect if user is in the wrong chain

Co-authored-by: cby3149 <cby3149@outlook.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Merge conflics resolve (#110)

* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files

* [pull] develop from ethereum-optimism:develop (#91)

* chore: reduce hardhat timeout to 20 seconds (#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million #870 (#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (#921)

* fix: disable upgradability from ECDSA Account (#885)

* l2geth: remove `SignatureHashType` (#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (#994)

* feat[message-relayer]: relay tx generator (#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (#1000)

* fix[message-relayer]: remove spreadsheet mode (#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on #912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (#1025)

* fix[dtl]: fix dtl bug breaking verifiers (#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (#1037)

* Version Packages (#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (#1023)

* fix: abi encoded tx (#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (#1071)

* fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8f67974d0a3e65fc000f08858328a4bbbc.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (#1073)

* fix: use predeploy constant lib for em wrapper (#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (#1080)

* refactor[contracts]: move account contracts to predeploy folder (#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (#1086)

* fix[bs]: disambiguate generic submission errors (#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (#1098)

* deploy: goerli 0.4.0 (#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (#1123)

* fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>

* Re-apply key changes on top of optimism most current develop

* Add docker-compose-replica.yml (#109)

* Create docker-compose-replica.yml

* Add replica service

* Update docker-compose-omgx-replica.yml

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix linter; patch gethl2

* configure the deployer correctly

* fix proposer / batch submitter

* update chainIDs

* update rpc test

* Create README_OMGX.md

* upstream - needs more work

* Adds delay to watcher (#1159)

* Adds delay to watcher

* Simplifies delay

* Adds changeset

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

* fix: bind dtl functions for missing event codepath (#1161)

* dtl: bind this in L1 missing element error handlers

* dtl: add additional logline

* chore: add changeset

* dtl: add more metrics

* dtl: use counter instead of gauge

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* fix: remove 'editor.formatOnSave' from global settings' (#1163)

* merge conflicts

* Update pre-commit

* Version Packages (#1167)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* minor

* Update pre-commit

* Fix wallet test (#119)

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Reapply standard changes on top of current develop

* Update package.json

* doc: add notes for releasing new versions with changesets (#1166)

* Bind correct object to method handler in DTL (#1168)

* fix: bind correct object to method handler

* build: add changeset

* Version Packages (#1169)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix web wallet

* Fix integration test (#124)

* Fix integration test (#125)

* Fix integration test

* Fix integration test

* Fix wallet_react

* Fix lint test

* Remove package-lock

* Update integration.yml

* Fix wallet deployer

* Collect docker log

* Fix l1-l2-deposit-withdrawal test

* Fix sync test

* Add chainID to deployer config

* make sync tests dispatch only

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Add short contribution section to primary README (#1157)

* Add short contribution section to primary README

* Update README.md

* fix: prevent batch submitter from submitting batches if low on ETH

* build: add changeset

* Eslint ignore the hardhat folder

* Update README.md

* Beginning to add working examples

* hardhart and waffle example tests

* document/check waffle

* test l1-l2 example

* add patch-package

* Update package.json

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

* merge conflict squash

* Daily sync up (#137)

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Update message relayer fast contracts (#139)

* prepare for wallet reorg

* Create yarn.lock

* fix hardhat bug

* merge conflict resolve

* daily sync up (#141)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* fix(contracts): prevent L2->L1 calls to system contracts

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: ben <ben@pseudonym.party>

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

* DRAFT move react wallet and the contracts to more clear folders (#138)

* DRAFT move react wallet and the contracts to more clear folders

* merging the axios integration chagnes

* updated the message-relayer-fast contracts

* integrate message-relayer-fast into standard dockers

* Dockerize the message-relayer-fast

* update Readme.md

* remove duplicated contracts - just keep everything in /contracts

* add deploy for fast messenger

* message-relayer-fast testing

* Update serve.sh

* Delete yarn.lock

* Update constants.ts

* Create yarn.lock

* Update constants.ts

* Update function-manipulation.spec.ts

* increase the retries and other minor fixes

* Improved documentation

* fix omgx integration tests

* Update omgx-integration.yml

* integration test remove duplicated tests

* Fix units test configuration

* Update docker-compose-omgx-services.yml

* integration test setup fixes

* fix wallet integration test

* fix for crash on return

* integration tests for `message-relayer-fast`

* Update env.ts

* Autodeploy Token Bridges

* Update wallet contracts

* Update utils.ts

* improve omgx integration tests

* Add address manager address to GH actions for now

Co-authored-by: sahil kashetwar <>
Co-authored-by: Sahil k <sahil@enya.ai>
Co-authored-by: cby3149 <cby3149@outlook.com>

* merge conflicts

* GH actions regular changes

* husky

* Daily sync up (#144)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben <ben@pseudonym.party>
Co-authored-by: elenadimitrova <elena@arenabg.com>
Co-authored-by: Reggie Gomez <reggieag@gmail.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* docker: pin to alpine 3.13 for l2geth

A bug has appeared when older versions of Docker are used to build
alpine based images in alpine version 3.14. To prevent this problem
from happening to the users, this PR pins the version to 3.13.

The observed problem is that `make` cannot run any command and
the error message states `Operation not permitted.` Removing
`make` was one way to solve the problem but that would increase
the diff from upstream geth.

See these links for details:
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0

* fix: update statement for skipping codechecks

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* removed unused functions from core utils

* [added] changeset

* next gen integration tests for the OMGX stack (#149)

* next gen integration tests for the OMGX stack

* finish first pass integration test outline

* move LP tests to the `message-relayer-fast`

* Update omgx-integration.yml

* add more tests to message-relayer-fast

* connect up the .env variables

* hard code URIs

* Update utils.ts

* Update omgx-integration.yml

* fix - should have been 8080

* Update omgx-integration.yml

* which address to use?

* Update omgx-integration.yml

* removing not needed code

* remove superfluous logging code

* Update utils.ts

* Update utils.ts

* additional comments and formatting improvements

* fix: use older changes on tests (#152)

* fix: use older structure

* correct messenger

* LP fees on the correct side

* correct messenger

* rearrange depl order

Co-authored-by: Souradeep Das <dsouradeep2@gmail.com>

* Update README_OMGX.md (#150)

Refactored some changes and added some comments I thought might be helpful for people.

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: re-enable all tests (#155)

* re-enable all tests

* re-enable all tests

* Add solhint to contracts package

* Turn off compiler-version rule in solhint

* Add suggestions by @maurelian
https://github.com/ethereum-optimism/optimism/pull/1033#issuecomment-866146467

* Change solhint output formatting to table

* Disable contract-name-camelcase rule in solhint

* Fix max-line-length linting issues in contracts

* Fix quotes linting issues in contracts

* Remove private-vars-leading-underscore rule in solhint

* Add contracts linting to github action

* Fix for hardhat account balance parsing

* Disable generating the bytecodeHash in hardhat contract artifacts

* Review fixes

* Fix review notes

* Fix smockit for a change in hardhat ^2.4.0
which changes the way it parses errors from returndata
Fix provided by @smartcontracts

* dtl: configurable gas price backend

Adds a new config option `--l1-gas-price-backend` or
`DATA_TRANSPORT_LAYER_L1_GAS_PRICE_BACKEND` that can be set to `l1` or
`l2`. This impacts the behavior of the HTTP endpoint `GET /eth/gasprice`
by changing what is queried to return the L1 gas price. The L1 gas price
is required to compute the L2 fee since the L2 fee consists of
`L1 gas price * L1 gas used + L1 gas price * L2 gas limit`. If the L1
gas price differs too much between different L2 providers, then users
using `eth_estimateGas` may submit transactions with too low of a fee
and be unable to submit transactions to the sequencer.

By configuring the DTL to use L2 as the L1 gas price backend, it will
call the Sequencer's RPC endpoint `rollup_gasPrices` which returns the
L1 and L2 gas prices from the point of view of the sequencer. The L2 gas
price exists in the state, so that will always be the same between the
sequencer and any replicas. The L1 gas price does not live on chain, so
querying for it from the sequencer directly will ensure that users send
transactions with a fee that is large enough.

Also adds eth/gasprice info to README.

* Remove bl wl service  (#154)

* replace `bl-wl` with direct calls the `omgx_deployer`

* Update docker-compose-omgx-services.yml

* Update up_local.sh

* Add CORS headers to http servers

* updated frontend to use the two new HTTP servers for the addresses

* update webwallet to work with both local and rinkeby

* Add missing .env variables to GH actions

* re-enable docker tages

* re-enable wallet transaction history

* Update up_local.sh

* Update up_local.sh

* Add flag to omgx_deployer to only serve addresses w/o deploying new contracts

* Update docker-compose-omgx-services.yml

* Add back tagging system and improved reliability of GH actions

* removed commented out service

* add rinkeby token addresses (#161)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix: lint deploy-l2 folder in contracts

* Add AWS integration (#159)

* Add AWS integration

* Remove artifacts

* updated ops_omgx/README.md and added .github/workflows/deploy2aws-integration.yml and .github/workflows/push2aws.yml

* add automated provision and deletion of an ec2 instance for running the integration tests

Co-authored-by: Petar Denev <pdenev@gmail.com>

* fix: update CI to avoid running out of memory

* Version Packages

* ci: release latest image tags on release

* feat: update README to include info about rebasing

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* merge conflicts

* re-comment out the usual GH actions

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

* Add replica (#169)

* fix: update erc20 deposits (#166)

* fix: update erc20 deposits

* fix: auto default token

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* resolve merge conflicts

* Update docker-compose.yml

* Update docker-compose.yml

* [pull] develop from ethereum-optimism:develop (#164)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Ben Wilson <bwilson@optimism.io>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* Update docker-compose.yml

* adding l1-l2 test ecs scheduled task that does verify communication between L1 and L2 and L2 to L1 (#167)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Update docker-compose.yml

* daily update (#170)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 …
InoMurko added a commit to omgnetwork/optimism that referenced this pull request Jul 15, 2021
* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Fixed CrossDomainMessenger name (#96)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

* Keep the user logged in after changing chain (#99)

* Keep the user logged in after changing chain

* Update Nft.js

* Detect if user is in the wrong chain

Co-authored-by: cby3149 <cby3149@outlook.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Merge conflics resolve (#110)

* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files

* [pull] develop from ethereum-optimism:develop (#91)

* chore: reduce hardhat timeout to 20 seconds (#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million #870 (#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (#921)

* fix: disable upgradability from ECDSA Account (#885)

* l2geth: remove `SignatureHashType` (#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (#994)

* feat[message-relayer]: relay tx generator (#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (#1000)

* fix[message-relayer]: remove spreadsheet mode (#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on #912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (#1025)

* fix[dtl]: fix dtl bug breaking verifiers (#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (#1037)

* Version Packages (#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (#1023)

* fix: abi encoded tx (#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (#1071)

* fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8f67974d0a3e65fc000f08858328a4bbbc.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (#1073)

* fix: use predeploy constant lib for em wrapper (#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (#1080)

* refactor[contracts]: move account contracts to predeploy folder (#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (#1086)

* fix[bs]: disambiguate generic submission errors (#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (#1098)

* deploy: goerli 0.4.0 (#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (#1123)

* fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>

* Re-apply key changes on top of optimism most current develop

* Add docker-compose-replica.yml (#109)

* Create docker-compose-replica.yml

* Add replica service

* Update docker-compose-omgx-replica.yml

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix linter; patch gethl2

* configure the deployer correctly

* fix proposer / batch submitter

* update chainIDs

* update rpc test

* Create README_OMGX.md

* upstream - needs more work

* Adds delay to watcher (#1159)

* Adds delay to watcher

* Simplifies delay

* Adds changeset

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

* fix: bind dtl functions for missing event codepath (#1161)

* dtl: bind this in L1 missing element error handlers

* dtl: add additional logline

* chore: add changeset

* dtl: add more metrics

* dtl: use counter instead of gauge

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* fix: remove 'editor.formatOnSave' from global settings' (#1163)

* merge conflicts

* Update pre-commit

* Version Packages (#1167)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* minor

* Update pre-commit

* Fix wallet test (#119)

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Reapply standard changes on top of current develop

* Update package.json

* doc: add notes for releasing new versions with changesets (#1166)

* Bind correct object to method handler in DTL (#1168)

* fix: bind correct object to method handler

* build: add changeset

* Version Packages (#1169)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix web wallet

* Fix integration test (#124)

* Fix integration test (#125)

* Fix integration test

* Fix integration test

* Fix wallet_react

* Fix lint test

* Remove package-lock

* Update integration.yml

* Fix wallet deployer

* Collect docker log

* Fix l1-l2-deposit-withdrawal test

* Fix sync test

* Add chainID to deployer config

* make sync tests dispatch only

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Add short contribution section to primary README (#1157)

* Add short contribution section to primary README

* Update README.md

* fix: prevent batch submitter from submitting batches if low on ETH

* build: add changeset

* Eslint ignore the hardhat folder

* Update README.md

* Beginning to add working examples

* hardhart and waffle example tests

* document/check waffle

* test l1-l2 example

* add patch-package

* Update package.json

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

* merge conflict squash

* Daily sync up (#137)

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Update message relayer fast contracts (#139)

* prepare for wallet reorg

* Create yarn.lock

* fix hardhat bug

* merge conflict resolve

* daily sync up (#141)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* fix(contracts): prevent L2->L1 calls to system contracts

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: ben <ben@pseudonym.party>

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

* DRAFT move react wallet and the contracts to more clear folders (#138)

* DRAFT move react wallet and the contracts to more clear folders

* merging the axios integration chagnes

* updated the message-relayer-fast contracts

* integrate message-relayer-fast into standard dockers

* Dockerize the message-relayer-fast

* update Readme.md

* remove duplicated contracts - just keep everything in /contracts

* add deploy for fast messenger

* message-relayer-fast testing

* Update serve.sh

* Delete yarn.lock

* Update constants.ts

* Create yarn.lock

* Update constants.ts

* Update function-manipulation.spec.ts

* increase the retries and other minor fixes

* Improved documentation

* fix omgx integration tests

* Update omgx-integration.yml

* integration test remove duplicated tests

* Fix units test configuration

* Update docker-compose-omgx-services.yml

* integration test setup fixes

* fix wallet integration test

* fix for crash on return

* integration tests for `message-relayer-fast`

* Update env.ts

* Autodeploy Token Bridges

* Update wallet contracts

* Update utils.ts

* improve omgx integration tests

* Add address manager address to GH actions for now

Co-authored-by: sahil kashetwar <>
Co-authored-by: Sahil k <sahil@enya.ai>
Co-authored-by: cby3149 <cby3149@outlook.com>

* merge conflicts

* GH actions regular changes

* husky

* Daily sync up (#144)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben <ben@pseudonym.party>
Co-authored-by: elenadimitrova <elena@arenabg.com>
Co-authored-by: Reggie Gomez <reggieag@gmail.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* docker: pin to alpine 3.13 for l2geth

A bug has appeared when older versions of Docker are used to build
alpine based images in alpine version 3.14. To prevent this problem
from happening to the users, this PR pins the version to 3.13.

The observed problem is that `make` cannot run any command and
the error message states `Operation not permitted.` Removing
`make` was one way to solve the problem but that would increase
the diff from upstream geth.

See these links for details:
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0

* fix: update statement for skipping codechecks

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* removed unused functions from core utils

* [added] changeset

* next gen integration tests for the OMGX stack (#149)

* next gen integration tests for the OMGX stack

* finish first pass integration test outline

* move LP tests to the `message-relayer-fast`

* Update omgx-integration.yml

* add more tests to message-relayer-fast

* connect up the .env variables

* hard code URIs

* Update utils.ts

* Update omgx-integration.yml

* fix - should have been 8080

* Update omgx-integration.yml

* which address to use?

* Update omgx-integration.yml

* removing not needed code

* remove superfluous logging code

* Update utils.ts

* Update utils.ts

* additional comments and formatting improvements

* fix: use older changes on tests (#152)

* fix: use older structure

* correct messenger

* LP fees on the correct side

* correct messenger

* rearrange depl order

Co-authored-by: Souradeep Das <dsouradeep2@gmail.com>

* Update README_OMGX.md (#150)

Refactored some changes and added some comments I thought might be helpful for people.

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: re-enable all tests (#155)

* re-enable all tests

* re-enable all tests

* Add solhint to contracts package

* Turn off compiler-version rule in solhint

* Add suggestions by @maurelian
https://github.com/ethereum-optimism/optimism/pull/1033#issuecomment-866146467

* Change solhint output formatting to table

* Disable contract-name-camelcase rule in solhint

* Fix max-line-length linting issues in contracts

* Fix quotes linting issues in contracts

* Remove private-vars-leading-underscore rule in solhint

* Add contracts linting to github action

* Fix for hardhat account balance parsing

* Disable generating the bytecodeHash in hardhat contract artifacts

* Review fixes

* Fix review notes

* Fix smockit for a change in hardhat ^2.4.0
which changes the way it parses errors from returndata
Fix provided by @smartcontracts

* dtl: configurable gas price backend

Adds a new config option `--l1-gas-price-backend` or
`DATA_TRANSPORT_LAYER_L1_GAS_PRICE_BACKEND` that can be set to `l1` or
`l2`. This impacts the behavior of the HTTP endpoint `GET /eth/gasprice`
by changing what is queried to return the L1 gas price. The L1 gas price
is required to compute the L2 fee since the L2 fee consists of
`L1 gas price * L1 gas used + L1 gas price * L2 gas limit`. If the L1
gas price differs too much between different L2 providers, then users
using `eth_estimateGas` may submit transactions with too low of a fee
and be unable to submit transactions to the sequencer.

By configuring the DTL to use L2 as the L1 gas price backend, it will
call the Sequencer's RPC endpoint `rollup_gasPrices` which returns the
L1 and L2 gas prices from the point of view of the sequencer. The L2 gas
price exists in the state, so that will always be the same between the
sequencer and any replicas. The L1 gas price does not live on chain, so
querying for it from the sequencer directly will ensure that users send
transactions with a fee that is large enough.

Also adds eth/gasprice info to README.

* Remove bl wl service  (#154)

* replace `bl-wl` with direct calls the `omgx_deployer`

* Update docker-compose-omgx-services.yml

* Update up_local.sh

* Add CORS headers to http servers

* updated frontend to use the two new HTTP servers for the addresses

* update webwallet to work with both local and rinkeby

* Add missing .env variables to GH actions

* re-enable docker tages

* re-enable wallet transaction history

* Update up_local.sh

* Update up_local.sh

* Add flag to omgx_deployer to only serve addresses w/o deploying new contracts

* Update docker-compose-omgx-services.yml

* Add back tagging system and improved reliability of GH actions

* removed commented out service

* add rinkeby token addresses (#161)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix: lint deploy-l2 folder in contracts

* Add AWS integration (#159)

* Add AWS integration

* Remove artifacts

* updated ops_omgx/README.md and added .github/workflows/deploy2aws-integration.yml and .github/workflows/push2aws.yml

* add automated provision and deletion of an ec2 instance for running the integration tests

Co-authored-by: Petar Denev <pdenev@gmail.com>

* fix: update CI to avoid running out of memory

* Version Packages

* ci: release latest image tags on release

* feat: update README to include info about rebasing

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* merge conflicts

* re-comment out the usual GH actions

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

* Add replica (#169)

* fix: update erc20 deposits (#166)

* fix: update erc20 deposits

* fix: auto default token

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* resolve merge conflicts

* Update docker-compose.yml

* Update docker-compose.yml

* [pull] develop from ethereum-optimism:develop (#164)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Ben Wilson <bwilson@optimism.io>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* Update docker-compose.yml

* adding l1-l2 test ecs scheduled task that does verify communication between L1 and L2 and L2 to L1 (#167)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Update docker-compose.yml

* daily update (#170)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://…
InoMurko added a commit to omgnetwork/optimism that referenced this pull request Jul 18, 2021
* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Fixed CrossDomainMessenger name (#96)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

* Keep the user logged in after changing chain (#99)

* Keep the user logged in after changing chain

* Update Nft.js

* Detect if user is in the wrong chain

Co-authored-by: cby3149 <cby3149@outlook.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Merge conflics resolve (#110)

* wip

* gethl2

* wip

* batch submitter

* core utils

* DTL

* message relayer

* contracts

* wip

* Update service.ts

* DTL

* messaage-relayer

* Update yarn.lock

* final 5 files

* [pull] develop from ethereum-optimism:develop (#91)

* chore: reduce hardhat timeout to 20 seconds (#968)

* fix: force LF line endings for scripts to avoid docker problems on Windows (#974)

* fix: use correct line endings for windows

* chore: add changeset

* refactor[contracts]: Turn ExecutionManagerWrapper into a predeployed contract (#808)

* wip: Started working on L2 contract testing revamp

* test: clean tests for ProxyEOA

* style: clean imports for ProxyEOA tests

* test: port tests for ECDSAContractAccount

* fix tests and add wrapper to dump

* fix: add em wrapper to l2 deploy

* ffix: add comments to wrapper contract

* fix: add more comments

* fix: add smock comment for unbind

* Update packages/smock/src/smockit/binding.ts

* maintenance[contracts]: use dashes in chain container names (#819)

* maintenance: use dashes in chain container names

* chore: add changeset

* feat[contracts]: temporarily disable EOA upgrades (#857)

* feat[contracts]: disable eoa upgrades temporarily

* chore: add changeset

* Update OVM_ProxyEOA.sol

* fix: turn upgrade into a noop

* lint: fix

* feat[contracts]: Update Lib_AddressManager.AddressSet event to speed up data transport layer (#820)

* feat: update and improve AddressSet event

* chore: add changeset

* Update Lib_AddressManager.sol

* Reduce gas costs of deposits (#667)

* Remove messageNonce from BaseCrossDomainMessenger and use CTC queue lenght instead

Remove Abs_BaseCrossDomainMessenger and restore dedicated nonce generation in OVM_L2CrossDomainMessenger

Fix typo

* Remove sentMessages mapping from L1CrossDomainMessenger storage
and use the nonce to check for existence of replayed transaction

* Refactor out common library function for getting cross domain calldata

* Post rebase fixes

* Use the queueIndex to check the transaction was enqueued

* Fix tests for L1CrossDomainMessenger.replayMessage
Also make that test work with an actual CanonicalTransactionChain implementation rather than a smock

* Lint fixes

* Optimise the resolve calls into the AddressManager lib

* Rename the nonce parameter to be clear

* Update test name

Co-authored-by: ben-chain <ben@pseudonym.party>

* Rename getXDomainCalldata to encodeXDomainCalldata to match the new Lib_CrossDomainUtils

Co-authored-by: ben-chain <ben@pseudonym.party>

* optimism: bump gaslimit to 10 million #870 (#871)

* optimism: bump gaslimit to 10million

* chore: add changeset

* optimism: bump max gaslimit to 10 mil

* chore: add changeset

* chore: remove unnecessary changeset

* chore: remove unnecessary changeset

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: use correct contract name in tests (#921)

* fix: disable upgradability from ECDSA Account (#885)

* l2geth: remove `SignatureHashType` (#752)

* l2geth: remove tx type

* l2geth: no longer parse type in rollup client

* chore: add changeset

* chore: remove extra sighash params

* fix: do not check txtype in integration tests

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* feat[contracts]: introduce OVM_GasPriceOracle (#912)

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: configure max gas limit to 11m (#928)

Uniswap V3 contracts require that, otherwise they throw call exceptions at deployment

* Consolidate Predeploy Addresses (#931)

* added library for predeploy addresses

* refactor tests and other packages to use exported predeploys

* revert library usage in OVM_ECDSAContractAccount

* lint

* added newline

* fixed address typos

Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* chore: remove yarn-error.log and gitignore it (#956)

* feat[contracts]: Replace Lib_RingBuffer with a much simpler Lib_Buffer (#821)

* feat[contracts]: replace Lib_RingBuffer with a simpler Lib_Buffer

* chore: changeset

* test: add tests for Lib_Buffer

* lint: fix

* test: add extra coverage for Lib_Buffer

* Update packages/contracts/contracts/optimistic-ethereum/libraries/utils/Lib_Buffer.sol

Co-authored-by: ben-chain <ben@pseudonym.party>

* add some extra comments

Co-authored-by: ben-chain <ben@pseudonym.party>

* fix(contracts): import predeploys (#982)

* fix(contracts): import predeploys

* fix: lint

* feat: add hardhat deploy instructions to readme (#965)

* feat: add deployment instructions to readme

* Add changeset

* fix style

* Update README.md

* feat: fees v2 (#976)

* l2 geth: new fee logic

* l2 geth: migrate to fees package

* core-utils: new fee scheme

* chore: add changeset

* l2geth: delete dead code

* integration-tests: fix typo

* integration-tests: fixes

* fees: use fee scalar

* lint: fix

* rollup: correct gas payment comparison

* fix(integration-tests): do not hardcode gas price

* core-utils: update with new scheme

* l2geth: refactor rollup oracle

* l2geth: clean up DoEstimateGas

* l2geth: implement latest scheme

* tests: fix up

* lint: fix

* l2geth: better sycn service test

* optimism: rename to TxGasLimit

* fee: fix docstring

* tests: fix

* variables: rename

* l2geth: prevent users from sending txs with too high of a fee

* integration-tests: fix import

* integration-tests: fix type

* integration-tests: fix gas limits

* lint: fix

* l2geth: log error

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add static analysis action (#848)

* Add static analysis github action
setup python and install slither

* Add nvmrc file for setting node to v14.17

* Update slither command run to link missing contract packages from monorepo root

* Add steps for installing dependencies

* Add yarn build step to github action

* Enable colour in github action for static analysis

* Disable certain detectors

* Ensure slither does not fail build

* Add instructions on running static analysis to monorepo readme

* build(deps): bump ws from 7.4.4 to 7.4.6 in /ops/docker/hardhat (#987)

Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.4.6.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.4.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix[l2geth]: fix accidental merge conflict (#994)

* feat[message-relayer]: relay tx generator (#952)

* feat[message-relayer]: relay tx generator

* whoops, I burned our infura key

* fix minor bug

* add comments

* add more comments and clean stuff up

* add empty test descriptions

* add tests

* move smock to dev deps

* chore: add changeset

* minor cleanup to merkle tree proof function

* use bignumber math to avoid nested await

* use a better interface

* minor fixes and simplifications

* backwards compatible dtl syncing (#986)

* kovan: fix attempt

* kovan: db fix

* kovan: types are strings from db

* l2geth: parse things as strings

* chore: add changeset

* dtl: also stringify the range query

* geth: dereference

* geth: assign err

* dtl: handle null

* dtl: fix unit tests

* fix[smock]: fix broken call assertions for overloaded functions  (#996)

* fix[smock]: fix broken call assertions for overloaded functions

* chore: add changeset

* minor correction and add a test

* add a test for non-overloaded functions

* fix[message-relayer]: fix failing test because of merge with develop (#1000)

* fix[message-relayer]: remove spreadsheet mode (#998)

* fix[message-relayer]: remove spreadsheet mode

* chore: add changeset

* Lower local rollup timestamp refresh (#985)

* update rollup timestamp refresh

* increase refresh time to 5s

* feat: fees v3 (#999)

* core-utils: fee impl v3

* l2geth: fees v3 impl

* integration-tests: update for fees v3

* chore: add changeset

* fix: typo

* integration-tests: fix and generalize

* fees: update fee scalar

* l2geth: check gas in the mempool behind usingovm

* tests: fix up

* l2geth: remove dead var

* truffle: fix config

* fix: remove dead coders (#1001)

* chore: delete dead coders

* chore: add changeset

* dtl: remove dead imports

* core-utils: delete dead tests

* batch-submitter: remove txtype

* chore: add changeset

* docs[message-relayer]: add a README and improve the interface for generating proofs (#1002)

* docs[message-relayer]: add basic docs and clean up an interface

* chore: add changeset

* dtl: log error stack for failed http request (#995)

* dtl: log error stack for failed http request

* chore: add changeset

* Add rpc-proxy service for whitelisting JSON RPC methods to the sequencer. (#945)

* Add healthcheck endpoint for rpc-proxy
Added ethereum-nginx-proxy source
updated README and docker image build

* Check ETH_CALLS_ALLOWED is set, clean up comments, remove old Dockerfile

* Pass additional information across domains via token gateways (#824)

* feat(contracts): add from and data args to L1ERC20Gateway

fix(integration): add gasLimit to fundUser

refactor(contracts): add data to gateway events
add changeset

fix(integration): provide data in outboundTransfer

refactor(contracts): reset Abs_L2TokenGateway to Abs_L2DepositedToken

refactor(contracts): fix mismatched names

* feat[contracts]: add custom gas arg to gateway

fix(contracts): take max of user vs. default gas

* fix(integrations): update ovm-eth function call

* fix(integration): remove unecessary explicit gasLimit

* test(contracts): 32kb transfer, 9MM gas

* fix(contracts): fixup comment, bytes arg last

* fix(integration): args order in integrations

* fix(contracts): remove unused L2 gas arg

* fix(contracts): limit data that can be passed to L2

* fix(integration): better tests for data length

* test: check for error on too large data

* Experimental: specify gaslimit in before hook

* fix(integration): add l2 gas argument

* fix: increase gas on fundUser

* fix(contracts): remove duplicate max size limit

* fix(integration): fine tune gas amounts

* lint

* fix: large data test

* fix(integration): set gas closer to real cost

* fix(contracts): remove unused bridge variables
These variables were the default gas amounts for cross domain messages

* fix(contracts): Reorder args

Place dynamic length args last

* fix(integration): update estimateGas values

* fix(integration): reset eth withdraw estimate to 21000

* fix(integration): update expected gas amount

* fix(integration): reduce gas amount for ETH withdraw

* More consistent style for Constant values (#991)

* chore(contracts): make container addresses be constants
chore(contracts): consistent style for constant vars

* chore(contracts): add internal on predeploy constants

* feat: deployment config for fee oracle contract (#936)

* feat[contracts]: add GasPriceOracle w/o predeploy

Based on #912

* feat[contracts]: congestion price oracle

* chore: add changeset

* contracts: gas price oracle (#917)

* contracts: gas price oracle

* tests: update

* fees: fix tests

* contracts: simplify gas price oracle

* lint: fix

* test: execution price is at the 1st storage slot

* chore: rename predeploy to GasPriceOracle

* chore: rename gas price oracle test name

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* Add an L2 deploy script for gas oracle contract

* Add a kovan deployment artifact

* Add deployment to readme

* Add extra validation & initial execution price

* Update README.md

* Fix execution price logic

* Perform new deployment with final contract

* contracts: better require in ovm gas price oracle

* Deploy L2GasPriceOracle

* Update contract to use new fee logic & rename to gas

* Deploy updated contract

* Fix lint

* gas price oracle: do not restrict gas price

* gas price oracle: new deployment

* tests: delete dead test

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* ops: expose debug namespace (#1007)

* develop merge fixes

* refactor[l2geth]: queue origin type (#975)

* refactor: queueOrigin type

* Convert queueOrigin to uint8 in encode

* Add changeset

* Regenerate json marshall

* style: combine lines

* Add Stringer for QueueOrigin

* Turn QueueOrigin into uint8

* l2geth: gen tx meta fix

* l2geth: gen tx meta fix

* lint

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix(sync-service): prevent underflows (#1015)

* fix(sync-service): prevent underflows

* chore: add changeset

* chore: remove dead confirmation depth

* chore: remove eth1conf depth from rollup config

* test: remove duplicate value in array (#1014)

* ci: tag docker image for canary with abbreviated GITHUB_SHA (#1006)

* ci: tag docker image for canary with abbreviated GITHUB_SHA

* ci: update from 6 bytes to 8 bytes of abbreviation

* refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes

* dtl: remove stringify from db logic + more overflow protection (#1010)

* dtl: remove stringify from db logic

* l2geth: overflow protection

* dtl: overflow protection

* chore: add changeset

* ci: upload logs for failed integration tests (#1020)

* fix(dtl): improve slow blocking JSON parsing that occurs during l2 sync (#1019)

The use of eth_getBlockRange returns a large response which is very
slow to parse in ethersjs, and can block the event loop for upwards
of multiple seconds.

When this happens, incoming http requests will likely timeout and fail.

Instead, we will parse the incoming http stream directly with the bfj
package, which yields the event loop periodically so that we don't
fail to serve requests.

* fix: lint errors in dtl (#1025)

* fix[dtl]: fix dtl bug breaking verifiers (#1011)

* fix[dtl]: fix dtl bug breaking verifiers

* tweaks so tests pass

* chore: add changeset

* fix: deterministic blockhashes (#1032)

* config: set etherbase

* l2geth: add deterministic clique key

* l2geth: default value

* chore: add changeset

* test: add sync test for deterministic blockhash

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* Version Packages (#978)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* ci: add sync test's own workflow (#1031)

* fix(dtl): incorrect parsing of eth_getBlockRange result (#1037)

* Version Packages (#1045)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: no gas refund (#1043)

* l2geth: remove the gas refund

* chore: add changeset

* refactor[contracts]: remove one-off GasPriceOracle deployment file (#1046)

* refactor[contracts]: remove one-off gpo deployment

* chore: add changeset

* feat[contracts]: introduce new L1ChugSplashProxy contract (#1009)

* feat[contracts]: add L1ChugSplashProxy

* improve comments slightly

* start adding tests

* add more tests

* make the system pausable

* added another test

* add some extra comments

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* Update packages/contracts/test/contracts/chugsplash/L1ChugSplashProxy.spec.ts

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* chore: add changeset

* address review feedback

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* feat[contracts]: add sequencer fee wallet (#1029)

* wip: first draft of the fee wallet

* add fee wallet to dump

* rename to sequencer vault

* add L1 fee wallet to geth config

* add unit tests

* fix geth linting error

* add a basic integration test

* fix broken integration test

* add test for correct storage slot

* add integration test for fee withdrawal

* fix typo in integration tests

* fix a bug bin integration tests

* Update OVM_SequencerFeeVault.sol

* fix bug in contract tests

* chore: add changeset

* fix bug in contract tests

* build(deps): bump glob-parent from 5.1.1 to 5.1.2 (#1036)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>

* fix: predeploy gasprice oracle (#1039)

* l2geth: delete extra config options

* l2geth: stop using extra config options

* l2geth: more stop using extra config options

* chore: add changeset

* l2geth: add new config for gpo owner

* chore: add changeset

* l2geth: fix tests

* tests: fix build

* l2geth: optimize loops (#1027)

* l2geth: optimize loops

* l2geth: stop ticker when done

* l2geth: don't wait for first tick

* chore: add changeset

* Enable custom tagging of release docker image (#1048)

* ci: enable custom tagging of release docker image

* ci: refactor to add prerelease prefix for secuirty

* doc: typo

* ci: fix indentation issue of canary workflow

* ci: fix typo with GITHUB_SHA

* fix: typo in USE_HARDHAT config (#1023)

* fix: abi encoded tx (#1049)

* contracts: don't double rlp decode

* chore: add changeset

* lint: fix

* deps: update

* linting: cleanup

* feat: contracts: use selector

* fix: contracts: use typescript

* contracts: use interface

* l2geth: bump to go 1.15 (#1058)

* l2geth: bump to go 1.15

* chore: add changeset

* Change monotonicity band-aid code to log warnings not errors (#1060)

* refactor: change monotonicity band-aid code to log warnings not errors

* build: add changeset

* feat(contracts, l2geth): native ETH value support for ovmCALL (#1038)

* feat(contracts): add ovmCALL-types with native value

* add ovmCALLVALUE context

* add ovmBALANCE

* test success and revert cases

* test empty contract case

* chore: lint

* test(integration-tests): ovmCALL-types with value (compiler and wrapper)

* fix ovmDELEGATECALL type, update tests

* add ovmSELFBALANCE

* fix ovmDELEGATECALL jumping to CALL

* chore: lint

* fix(contracts): account for intrinsic gas of OVM_ETH sends

* fix(contracts): merge conflict bug

* fix(contracts): update gas benchmark

* feat(contracts, integration-tests): use new value-compatible compiler

* feat(contracts,l2geth): support value calls in OVM_ECDSAContractAccount

* fix(contracts): ovmDELEGATECALL does not change message context

* feat(contracts): sending value between EOAs

* test(integration-tests): ovmDELEGATECALL preserves ovmCALLVALUE

* test(integration-tests): assert ovmSELFBALANCEs correct

* test(integration-tests): intrinsic gas for eth value calls

* test(integration-tests): update gas values

* chore(contracts): lint

* feat(contracts, l2geth): eth_calls with nonzero value

* chore: minor fixups and comments based on PR feedback

* test(integration-tests): add requested tests from PR reviews

* test(integration-tests): ovmSELFBALANCE is preserved in ovmDELEGATECALLs

* fix(contracts): fix bug where ovmDELEGATECALL could fail if balance was lower than the ovmCALLVALUE

* chore: add changeset

* fix(contracts): update intrinsic gas for worst-case value sends

* chore: address final PR nits/improvements

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Add erc1271 support to contract account (#1052)

* add ERC1271 support, failing unit tests

* add integration test for isValidSignature

* remove .only

* lint

* add changeset

* clean up 1271 tests and lint

* switch back to using waffle wallet

* lint

* fix import

* feat[contracts]: slightly better account funding for hardhat accounts (rebased) (#1065)

* feat[contracts]: better account funding for hardhat accounts

* add a sleep to avoid any potential problems

* chore: add changeset

* fix: bug with gas estimation in funding step

* fix: limit to 20 accounts max

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* Ensure Sentry is correctly set up for DTL and MR (#1054)

* refactor: add logger and metrics to options for BaseService

* refactor: thread sentryOptions through from message-relayer into BaseService

* refactor: ensure DTL Logger is using Sentry for errors

* style: lint base-service.ts

* refactor: init Sentry on batch-submitter too

* refactor: init Sentry on message-relayer too

* refactor: pass in basic logger to MessageRelayerService

* build: provide changeset

* fix: correct usage of use-sentry boolean config

* refactor: appropriately type loggingOptions

* build: add @sentry/node

* build: add @sentry/node to message-relayer and fix linting issue

* Add more logging information to monotonicity violation logs (#1066)

* refactor: log idx of monotonicity violation from batch

* build: add changeset

* temporarily disable hardhat example tests (#1071)

* fix: monotonicity auto healer (#1070)

* fix: monotonicity auto healer

* add: changeset

* Version Packages (#1053)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Standard token bridge (#988)

* Remove abstract token gateway and deposited token implementations

* Further simplification of bridge contracts

* Standart token bridge and L2 token implementation

* Fix spacing

* Implement case when a bad deposit happens to a nonexistent L1<>L2 token pair

* Use SafeMath in common token bridge accounting

* test(contracts): fix finalizeWithdrawal test

* fix(contracts): use SafeERC20 on token deposits

* Rename OVM_L1ERC20Gateway to OVM_L1ERC20Bridge contract

* Rename iOVM_L1ERC20Gateway to iOVM_L1ERC20Bridge contract

* Cleanup gateway to bridge rename

* Better name for the mapping holding l1->l2 deposit amounts

* Use OZ SafeMath

* Rename local variables in OVM_L2DepositedERC20 from gateway to bridge

* Merge ETH and ERC20 bridge contracts

* Rename OVM_L1ERC20Bridge to OVM_L1StandardBridge and fix tests from merging the ETH and ERC20 bridges

* Better name for iAbs_BaseCrossDomainMessenger -> iOVM_CrossDomainMessenger

* Correct the bounce back of deposit sender and recipient properties

* Remove obsoleted event from OVM_L2DepositedERC20

* chore(contracts): change references from ETHGateway to Bridge

* Fix a linting error

* fix(contracts): add bridge to deployer

* Split off ERC20Bridge interface for the purposes
of being reused in custom ERC20 bridges

* Split off interface natspec definitions

* Draft version of OVM_L2DepositedERC20 splitted into a standard L2 erc20: L2StandardERC20 and
a common L2 bridge: OVM_L2StandardBridge

* style(contracts): define L1_ETH_ADDRESS as constant

* test(integration): update interface to use depositETH

* test(contracts): fix OVM_L1StandardBridge tests

* test(contracts): fix L2 Standard Bridge tests

* test(contracts): lint and remove an obsolete test case

* Fix modifier check to comply with the L2 bridge distinction from L2 token

* Simplify address <> interface casting in bridges

* Ensure natspec comments are correct
also add l1 and l2 token params to WithdrawalInitiated event for consistency

* Fix issues in L1 and L2 bridges to ensure
cross domain messages are sent only between the two bridges
also adjusted withdrawals to send to either finalizeETHWithdrawal or finalizeERC20Withdrawal
depending on which asset is being withdrawn

* Remove AddressManager from the L1 standard bridge

* REVERT ME: instruments cross domain enabled

* fix(contracts): remove Address Manager from L1 Bridge

* feat(contracts): make L2 Standard Bridge a predeploy

* WIP: update deployments for standard bridges

* WIP: update deployments for standard bridges

* l2geth: TEMP log contract calls

* chore(l2geth): replace eth gateway with standard bridge

* fix(contracts): make contract-deployment/config work

* WIP fix(integration): update integration tests for bridge

* Remove ovmEth from L1 Standard bridge as obsoleted

* Separate ERC20 standard implementation from L2 bridge

* Formatting fixes

* chore(l2geth): replace eth gateway with standard bridge

* Revert "REVERT ME: instruments cross domain enabled"

This reverts commit d5bb8f8f67974d0a3e65fc000f08858328a4bbbc.

* fix: lint ts

* Implement EIP-165 in the Standard L2 ERC20 token
Also switch that to be based off the OpenZeppelin default implementation plus mint and burn
Additionally remove the obsoleted iOVM_ERC20

* fix(contracts): add deployment check on bridge proxy
fix(contracts): whitespace
fix(contracts): init bridge implementation with non-zero address

* Remove dependency on Ownable contract for the StandardERC20 token on L2

* fix(contracts): update deployment scripts

* fix: lint

* remove debugging code

* fix: correct rpc get balance slot

* restore l2 cross domain messenger

* fix: lint

* Add a test for a non compliant token deposit

* Only allow EOAs to deposit ETH and ERC20

* Add comments and tests for ERC165 implementation

* Decide against using explicit ETH MOCK address as we're not using it for checks

* Fix linting issues

* Add onlyEOAContract restriction to standard bridge withdrawals

* Update codehashes in L2 Standard bridge

* fix(ops): remove unintentionally added file

* feat(contracts): add expectApproxGasCost function

* fix(integration): proper arrayify input on fundUser

* fix(integration): proper gas value checks

* Revert "Add onlyEOAContract restriction to standard bridge withdrawals"

This reverts commit 2713c06ceb2609e4f13718e1034a4d76210d9758.

* fix(contracts): removed unused expectApproxGasCost for now

* fix(contracts): update OVM_SequencerFeeVault for bridge changes

* lint

* Update deployment for L1 Bridge w/ ChugSplash

* Revert "l2geth: TEMP log contract calls"

This reverts commit 21d42259278449f221bf34605162229b3d9d4fa9.

* Apply suggestions from code review

* Apply suggestions from code review

* fix(contracts): deploy with chugsplash proxy

* fix(contracts): add working bridge and chugsplash proxy deployment

* fix(contracts,integration): 500k gas for depositETH

* comment(contracts): describe failed deposit handling on l2

* Apply suggestions from code review

Co-authored-by: ben-chain <ben@pseudonym.party>

* docs: add changeset

* fix(integration): set working l2 gas amount on funduser

* test(integration): add receive() test

* fix(contracts): reset receive to 1.2MM l2 gas

* test(examples): skip l1-l2 example test for now

* fix(contracts): drop hardcoded gas to 500k in receive()

* fix(contracts): use abi.encodeWithSignature

* fix(contracts): resolve merge conflicts

* feat(integration): add expectApprox for flexible gas testing

* fix(integration): fix failing gas tests

* fix: incorrect l2 gas for deposit

* Update utils.ts

* fix(workflow): disable l1-l2 example until npm imports are fixed

* chore: final round of PR review nits and tests

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>

* fix: comment out codeowners (#1073)

* fix: use predeploy constant lib for em wrapper (#1075)

* fix: use predeploy constant lib for em wrapper

* chore: add changeset

* fix[l2geth]: off-by-one sometimes breaking replica sync (#1082)

* fix[l2geth]: off-by-one sometimes breaking replica sync

* chore: add changeset

* fix(l2geth): Log 'end of OVM execution' correctly (#1080)

* refactor[contracts]: move account contracts to predeploy folder (#1085)

* refactor[contracts]: move account contracts to predeploy folder

* chore: add changeset

* maintenance[contracts]: rename precompiles test folder to predeploys (#1086)

* fix[bs]: disambiguate generic submission errors (#1051)

* fix[bs]: disambiguate generic submission errors

* add cases for errors

* separate out errors from transaction reverts with reasons

* remove extraneous errors

* WETH deposit and withdraw on OVM_ETH (#1083)

* feat(contracts): add no-op WETH9 functionality to OVM_ETH

* working WETH deposit and withdraw + tests

* add changeset

* address PR feedback

* update WETH9 contract implementation

* add fallback to WETH9

* add fallback and revert withdraw test

* update nit comment

Co-authored-by: ben <ben@pseudonym.party>

* Also move the accounts interface to iOVM/predeploys (#1087)

* refactor[contracts]: move account interface to predeploy folder

* chore: add changeset

* Version Packages (#1089)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix: use -z flag for var unset in canary

* Use Eslint instead of Tslint (#1005)

* removed tslint

* forgot to commit files

* made .eslintrc.js consistent for all subdirs and other cleanup

* [removed] includes and files keys from tsconfig.json

* removed file level linting exceptions and added details to line level

* added changeset

* fixed newly introduced linting errors from rebase

* enable json import for batch submitter

* removed ecdsa-coder

* maybe a tsconfig issue?

* Update deploy.ts

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>

* metrics[batch-submitter]: add new batch submitter metrics (#1074)

* metrics[batch-submitter]: add new batch submitter metrics

* chore: changeset

* account for failed submissions

* Fix canary publishing (#1093)

* ci: fix custom docker tag

* ci: use new env file

* ci: use outputs from previous job

* ci: fix headers of jobs

* ci: inherit canary tag from builder

* feat[ci]: upload logs for sync tests if failure (#1098)

* deploy: goerli 0.4.0 (#1099)

* deployments: goerli 0.4.0 rc

* readme: update

* chore: add changeset

* fix[dtl]: defend against RPC provider missing events (#1084)

* fix[dtl]: defend against RPC provider missing events

* chore: add changeset

* respond to review comments

* better error handling for missing handlers

* deploy: kovan v.4.0 rc (#1101)

* deploy: kovan v0.4.0 rc

* chore: add changeset

* readme: update

* maintenance[monorepo]: first pass update to README (#1106)

* maintenance[monorepo]: first pass update to README

Doing some relatively minor updates to the README just to clean things up a bit.

* replying to review comments

* Move the metric prefix string to a label (#1047)

Added changeset and fixes
Changeset to patch

* fix[smock]: add support for hardhat 2.4.0 (#1112)

* fix[smock]: add support for hardhat 2.4.0

* chore: add changeset

* lint: fix

* build(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#1064)

Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Misc. small improvements to README (#1115)

* Update README.md

* Update README.md

* fix[dtl]: use the same L2 chain ID everywhere (#1122)

* fix[dtl]: use the same L2 chain ID everywhere

* chore: add changeset

* fix: make sync tests only on workflow dispatch (#1123)

* fix[dtl]: remove old stringification function (#1134)

* fix[dtl]: remove old stringification function

* chore: add changeset

* fix[dtl]: log server errors as ERROR instead of INFO (#1133)

* fix[dtl]: log server errors as ERROR instead of INFO

* chore: add changeset

* Contracts: connectL1Contracts & connectL2Contracts  (#713)

* Contracts: connect-contracts

* Trying to resolve build problems

* connect-contracts build working

* Adds artifacts-ovm back to gitignore

* Removes incorrect changes

* Adds copy-artifacts script

* Adds test file (not working yet)

* fix: incorrect contract instantiation

* Improves tests and removes old deployment versions

* Single source of truth for predeploy addresses

* Reverts deployments/README.md

* Makes connect-contracts more DRY

* Adds missing @ethersproject/abstract-signer dependency

* Adds argument evaluation

* Adds L1Contracts and L2Contracts types

* Attempts removing artifacts-ovm again

* Adds webpack config (not working yet)

* build: add artifacts to dist (#776)

* Updates lint rule

* Adds l2 imports

* Fixes dependency tree bug

* Removes webpack stuff

* Fixing package.json issues and adds .DS_Store to gitignore

* Removes test-contracts script

* Reverting script change

* Adds comments

* Adds comment

* Renames deployments folders

* Fixes linting errors

* Generates markdown

* build: add deployments directory to Dockerfiles

* Removes unneeded contracts, improves error handling and tests

* Adds changeset

* yarn.lock

* Removes console.log

* Changes from minor to patch version

* Fixes lint errors

Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fix: prevent overflow in abi encoding (#1135)

* l2geth: prevent overflow in abi encoding to ovm codec tx

* chore: add changeset

* tests: replica syncing (#981)

* [wip] add l2_dtl and replica images

* passing basic dummy tx test

* add erc20 test

* add sync test to ci

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>

* fix[relayer]: update exported files list in package.json (#1138)

* fix[relayer]: update exported files

* chore: add changeset

* fix: import path (#1141)

* fix: correct import path for altered contract path

* chore: add changeset

* refactor: improve logging for batch submission timeout scenarios (#1120)

* Add highest L1 and L2 block number Gauge metrics to DTL (#1125)

* build: add prom-client to data-transport-layer

* refactor: thread metrics more carefully through data-transport-layer; add two new metrics

* style: fix some style issues

* refactor: make metrics mandatory

* refactor: move metrics register code to top of file

* style: apply linting

* refactor: move promethesus initialization after express

* refactor: move promBundle call up, provide registry

* build: add changeset

* Improve Watcher ability to find transactions (#1107)

* remove listeners and use loop to find tx receipt

* add yarn ready

* moved filters inside loop

* [added] changeset

* Add minimal vscode settings and extensions (#1109)

* chore: add minimal vscode settings and extensions

* chore: Add "files.trimTrailingWhitespace" to vscode native config

* chore: replace vscode prettier plugin with eslint plugin

* fix[contracts]: remove part of MultiMessageRelayer deployment (#1144)

* fix[contracts]: remove part of MultiMessageRelayer deployment

* chore: add changeset

* Define L1 Starting block via OwnershipTransferred rather than AddressSet (#1129)

* Update service.ts

* Create thirty-years-look.md

Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* Easy fix for broken watchers (#1121)

* Easy fix for broken watchers

* Ran yarn changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* feat: go packages (#1111)

* go: add utils module

* readme: update

* Version Packages (#1094)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* build: add husky pre-commit hook to lint (#1146)

* feat[contracts]: add mainnet deploy script (#1147)

* Add mainnet deploy script

* Update mainnet.sh

* Address PR review feedback

* feat: mainnet contract deployment 0.4.0 (#1148)

* feat: mainnet contract deployment 0.4.0

* feat: deployments readme

* chore: add changeset

* contracts: remove dead contract

* contracts: remove dead config

* tests: fix to not test for old contracts

* feat: `rollup gasPrices` RPC endpoint (#1136)

* feature: l2geth  endpoint

* chore: add changeset

Co-authored-by: Liam Horne <liam@lihorne.com>

* Adds l2 standard bridge to contracts markdown file (#1151)

* Version Packages (#1150)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Add more info about our branching strategy to the README (#1114)

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Remove references to OVM_L1ETHGateway in deployments and readme (#1119)

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Elena Gesheva <elena@arenabg.com>
Co-authored-by: ben-chain <ben@pseudonym.party>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>
Co-authored-by: Rajiv Patel-O'Connor <rajiv.patel.oconnor@gmail.com>
Co-authored-by: rajivpo <rajivpatel-oconnor@Rajivs-MacBook-Pro-2.local>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Tim Myers <timmyers09@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Annie Ke <annieke8@gmail.com>
Co-authored-by: platocrat <37757724+platocrat@users.noreply.github.com>
Co-authored-by: Matt Masurka <m.masurka@gmail.com>
Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>
Co-authored-by: Alejandro Santander <Palebluedot@gmail.com>

* Re-apply key changes on top of optimism most current develop

* Add docker-compose-replica.yml (#109)

* Create docker-compose-replica.yml

* Add replica service

* Update docker-compose-omgx-replica.yml

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix linter; patch gethl2

* configure the deployer correctly

* fix proposer / batch submitter

* update chainIDs

* update rpc test

* Create README_OMGX.md

* upstream - needs more work

* Adds delay to watcher (#1159)

* Adds delay to watcher

* Simplifies delay

* Adds changeset

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

* fix: bind dtl functions for missing event codepath (#1161)

* dtl: bind this in L1 missing element error handlers

* dtl: add additional logline

* chore: add changeset

* dtl: add more metrics

* dtl: use counter instead of gauge

Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>

* fix: remove 'editor.formatOnSave' from global settings' (#1163)

* merge conflicts

* Update pre-commit

* Version Packages (#1167)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* minor

* Update pre-commit

* Fix wallet test (#119)

* Fix wallet test

* Fix deployment test

* Add Python

* Update Dockerfile.omgx_monorepo

* Remove package-lock

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Reapply standard changes on top of current develop

* Update package.json

* doc: add notes for releasing new versions with changesets (#1166)

* Bind correct object to method handler in DTL (#1168)

* fix: bind correct object to method handler

* build: add changeset

* Version Packages (#1169)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix web wallet

* Fix integration test (#124)

* Fix integration test (#125)

* Fix integration test

* Fix integration test

* Fix wallet_react

* Fix lint test

* Remove package-lock

* Update integration.yml

* Fix wallet deployer

* Collect docker log

* Fix l1-l2-deposit-withdrawal test

* Fix sync test

* Add chainID to deployer config

* make sync tests dispatch only

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Add short contribution section to primary README (#1157)

* Add short contribution section to primary README

* Update README.md

* fix: prevent batch submitter from submitting batches if low on ETH

* build: add changeset

* Eslint ignore the hardhat folder

* Update README.md

* Beginning to add working examples

* hardhart and waffle example tests

* document/check waffle

* test l1-l2 example

* add patch-package

* Update package.json

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

* merge conflict squash

* Daily sync up (#137)

* build: ensure lint only staged files on commit

* refactor: do not run --fix on lint-staged

* refactor: *.{ts,js} for eslint regex

* l2geth: rollup client explicitly checks for >= 400 errors

* l2geth: sync service retries connection to remote server

* l2geth: test errors returning from remote

* chore: add changeset

* syncservice: nit

* feat[message-relayer]: add easy relay tool

* chore: add changeset

* upkeep[monorepo]: add changeset info to README

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Update message relayer fast contracts (#139)

* prepare for wallet reorg

* Create yarn.lock

* fix hardhat bug

* merge conflict resolve

* daily sync up (#141)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* fix(contracts): prevent L2->L1 calls to system contracts

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: ben <ben@pseudonym.party>

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

* DRAFT move react wallet and the contracts to more clear folders (#138)

* DRAFT move react wallet and the contracts to more clear folders

* merging the axios integration chagnes

* updated the message-relayer-fast contracts

* integrate message-relayer-fast into standard dockers

* Dockerize the message-relayer-fast

* update Readme.md

* remove duplicated contracts - just keep everything in /contracts

* add deploy for fast messenger

* message-relayer-fast testing

* Update serve.sh

* Delete yarn.lock

* Update constants.ts

* Create yarn.lock

* Update constants.ts

* Update function-manipulation.spec.ts

* increase the retries and other minor fixes

* Improved documentation

* fix omgx integration tests

* Update omgx-integration.yml

* integration test remove duplicated tests

* Fix units test configuration

* Update docker-compose-omgx-services.yml

* integration test setup fixes

* fix wallet integration test

* fix for crash on return

* integration tests for `message-relayer-fast`

* Update env.ts

* Autodeploy Token Bridges

* Update wallet contracts

* Update utils.ts

* improve omgx integration tests

* Add address manager address to GH actions for now

Co-authored-by: sahil kashetwar <>
Co-authored-by: Sahil k <sahil@enya.ai>
Co-authored-by: cby3149 <cby3149@outlook.com>

* merge conflicts

* GH actions regular changes

* husky

* Daily sync up (#144)

* build: set up eslint prettier correctly

* style: run yarn lint --fix at root

* build: add necessary packages to workspace root

* build: remove --format stylish

* build: set semvery ranges to match across packages

* build: set up prettierrc.js for monorepo

* refactor: rename Range to BlockRange

* build: set up correct working directories

* build: set up lint:fix to use eslint not prettier

* style: run lint:fix on all code

* build: remove prettier extension recommendation

* style: update configuration to include babel-eslint for .js linting

* build: set concurrency to 1 to prevent git add errors on lerna lint

* github actions: bump geth CI golang version

* fix(contracts): prevent L2->L1 calls to system contracts

* Add Factory contract for creating standard ERC20 tokens
compliant with the standard bridge

* Disallow 0 address for l1 token when creating l2 standard token

* Fix linting issue

* Add deployment script for the L2 token factory

* Fix deploy script OVM_L2StandardTokenFactory constructor params

* Add changeset

* Cleanup deployment script for OVM_L2StandardTokenFactory
and fix a solidity linting error

* refactor(integration): Add clarity to the expectApprox function signature

* fix: skip codechecks for PRs from external repos

Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: ben <ben@pseudonym.party>
Co-authored-by: elenadimitrova <elena@arenabg.com>
Co-authored-by: Reggie Gomez <reggieag@gmail.com>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>

* docker: pin to alpine 3.13 for l2geth

A bug has appeared when older versions of Docker are used to build
alpine based images in alpine version 3.14. To prevent this problem
from happening to the users, this PR pins the version to 3.13.

The observed problem is that `make` cannot run any command and
the error message states `Operation not permitted.` Removing
`make` was one way to solve the problem but that would increase
the diff from upstream geth.

See these links for details:
https://github.com/alpinelinux/docker-alpine/issues/182
https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0

* fix: update statement for skipping codechecks

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* removed unused functions from core utils

* [added] changeset

* next gen integration tests for the OMGX stack (#149)

* next gen integration tests for the OMGX stack

* finish first pass integration test outline

* move LP tests to the `message-relayer-fast`

* Update omgx-integration.yml

* add more tests to message-relayer-fast

* connect up the .env variables

* hard code URIs

* Update utils.ts

* Update omgx-integration.yml

* fix - should have been 8080

* Update omgx-integration.yml

* which address to use?

* Update omgx-integration.yml

* removing not needed code

* remove superfluous logging code

* Update utils.ts

* Update utils.ts

* additional comments and formatting improvements

* fix: use older changes on tests (#152)

* fix: use older structure

* correct messenger

* LP fees on the correct side

* correct messenger

* rearrange depl order

Co-authored-by: Souradeep Das <dsouradeep2@gmail.com>

* Update README_OMGX.md (#150)

Refactored some changes and added some comments I thought might be helpful for people.

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* tests: re-enable all tests (#155)

* re-enable all tests

* re-enable all tests

* Add solhint to contracts package

* Turn off compiler-version rule in solhint

* Add suggestions by @maurelian
https://github.com/ethereum-optimism/optimism/pull/1033#issuecomment-866146467

* Change solhint output formatting to table

* Disable contract-name-camelcase rule in solhint

* Fix max-line-length linting issues in contracts

* Fix quotes linting issues in contracts

* Remove private-vars-leading-underscore rule in solhint

* Add contracts linting to github action

* Fix for hardhat account balance parsing

* Disable generating the bytecodeHash in hardhat contract artifacts

* Review fixes

* Fix review notes

* Fix smockit for a change in hardhat ^2.4.0
which changes the way it parses errors from returndata
Fix provided by @smartcontracts

* dtl: configurable gas price backend

Adds a new config option `--l1-gas-price-backend` or
`DATA_TRANSPORT_LAYER_L1_GAS_PRICE_BACKEND` that can be set to `l1` or
`l2`. This impacts the behavior of the HTTP endpoint `GET /eth/gasprice`
by changing what is queried to return the L1 gas price. The L1 gas price
is required to compute the L2 fee since the L2 fee consists of
`L1 gas price * L1 gas used + L1 gas price * L2 gas limit`. If the L1
gas price differs too much between different L2 providers, then users
using `eth_estimateGas` may submit transactions with too low of a fee
and be unable to submit transactions to the sequencer.

By configuring the DTL to use L2 as the L1 gas price backend, it will
call the Sequencer's RPC endpoint `rollup_gasPrices` which returns the
L1 and L2 gas prices from the point of view of the sequencer. The L2 gas
price exists in the state, so that will always be the same between the
sequencer and any replicas. The L1 gas price does not live on chain, so
querying for it from the sequencer directly will ensure that users send
transactions with a fee that is large enough.

Also adds eth/gasprice info to README.

* Remove bl wl service  (#154)

* replace `bl-wl` with direct calls the `omgx_deployer`

* Update docker-compose-omgx-services.yml

* Update up_local.sh

* Add CORS headers to http servers

* updated frontend to use the two new HTTP servers for the addresses

* update webwallet to work with both local and rinkeby

* Add missing .env variables to GH actions

* re-enable docker tages

* re-enable wallet transaction history

* Update up_local.sh

* Update up_local.sh

* Add flag to omgx_deployer to only serve addresses w/o deploying new contracts

* Update docker-compose-omgx-services.yml

* Add back tagging system and improved reliability of GH actions

* removed commented out service

* add rinkeby token addresses (#161)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* fix: lint deploy-l2 folder in contracts

* Add AWS integration (#159)

* Add AWS integration

* Remove artifacts

* updated ops_omgx/README.md and added .github/workflows/deploy2aws-integration.yml and .github/workflows/push2aws.yml

* add automated provision and deletion of an ec2 instance for running the integration tests

Co-authored-by: Petar Denev <pdenev@gmail.com>

* fix: update CI to avoid running out of memory

* Version Packages

* ci: release latest image tags on release

* feat: update README to include info about rebasing

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* merge conflicts

* re-comment out the usual GH actions

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

* Add replica (#169)

* fix: update erc20 deposits (#166)

* fix: update erc20 deposits

* fix: auto default token

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* resolve merge conflicts

* Update docker-compose.yml

* Update docker-compose.yml

* [pull] develop from ethereum-optimism:develop (#164)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://kovan.optimism.io npx hardhat set-l2-gasprice \
    --l2-gas-price 1
```

This hardcodes the predeploy address of the `OVM_GasPriceOracle` smart
contract and the Owner must be used to do the updating, otherwise the
transaction will revert.

* Add op_exporter for sequencer metrics and health endoint
Added metric for sequencer health
Added Dockerfile for op_exporter;
Fixed Dockerfile path

* feat[integration-tests]: make tests work for prod networks

* chore: add changeset

* Increase client_body_buffer_size for rpc-proxy
Added client_max_body_size to rpc-proxy config

* l2geth: use `hexutil.Big` to prevent overflows

The `RollupClient` decodes the JSON from the DTL as a uint64,
this updates it to be a `big.Int`

Includes a test for the value field that ensures it does not overflow

* ci(contracts): only run codecov if contracts package is modified

In order to skip running the CodeCov job when it isn't relevant, a new job was added to the ts-packges workflow. For a PR, this job identifies all the files modified between the base branch and the tip of the PR branch, and writes to a variable which can be used to decide if subsequent jobs should run.

Github Actions provides an easy method for achieving this at the level of a workflow, but not for specific jobs within a workflow.

* Version Packages

* chore(ci): Skip codecov on push events

* feat: add workflow for running SNX test suite

* go: implement gasprices package

The `gasprices` package implements the logic that updates
L2 gasprices on the Optimistic Ethereum Network.

Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* gas-oracle: implement and test

This commit adds the `gas-oracle` which is an offchain entity
that sends transactions to L2 to update the gas price. It must
be configured with a private key as the `OVM_GasPriceOracle`
is owned.

The `gas-oracle` is added to the changesets setup.

Tests are included as well as CI. Dockerizing will happen
in a follow up PR.

* gas-oracle: ci + docker build/publish

Adds a dockerfile for the `gas-oracle` as well as adding it as
a service in the `docker-compose.yaml`. It is not enabled by
default due to memory issues in CI already happening occasionally
where the integration tests are oom killed.

The `gas-oracle` is configured with a key that owns the
`OVM_GasPriceOracle`.

This PR adds the `gas-oracle` to the Github Actions
workflow that is responsible for publishing the docker images.

Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com>
Co-authored-by: Ben Wilson <bwilson@optimism.io>
Co-authored-by: Kelvin Fichter <kelvin@optimism.io>
Co-authored-by: smartcontracts <kelvinfichter@gmail.com>
Co-authored-by: Ben Wilson <82120899+optimisticben@users.noreply.github.com>
Co-authored-by: Kevin Ho <kevinjho1996@gmail.com>
Co-authored-by: Liam Horne <liam@lihorne.com>
Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Karl Floersch <karl@karlfloersch.com>

* Update docker-compose.yml

* adding l1-l2 test ecs scheduled task that does verify communication between L1 and L2 and L2 to L1 (#167)

Co-authored-by: CAPtheorem <79423264+CAPtheorem@users.noreply.github.com>

* Update docker-compose.yml

* daily update (#170)

* contracts: add set-l2-gasprice task

This task allows a user to update the L2 gas price using hardhat.
An example of doing so would be:

```bash
$ export CONTRACTS_DEPLOYER_KEY=0x..
$ CONTRACTS_RPC_URL=https://…
theochap pushed a commit that referenced this pull request Dec 10, 2025
OptimismBot pushed a commit that referenced this pull request Dec 18, 2025
* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Dec 19, 2025
* WIP: opcmv2 upgrade op chain (#752)

* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>

* feat: adds intermediary struct for op-deployer upgrade (#759)

* feat: adds intermediary struct for op-deployer upgrade

* chore: moved upgrade scripts to v6_0_0

* chore: remove v2 go scripts

* refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2

* feat: add support for both OPCM v1 and v2 on embedded upgrade

* refactor: make v6_0_0 fall back to v2_0_0

* refactor: add extra instructions for upgrade superchain input

* test: fix op-deployer tests

* chore: remove deploy OP chain test step

* test: use systemconfig proxy address

* fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer

* refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2

* feat: add v6_0_0 upgrade

* fix: check for 0 len OPChainConfigs

* chore: pre-pr ready

* Merge pull request #764 from defi-wonderland/fix/opcm2-upgradeopchain-comments

fix: opcm2 upgradeopchain comments

* refactor: remove enshrined v7_0_0 upgrade in op-deployer (#766)

* test: use correct game type and pass correct extra instruction to UpgradeOPChain (#768)

* test: add missing extra instructions for OPCM v2 input

* fix: add correct game type for cannon kona

* fix: opcm2 opd test and sc checks (#777)

* chore: set test timeout to 30s (#778)

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
OptimismBot pushed a commit that referenced this pull request Jan 7, 2026
* WIP: opcmv2 upgrade op chain (#752)

* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>

* feat: adds intermediary struct for op-deployer upgrade (#759)

* feat: adds intermediary struct for op-deployer upgrade

* chore: moved upgrade scripts to v6_0_0

* chore: remove v2 go scripts

* refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2

* feat: add support for both OPCM v1 and v2 on embedded upgrade

* refactor: make v6_0_0 fall back to v2_0_0

* refactor: add extra instructions for upgrade superchain input

* test: fix op-deployer tests

* chore: remove deploy OP chain test step

* test: use systemconfig proxy address

* fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer

* refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2

* feat: add v6_0_0 upgrade

* fix: check for 0 len OPChainConfigs

* chore: pre-pr ready

* Merge pull request #764 from defi-wonderland/fix/opcm2-upgradeopchain-comments

fix: opcm2 upgradeopchain comments

* refactor: remove enshrined v7_0_0 upgrade in op-deployer (#766)

* test: use correct game type and pass correct extra instruction to UpgradeOPChain (#768)

* test: add missing extra instructions for OPCM v2 input

* fix: add correct game type for cannon kona

* feat: initial add-game-type-v2 command

* test: add tests for ShouldAllowV1 flag

* refactor: remove shouldAllowV1 flag

* chore: remove unused private key flag from the add game type v2 command

* chore: remove skipping upgrade test

* chore: name changes and comments

* chore: update usage description add-game-type-v2

* test: update add-game-type-opcm-v2 tests

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2026
* feat: initial add-game-type-v2 command (#770)

* WIP: opcmv2 upgrade op chain (#752)

* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>

* feat: adds intermediary struct for op-deployer upgrade (#759)

* feat: adds intermediary struct for op-deployer upgrade

* chore: moved upgrade scripts to v6_0_0

* chore: remove v2 go scripts

* refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2

* feat: add support for both OPCM v1 and v2 on embedded upgrade

* refactor: make v6_0_0 fall back to v2_0_0

* refactor: add extra instructions for upgrade superchain input

* test: fix op-deployer tests

* chore: remove deploy OP chain test step

* test: use systemconfig proxy address

* fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer

* refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2

* feat: add v6_0_0 upgrade

* fix: check for 0 len OPChainConfigs

* chore: pre-pr ready

* Merge pull request #764 from defi-wonderland/fix/opcm2-upgradeopchain-comments

fix: opcm2 upgradeopchain comments

* refactor: remove enshrined v7_0_0 upgrade in op-deployer (#766)

* test: use correct game type and pass correct extra instruction to UpgradeOPChain (#768)

* test: add missing extra instructions for OPCM v2 input

* fix: add correct game type for cannon kona

* feat: initial add-game-type-v2 command

* test: add tests for ShouldAllowV1 flag

* refactor: remove shouldAllowV1 flag

* chore: remove unused private key flag from the add game type v2 command

* chore: remove skipping upgrade test

* chore: name changes and comments

* chore: update usage description add-game-type-v2

* test: update add-game-type-opcm-v2 tests

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>

* chore: opcm2 addgametypev2 comments (#780)

* chore: move ABI types to lib file

* chore: move hardcoded values to constants file

* refactor: make abi_types use MustType

* test: deploys OPCM v2 for use during CLI testing (#784)

* test: deploys OPCM v2 for use during CLI testing

* chore: reference a github issue for TODO

* test: add assertions on the output of add game type command

* test: update cli tests (#792)

* chore: Address review comments (#793)

* refactor: remove re-declared flags from add-game-type v2

* chore: remove irrelevant TODO

* refactor: rename "add-game-type-opcm-v2" command to "add-game-type-v2"

* test: add cache dir check for add-game-type-v2

* test: removes cache dir files check on e2e test (#794)

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
louisliu2048 added a commit to okx/optimism that referenced this pull request Jan 15, 2026
* test: use a custom Test contract for makeAddr (ethereum-optimism#18509)

* test: use a custom Test contract for makeAddr

This PR introduces a light wrapper around the forge Test contract
specifically for the purpose of making sure people are using a
version of makeAddr that will always be reproducible. Without this
makeAddr uses a private key which means that fork tests can be
unreliable if people mess with these addresses on mainnet.

* fix: compilation failures

* fix: linting issues, version issues

* test: update succinct tests to follow our conventions (ethereum-optimism#18452)

* test: update succinct tests to follow our conventions

* fix: test naming and remove unused imports

* chore: add AccessManager snapshots

Contract changed from abstract to concrete, now needs snapshot files.

* fix: specify GameOver revert in expectRevert

* fix: snapshot for access manager

* fix: create interface for contract

* fix: snapshot semver bump

* fix: bump semver

* chore: bump semver

* fix: semver lock mismatch

* fix: enforce strict pragma for deterministic init code hashes

* chore: fix pragma

* fix: lock pragma versions

* fix: semver lock passing

* chore: cleanup whitespace

* chore: bump semver

* chore: reduce diff

* fix: strict pragma

* feat: fix for ci and compiler profile

* chore: forge fmt

* fix: regenerate semver-lock with clean build

The semver-lock.json had incorrect hashes due to stale build
artifacts. Clean build restores hashes to match develop.

* fix: semgrep for proxy

* fix: workaround for potential cache issue

* chore: clean build semver bump

* fix: remove troubleshooting

* chore: bump semver

* fix: compiler setting issues

* chore: remove helper for vm.getCode

* refactor: reuse DisputeGameFactory_TestInit in OPSuccinct tests

Remove duplicated setup logic from OPSuccinctFaultDisputeGame tests
by inheriting from DisputeGameFactory_TestInit instead of Test.

- Add setupOPSuccinctFaultDisputeGame() helper to DisputeGameFactory_TestInit
- Add OPSuccinctGameParams struct for configurable game parameters
- Remove ~100 lines of duplicated contract deployment code
- Update variable references to use inherited contracts

* refactor: rename OPSuccinctFaultDisputeGame to OptimisticZkGame

Align contract naming with op-challenger's OptimisticZKGameType.

Renames:
- IOPSuccinctFaultDisputeGame -> IOptimisticZkGame
- OPSuccinctFaultDisputeGame -> OptimisticZkGame
- Test contracts and helper functions updated accordingly

* chore: remove unused import

* chore: bump snapshots

* fix: update abi_loader.go embed path after rename

* fix: update snapshots

* fix: circle ci cache fix

* fix: ci cache

* chore: add back placeholder for opsuccinet

* chore: remove cache-lite

* fix: make OptimisticZkGame tests compatible with fork mode

Replace hardcoded block numbers and game indices with dynamically
calculated values based on anchor state. This allows tests to pass
in both regular mode (empty factory) and fork mode (mainnet fork
with existing games).

* fix: skip OptimisticZkGame tests on fork

Tests create games with specific state assumptions that conflict
with existing state on forked networks.

* fix: use same pattern as fault dispute game

* chore: check CI skpping for tests for op zk

* fix: remove OPSuccinctFaultDisputeGame from compiler restrictions

* fix: move OptimisticZk type into GameTypes and update usage

* fix: bump semver

* feat: revert opcm v1 & add opcmv2 op-deployer support (ethereum-optimism#18399)

* feat: revert opcm v1 on public interface functions (ethereum-optimism#699)

* feat: revert opcm v1 on public interface functions

* fix: add dev flag check for OPCM v2

* feat: OPCM v2 support on for op-deployer (ethereum-optimism#701)

* feat: add feature flag initial

* feat: add feature flags to deploy chains using OPCM v2

* chore: remove unused function, update helper function names

* chore: remove unused DeployOPChainV2

* chore: add todo for obtaining a superchain config per deployment

* fix: remove unnecessary arg and replace function visibility

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>

* fix: add superchainConfig input & fix tests in deployopchain (ethereum-optimism#705)

* fix: add superchainConfig input & fix tests in deployopchain

* docs: add TODOs

* feat: add opcmv2 flag to deployImplementations and apply opcmv2 deployment test

* feat: add opcmv2 flag to deployImplementations and add apply opcmv2 deployment test

* fix: hardcode flag to avoid import cycles & refactor createOPCMContractV2

* fix: remove todo comment

* fix: deploy implementations test branching

* refactor: add deployOPCMStandardValidatorV2

* fix: add test and script checks

* fix: remove cgt & fix tests (ethereum-optimism#736)

* fix: remove cgt

* fix: query chainIdToBatchInboxAddress in chain assertions script

* fix: add skip deploy ocpmv1 when v2 enabled

* refactor: remove unnecesary function

* fix: opcm semver

* chore: add todo comment with issue number (ethereum-optimism#737)

---------

Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com>

* refactor: match assert pattern on OPCM v1 (ethereum-optimism#749)

* refactor: adheres OPCM v1 revert function to assert pattern

* chore: enable deny_warnings on foundry.toml

* chore: pre-pr ready

* fix: add implementations for StandardValidator when using OPCMv2

* chore: pre-pr ready (ethereum-optimism#758)

* fix: remove cgt checks for opcmv2 (ethereum-optimism#765)

* chore: opcm revert develop sync (ethereum-optimism#769)

* feat(ci): mise; cache & retries. (ethereum-optimism#18572)

* op-node: Light CL: Always Follow Source using CL (ethereum-optimism#18571)

* wiring for l2.follow.source

* Follow Safe without handling external safe > local unsafe

* safe follow

* safe follow consider unsafe gap EL Sync

* follow finalized

* Comments

* cleanup

* drop unused interface methods

* sanity check external finalized

* Adjust follow source log level

* op-devstack: Follow Source Support

* op-acceptance-tests: Follow Source

* op-devstack: Follow Source Support

* simplify labeling

* l1 reorg protection: reset

* add reorg tc

* typo

* follow source: check unsafe

* convention

* Add unsafe only reorg test

* devstack/acceptance test : rename FollowSource to FollowL2

* follow upstream source enabled when derivation disabled, reorg detection

* fix unsafe only reorg sync test comments

* rm unused interface method

* dsl

* devstack support for ext sync test + follow l2

* op-acceptance-tests: Follow L2 using Ext + SyncTester

* use blockref

* fix log msg err

* Fix composite interface naming

* op-node: Follow Source: EL / CL support

* devstack: Allow EL or CL to be follow source

* Inject CurrentL1

* logs for injecting CurrentL1

* refactor to less rpc calls

* acceptance-tests: Check CurrentL1 is advancing

* linter

* fix error args

* sanity check external values using L1

* op-node: Follow Source CL and drop unsafeOnly

* op-acceptance-tests: drop EL follow source / Unsafe Only tests

* op-devstack|acceptance-tests: Follow Source CL

* op-node: Follow Client: only allow CL source

* drop unused args

* rm redundant unsafe head reorg logic

* rm unused dsl

* Do not use functions

* chore: Add SafeRename ioutil utility (ethereum-optimism#18610)

* chore: Add SafeRename ioutil utility

* fix: Lint

* proofs: Update pinned kona client version (ethereum-optimism#18611)

* feat: have OPCMv2 check upgrade ordering version (ethereum-optimism#18583)

* feat: have OPCMv2 check upgrade ordering version

This PR introduces a check in OPCM that validates that the
version difference in the previous OPCM and the current OPCM is
acceptable. This PR explicitly disallows skipping OPCM versions
which was previously an implicit requirement.

* fix: properly set version testing flag

* fix: semver lock

* fix: move valid instructions allowance

* fix: semver lock

* fix: better mechanism for checking permitted upgrades

* fix: properly run permitted upgrade sequence tests

* chore: bump opcmv2 to v7 (ethereum-optimism#18631)

* chore: bump opcmv2 to v7

* fix: correct version in upgrade sequence

* fix: broken tests

* op-chain-ops: Add command to calculate an output root from an EL endpoint. (ethereum-optimism#18626)

* verify opcm v2 (ethereum-optimism#18590)

* verify opcm v2

* fixes

* fixes

* some fixes

* some fixes

* some fixes

* fix verifyOPCM v1 tests

* fix verifyOPCM v1 tests

* fix ci checks

* better approach to tests, less diff

* improve test coverage

* fix typo

* fix semver

* Update packages/contracts-bedrock/scripts/deploy/VerifyOPCM.s.sol

Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>

---------

Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>

* codeowners(op-deployer): add platforms team as codeowners (ethereum-optimism#18635)

* ci: Fix contracts test-upgrade test junit output (ethereum-optimism#18637)

* ci: Fix contracts test-upgrade test junit output

* fix test-upgrade xml output

* proofs: Add provable output roots to super DGs (ethereum-optimism#18605)

* proofs: Add provable output roots to super DGs

This patch updates the SuperFaultDisputeGame to explicitly prove output
roots contained in the super root. This is accomplished by requiring
proposers to provide the preimage of the super root when creating a
SuperFaultDisputeGame.

The Super DG is then extended with a rootClaim(uint256 _l2ChainId)
method that returns specific output roots contained in the proposal.
This allows withdrawals to be proven using only an output root.

* review comments

* fix nits; update interfaces

* update snapshots

* fix panic in non-l2oo proposals

* op-program: Reduce disk usage of preimage prestate builds in ci (ethereum-optimism#18641)

* all: upgrade op-geth (ethereum-optimism#18646)

Pull in superchain registry changes and a few other minor changes.

No upstream merges.

* refactor+fix(op-node/sequencing): l1 origin selection improvements (ethereum-optimism#18589)

* WIP

* wip

* WIP

* Treat NotFound next L1 origin as chain end

* Use recover mode in sequence window expiry test

* Invoke fault proof earlier and fix typos

Run env.RunFaultProofProgram after computing l2SafeHead
(l2SafeHead.Number.Uint64()/2) and replace the FromGenesis call with
RunFaultProofProgram. Fix minor comment typos and wrap a long log line.

* reduce diff

* Use requireL1OriginAt helper in test

Replace manual error assertions around FindL1Origin with
requireL1OriginAt and remove the now-unused derive import.

* Introduce L2Sequencer.ActMaybeL2StartBlock

* add TestRecoverModeWhenChainHealthy acceptance test

sysgo only

* Add SetSequencerRecoverMode and enable debug logs

* Adjust L1 block time and sequence window test

Set default L1 block time to 12s to match action helper assumptions.
Increase sequencer window size in the test to 50. Compute drift from
UnsafeL2 headers (use UnsafeL2.L1Origin). Simplify L1 mining to always
BatchMineAndSync and remove the extra numL1Blocks > 10 lag guard.

* restore stub

* WIP

* name errs

* refactor

* fix

* add test

* Rename error constant and add L1 origin tests

Rename ErrInvalidL1OriginChild to ErrNextL1OriginOrphaned and adjust the
error text. Add test cases covering L1 reorg and invalid L1 origin, and
refactor the test case construction in the unit test.

* Use drift check for next L1 origin and update tests

Compute driftNext and use it to decide adoption of the next L1 origin
instead of comparing absolute timestamps. Bump MaxSequencerDrift to 1800
and add tests covering max-drift and negative-drift scenarios.

* Refactor L1 origin selection and error handling

Delegate origin decision logic to FindL1OriginOfNextL2Block and handle
synchronous fetch when in recover mode. Remove recover-mode fetching
from CurrentAndNextOrigin and return cached values instead. Update
sequencer error handling to distinguish invalid/orphaned origin (which
triggers a reset) from temporary lookup errors.

* fixes

* fixes

* lint

* don't use pointers

saves some translation code

* handle retries without a "temporary error"

fixes action tests

* use Fjord drift constant

* fix origin_selector_test

mainly just asserting on sentinel errors, and taking account of small
optimization (fewer network calls)

* Simplify FindL1Origin

* move new pure function into a method on los

* Update comment to refer to empty nextL1Origin

* Use errors.Is for L1 origin error checks

* Return L1 origin on validation errors

* Add expectedResult to origin selector tests

Set expectedResult for the test cases with l2Head d1000 and e1000 to
assert the expected L1 origins (c101 and c100 respectively)

* Add assertion message and clarify origin comments

Provide a helpful failure message in sequence_window_expiry_test when
the safe head doesn't advance after the sequencing window expires.
Document that the current L1 origin should always be non-empty and add a
panic guard. Clarify the rationale for requiring the next L1 origin,
include a source link, and note the effect on unsafe block production.

* Store recoverMode and add comment period

* Update op-node/rollup/sequencing/origin_selector.go

Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>

* Update op-node/rollup/sequencing/origin_selector.go

Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>

* feat: add ReadSuperchainDeployment support for opcm v2 (ethereum-optimism#18520)

* feat: add readsuperchaindeployment for opcm v2

* fix: argument in PopulateSuperchainState & add docs  (ethereum-optimism#734)

* fix: set superchainConfig to zero for populateSuperchainState with opcmV1

* docs: add clarification of opcmv1 deprecation

* fix: remove unused opcmV2Enabled var

* test: opcm2 add read sup chain tests (ethereum-optimism#754)

* chore: expand comment on ReadSuperchainDeployment.s.sol and init.go

* test: add additional test cases for PopulateSuperchainState and InitLiveStrategy

* fix: adds the right number of hex digits to OPCMV2DevFlag in devfeatures.go (ethereum-optimism#755)

* fix: remove branching in init.go & link TODO issue (ethereum-optimism#760)

* docs: link todo issue

* refactor: remove branching in init.go WIP

* fix: remove unused opcmv2 feature flag

* fix: remove console logs

* fix: set original timeout, fix isOpcmV2 version and add populateSuperchainState tests

* fix: set original timeout

* fix: isOpcmV2 version

* feat: add test cases for populateSuperchainState and unify tests

* fix: ocpm version comments

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>
Co-authored-by: OneTony <onetony@defi.sucks>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>

* fix: opcmv2 view function calls

---------

Co-authored-by: Stefano Charissis <stefano@oplabs.co>
Co-authored-by: Changwan Park <pcw109550@gmail.com>
Co-authored-by: Ján Jakub Naništa <jan.jakub.nanista@gmail.com>
Co-authored-by: Inphi <mlaw2501@gmail.com>
Co-authored-by: smartcontracts <14298799+smartcontracts@users.noreply.github.com>
Co-authored-by: Adrian Sutton <adrian@oplabs.co>
Co-authored-by: Michael Amadi <amadimichaeld@gmail.com>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
Co-authored-by: serpixel <5087962+serpixel@users.noreply.github.com>
Co-authored-by: Josh Klopfenstein <joshklop@oplabs.co>
Co-authored-by: George Knee <georgeknee@googlemail.com>
Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>
Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>
Co-authored-by: OneTony <onetony@defi.sucks>

* Revert "chore: opcm revert develop sync (ethereum-optimism#769)"

This reverts commit d84f0b9.

* fix: sync commit

---------

Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com>
Co-authored-by: OneTony <onetony@defi.sucks>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
Co-authored-by: Stefano Charissis <stefano@oplabs.co>
Co-authored-by: Changwan Park <pcw109550@gmail.com>
Co-authored-by: Ján Jakub Naništa <jan.jakub.nanista@gmail.com>
Co-authored-by: Inphi <mlaw2501@gmail.com>
Co-authored-by: smartcontracts <14298799+smartcontracts@users.noreply.github.com>
Co-authored-by: Adrian Sutton <adrian@oplabs.co>
Co-authored-by: Michael Amadi <amadimichaeld@gmail.com>
Co-authored-by: serpixel <5087962+serpixel@users.noreply.github.com>
Co-authored-by: Josh Klopfenstein <joshklop@oplabs.co>
Co-authored-by: George Knee <georgeknee@googlemail.com>
Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>

* chore: improve comments accuracy (ethereum-optimism#741) (ethereum-optimism#18622)

* chore: improve comments accuracy (ethereum-optimism#741)

* fix: semver (ethereum-optimism#772)

---------

Co-authored-by: Chiin <77933451+0xChin@users.noreply.github.com>

* op-e2e: Fix super proposals in super DG tests (ethereum-optimism#18647)

* op-deployer: Ignore max-code-size limits during deployment (ethereum-optimism#18642)

* op-sync-tester: Support engine_exchangeCapabilities (ethereum-optimism#18628)

Required for Kona

* op-devstack: Support kona light CL (ethereum-optimism#18627)

* op-service: blob priority fee (tip cap) tracking for op-batcher (ethereum-optimism#18386)

* op-service: new bgpo module

* op-batcher, op-service: integrate bgpo

* op-service, op-batcher: wait for cache prepopulation; DefaultPriorityFee; various comments addressed

* better comments

* downgrade INFO log level to DEBUG

* better test

* chore(ai-test): skip test/periphery/drippie/dripchecks/CheckTrue.t.sol - already has comprehensive coverage (ethereum-optimism#18644)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* feat: Add OPCM v2 Support for chain upgrades to op-deployer (ethereum-optimism#18593)

* WIP: opcmv2 upgrade op chain (ethereum-optimism#752)

* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>

* feat: adds intermediary struct for op-deployer upgrade (ethereum-optimism#759)

* feat: adds intermediary struct for op-deployer upgrade

* chore: moved upgrade scripts to v6_0_0

* chore: remove v2 go scripts

* refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2

* feat: add support for both OPCM v1 and v2 on embedded upgrade

* refactor: make v6_0_0 fall back to v2_0_0

* refactor: add extra instructions for upgrade superchain input

* test: fix op-deployer tests

* chore: remove deploy OP chain test step

* test: use systemconfig proxy address

* fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer

* refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2

* feat: add v6_0_0 upgrade

* fix: check for 0 len OPChainConfigs

* chore: pre-pr ready

* Merge pull request ethereum-optimism#764 from defi-wonderland/fix/opcm2-upgradeopchain-comments

fix: opcm2 upgradeopchain comments

* refactor: remove enshrined v7_0_0 upgrade in op-deployer (ethereum-optimism#766)

* test: use correct game type and pass correct extra instruction to UpgradeOPChain (ethereum-optimism#768)

* test: add missing extra instructions for OPCM v2 input

* fix: add correct game type for cannon kona

* fix: opcm2 opd test and sc checks (ethereum-optimism#777)

* chore: set test timeout to 30s (ethereum-optimism#778)

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>

* op-supernode: Update superroot_atTimestamp response format (ethereum-optimism#18652)

* op-supernode: Don't treat all errors as not found.

* op-service: Define JSON marshalling for SuperV1

* op-supernode: Update superroot_atTimestamp response format

* Move the response type to the eth package so it can be reused.
* Remove unnecessary detail
* Not found responses still return the CurrentL1 instead of an error to allow challenger to differentiate between proposals in the future and blocks that just haven't been fully processed yet

* op-supernode: Make optimistic blocks available even when full super root is not available.

* op-supernode: Add JSON tag to data field.

* op-supernode: Fix super root calculation

* op-supernode: Fix grammar

* op-challenger: Implement supernode super root provider. (ethereum-optimism#18653)

* op-challenger: Implement supernode super root provider.

Not currently integrated but has unit tests passing.

* Fix sorting.

* chore(ai-test): skip test/universal/StandardBridge.t.sol - already has comprehensive coverage (ethereum-optimism#18671)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* op-acceptance-tests: fix port collisions (ethereum-optimism#18684)

* op-acceptance-tests: fix port collisions

* look for expectedID

* normalize peerID before comparison

* op-node: clarify comment (ethereum-optimism#18512)

Confusion likely led to an innocuous security report.

* check-prestate: handle go module pseudo-versions and fix kona prestate name (ethereum-optimism#18691)

* check-prestate: handle go module pseudo-versions

* check-prestate: fix default kona prestate type

* op-challenger/op-dispute-mon: Remove asterisc support (ethereum-optimism#18670)

* op-challenger: Remove support for SuperAsteriscKona game types.

* op-challenger: Remove support for asterisc and asterisc-kona game types.

* op-challenger: Restore the game type definitions.

* Restore categorisation

* batcher: remove isPectra and assume Pectra is always active (ethereum-optimism#18534)

Since the Pectra fork happened long ago, we can now assume L1 is
always running Pectra. This simplifies the batcher code by:

- Removing the isPectra parameter from ChannelConfig, TxData, and l1Tip
- Removing the isPectra check in computeSingleCalldataTxCost (now always
  uses totalCostFloorPerToken = 10)
- Updating all tests to reflect Pectra-only behavior

Closes ethereum-optimism#18479

* feat(dispute): add rootClaimByChainId(uint256) for L2 chain ID lookup (ethereum-optimism#18559)

* feat(dispute): add rootClaimByChainId for L2 chain ID lookup

Add rootClaimByChainId(uint256) to IDisputeGame interface for interop
preparation. Pre-interop games return the existing rootClaim regardless
of chain ID. SuperFaultDisputeGame reverts with SuperRootPreimageNotSupported
until super root preimage support is added.

Renamed from rootClaim(uint256) to avoid function overload ambiguity
with abi.encodeCall (semgrep sol-style-use-abi-encodecall rule).

* chore: resolve ci issues

* fix: restore accidentally deleted snapshot files

Restores abi_loader.go, abi_loader_test.go, and state-diff/.gitkeep
that were accidentally removed in previous commit.

* fix: update StandardValidator version assertions for dispute games

Update permissionedDisputeGameVersion() to match new dispute game
versions (V1: 1.9.0, V2: 2.3.0) and bump validator to 2.3.0.

* fix: rename test to follow 4-part revert naming convention

* chore: reduce diff by going back to old selector usage

* fix: undeclared identifier error

* fix: undeclared identifier error

* feat: add defensive check on rootClaimByChainId

* fix: undeclared identifier error

* feat: add defensive check on rootClaimByChainId for V2

Revert with UnknownChainId if input chain ID doesn't match l2ChainId().
Prevents misconfigured bridge from silently returning wrong data.

* fix: interfaces

* fix: consistent function modifier

* fix: use pure and update snapshots

* test: add rootClaimByChainId tests for permissioned dispute games

Add fuzz tests for rootClaimByChainId function to PermissionedDisputeGame
and SuperPermissionedDisputeGame test contracts.

* fix: remove duplicate declarations from rebase

* test: OPCMv2 upgrade (ethereum-optimism#18704)

* fix: opcmv2 upgrade fixes (ethereum-optimism#781)

* fix: remove extraInstructions in upgradeSuperchain test

* docs: add cgt extra instruction TODO

* test: add fuzzing to UpgradeOPChain test

* feat: add revert cases for setters and tests

* test: add input encoding verification

* fix: add v2 suffix in upgrade test

* docs: added natspec to upgradeOPChain tests

* fix: restore assertValidInput comment (ethereum-optimism#789)

* fix: contracts collision in fuzz test setOpChainConfigs

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>

* feat(abip): improve skip message for tests skipped by features (ethereum-optimism#18661)

* feat(abip): improve skip message for tests skipped by features

* fix: better naming scheme

* fix: better graphite prompt

* test(contracts): add revert tests for Preinstalls library functions (ethereum-optimism#18712)

Add tests for uncovered revert paths in getDeployedCode and getName
functions when called with unknown addresses. Includes a harness
contract to properly test internal library function reverts.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* ci: Remove last self-hosted runner (ethereum-optimism#18722)

* op-challenger: Integrate super node trace provider (ethereum-optimism#18668)

* op-service: Implement supernode client.

* op-challenger: Integrate super node trace provider (toggled off)

* Make super rpc CLI generic.
Add a config option to switch to super node.

* op-challenger: Actually return super node client

* Fix spelling.

* op-challenger: Avoid interfaces when nil checks are required.

Interface values are only nil if the type and value are nil - in our case the type is always non-nil so superNodeProvider == nil is always false causing panics.

* Remove test panic

* op-challenger: Fix package

* op-challenger: Rename --super-rpc to --supernode-rpc

* fix nil pointer exception in op-batcher (ethereum-optimism#18701)

* feat: support interop migration in OPCMv2 (ethereum-optimism#18649)

* feat: support interop migration in OPCMv2

* fix: merge conflicts

* fix: proper interface usage

* feat: update VerifyOPCM for migrator

* chore: lint

* fix: pr tweaks

* fix: update go side

* fix: simplify game data decoding logic

* test: add test for invalid starting game type

* fix: pr review

* fix: import source of DisputeGameConfig.

---------

Co-authored-by: Maurelian <maurelian@protonmail.ch>

* op-supernode: fix env var prefix wrangling (ethereum-optimism#18720)

* Upgrade env var prefixes for supernode flags

Replace prefixEnvVar with upgradeEnvVarPrefixes(existingPrefix,
newInfix) which builds OP_SUPERNODE_<newInfix>_<SUFFIX> env vars from
original OP_NODE_* vars. Update FullDynamicFlags callers and add a unit
test.

* tidy

* Panic on unprefixed env vars

Make upgradeEnvVarPrefixes panic when it finds an env var that lacks the
expected prefix. Add unit test to assert the panic.

* test(contracts): convert OptimismMintableERC20 tests to fuzz tests (ethereum-optimism#18696)

Convert focused tests to fuzz tests for broader coverage:
- mint: fuzz _to address and _amount
- burn: fuzz _from address and _amount
- mint/burn notBridge: fuzz _caller address
- permit2 transferFrom: fuzz _owner, _to, and _amount
- allowance permit2Max: fuzz _owner address

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(contracts): improve OptimismMintableERC20Factory test coverage (ethereum-optimism#18707)

* refactor(test): rename fuzz tests to use testFuzz_ prefix in OptimismMintableERC20Factory

- Rename test_createStandardL2Token_succeeds to testFuzz_createStandardL2Token_validParams_succeeds
- Rename test_createStandardL2TokenWithDecimals_succeeds to testFuzz_createOptimismMintableERC20WithDecimals_validParams_succeeds
- Rename test_createStandardL2Token_sameTwice_reverts to testFuzz_createStandardL2Token_sameTwice_reverts
- Rename test_createStandardL2TokenWithDecimals_sameTwice_reverts to testFuzz_createOptimismMintableERC20WithDecimals_sameTwice_reverts
- Rename test_createStandardL2Token_remoteIsZero_reverts to testFuzz_createStandardL2Token_remoteIsZero_reverts
- Rename test_createStandardL2TokenWithDecimals_remoteIsZero_reverts to testFuzz_createOptimismMintableERC20WithDecimals_remoteIsZero_reverts

Tests that use fuzz parameters should follow the testFuzz_ naming convention.
Also corrects function names in test names to match actual functions being tested.

* test(contracts): add tests for createOptimismMintableERC20 and version functions

- Add OptimismMintableERC20Factory_CreateOptimismMintableERC20_Test contract
  - testFuzz_createOptimismMintableERC20_validParams_succeeds
  - testFuzz_createOptimismMintableERC20_remoteIsZero_reverts
- Add OptimismMintableERC20Factory_Version_Test contract
  - test_version_validFormat_succeeds using SemverComp.parse()

These public functions were not directly tested before.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* asterisc: Remove asterisc contracts (ethereum-optimism#18689)

* asterisc: Remove asterisc scripts.

* Remove more CI config

* Remove more asterisc references.

* fix(op-batcher): fix loop in batcher with shadow compressor+brotli (ethereum-optimism#18485)

* fix loop in batcher with shadow compressor+brotli

* Iterate over all compression algorithms in tests

* Make test RNG seed deterministic

* Improve ChannelManager test assertions and checks

* godoc improvements

* Close test function in channel_manager_test.go

---------

Co-authored-by: geoknee <georgeknee@googlemail.com>

* op-dispute-mon: Use supernode instead of supervisor. (ethereum-optimism#18711)

* op-service: Implement supernode client.

* op-challenger: Integrate super node trace provider (toggled off)

* Make super rpc CLI generic.
Add a config option to switch to super node.

* op-challenger: Actually return super node client

* Fix spelling.

* op-challenger: Avoid interfaces when nil checks are required.

Interface values are only nil if the type and value are nil - in our case the type is always non-nil so superNodeProvider == nil is always false causing panics.

* Remove test panic

* op-challenger: Fix package

* op-challenger: Rename --super-rpc to --supernode-rpc

* op-dispute-mon: Use supernode instead of supervisor.

* op-dispute-mon: Consistent capitalisation of SuperNode. It's two words.

* Use https for git submodules (ethereum-optimism#18690)

* feat: Add `add-game-type-opcm-v2` command to op-deployer (ethereum-optimism#18660)

* feat: initial add-game-type-v2 command (ethereum-optimism#770)

* WIP: opcmv2 upgrade op chain (ethereum-optimism#752)

* feat: upgrade op chain wip

* feat: add deployv2 wip

* fix: deployerv2 wip

* refactor: remove additional V2 version of scripts

* refactor: adds OPCM v2 support for UpgradeOPChain.s.sol

* refactor: adds OPCM v2 support for UpgradeSuperchainConfig.s.sol

* fix: uses correct json key for upgradeInput

* fix: uses correct feature flag for OPCM v2 in devfeatures.go

* chore: add json tag to ExtraInstruction

---------

Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>

* feat: adds intermediary struct for op-deployer upgrade (ethereum-optimism#759)

* feat: adds intermediary struct for op-deployer upgrade

* chore: moved upgrade scripts to v6_0_0

* chore: remove v2 go scripts

* refactor: make v2_0_0 upgrade path to support both OPCM v1 and v2

* feat: add support for both OPCM v1 and v2 on embedded upgrade

* refactor: make v6_0_0 fall back to v2_0_0

* refactor: add extra instructions for upgrade superchain input

* test: fix op-deployer tests

* chore: remove deploy OP chain test step

* test: use systemconfig proxy address

* fix: remove the unneeded proxyadmin in OPChainConfig in op-deployer

* refactor: revert v2_0_0 changes in favor of a new v6_0_0 that supports OPCMv2

* feat: add v6_0_0 upgrade

* fix: check for 0 len OPChainConfigs

* chore: pre-pr ready

* Merge pull request ethereum-optimism#764 from defi-wonderland/fix/opcm2-upgradeopchain-comments

fix: opcm2 upgradeopchain comments

* refactor: remove enshrined v7_0_0 upgrade in op-deployer (ethereum-optimism#766)

* test: use correct game type and pass correct extra instruction to UpgradeOPChain (ethereum-optimism#768)

* test: add missing extra instructions for OPCM v2 input

* fix: add correct game type for cannon kona

* feat: initial add-game-type-v2 command

* test: add tests for ShouldAllowV1 flag

* refactor: remove shouldAllowV1 flag

* chore: remove unused private key flag from the add game type v2 command

* chore: remove skipping upgrade test

* chore: name changes and comments

* chore: update usage description add-game-type-v2

* test: update add-game-type-opcm-v2 tests

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>

* chore: opcm2 addgametypev2 comments (ethereum-optimism#780)

* chore: move ABI types to lib file

* chore: move hardcoded values to constants file

* refactor: make abi_types use MustType

* test: deploys OPCM v2 for use during CLI testing (ethereum-optimism#784)

* test: deploys OPCM v2 for use during CLI testing

* chore: reference a github issue for TODO

* test: add assertions on the output of add game type command

* test: update cli tests (ethereum-optimism#792)

* chore: Address review comments (ethereum-optimism#793)

* refactor: remove re-declared flags from add-game-type v2

* chore: remove irrelevant TODO

* refactor: rename "add-game-type-opcm-v2" command to "add-game-type-v2"

* test: add cache dir check for add-game-type-v2

* test: removes cache dir files check on e2e test (ethereum-optimism#794)

---------

Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>

* op-node: validate EIP-1559 params in derivation pipeline (ethereum-optimism#18638)

* op-node: validate EIP-1559 params in derivation pipeline

Add redundant validation for zero elasticity multiplier in EIP-1559
parameters during derivation, providing defense-in-depth against
contract-level checks being accidentally removed.

The SystemConfig contract already enforces denominator >= 1 and
elasticity >= 1, but this adds the same check in the derivation
pipeline for redundancy.

Closes ethereum-optimism#18625

Co-Authored-By: Kelvin Fichter <kelvinfichter@gmail.com>

* op-node: use ValidateHolocene1559Params for EIP-1559 validation

- Move validation from ProcessSystemConfigUpdateLogEvent into parseSystemConfigUpdateEIP1559Params
- Use eip1559.ValidateHolocene1559Params instead of manual checks
- Update op-geth dependency to include elasticity validation (PR ethereum-optimism#743)

Co-Authored-By: Kelvin Fichter <kelvinfichter@gmail.com>

* op-node: fix test to use valid EIP-1559 params

The createMismatchedEIP1559Params test was creating invalid params
(denominator=1, elasticity=0) which now triggers validation error from
op-geth PR ethereum-optimism#743. Fix by using valid but mismatched params (999, 999).

Co-Authored-By: Kelvin Fichter <kelvinfichter@gmail.com>

* update go.mod

* fix test

* update go.mod (after merging op-geth PR)

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Sebastian Stammler <seb@oplabs.co>

* chore(ctb): move init bond value to CommonTest (ethereum-optimism#18648)

* fix(sysgo): allow OS to assign ports for opreth, rbuilder, rollup-boost (ethereum-optimism#18739)

* sysgo: allow OS to assign ports for opreth and rbuilder

* sysgo: allow OS to assign ports for rollup-boost

* make lint-go

* all: upgrade op-geth (ethereum-optimism#18337)

* op-challenger: Apply timeouts to HTTP requests (ethereum-optimism#18731)

* op-challenger: Use wrapped RPC client with multicaller.

Ensures that timeouts are applied to requests.

* op-challenger: Convert preimage fetcher to use L1Source.

Adds timeouts on requests and more efficient receipt fetching.

* op-challenger: Switch generic player to use L1Client to fetch L1Head number

* op-challenger: Add flag to set RPC Kind

* op-challenger: Add timeout when fetching L2 block headers

* op-acceptance-tests: Add EL eth_simulate acceptance test (ethereum-optimism#18724)

* Add EL eth_simulate acceptance test and init

* Strengthen eth_simulate test assertions

Add ReturnFullTransactions to simulation params and require the RPC call
to succeed. Assert exactly one block and one transaction are returned
and verify the transaction is a dynamic fee tx (type 0x2).

* Assert blobGasUsed nonzero in eth_simulate test

Decode blobGasUsed with hexutil and assert it's nonzero to ensure
eth_simulateV1 can estimate DA size. Also fix a comment typo (bock ->
block).

* Assert eth_simulateV1 errors on genesis block

Call eth_simulateV1 with block "0x0" (genesis) and require an error to
ensure the method cannot be used on the genesis block move test under
"base" directory

* tidy

* just update-op-geth e4826126d22171e97a31a05c7405b46143384ab7

* Fix spacing in commented replace in go.mod

* Remove go 1.24 feature flag, leaving SysGetRandom syscall enabled (ethereum-optimism#18624)

* Remove go 1.24 feature flag, leaving SysGetRandom syscall enabled

* contracts: Remove go 1.24 feature flag, leaving SysGetRandom syscall enabled

* Update semver-lock.json

* Remove commented-out Features struct and function

* Add timeout to vm-runner (ethereum-optimism#18594)

* Add timeout to vm-runner

* Remove special handling and metric for vm timeout

* Handle VM timeout errors differently from other errors in the runner

* Don't treat errors in traceProviderCreator as VM timeouts

* Combine VM failure metrics and add a reason label

* Re-add "_current" to metric name

* fix: add compiler restriction for StorageSetter to align profiles (ethereum-optimism#18715)

* test(contracts): convert MintManager tests to fuzz tests for broader coverage (ethereum-optimism#18744)

* test(contracts): convert MintManager tests to fuzz tests for broader coverage

* docs(contracts): add natspec explaining first mint is uncapped

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix: install solc for contracts tests (ethereum-optimism#18753)

* Add U18 audit report (ethereum-optimism#18758)

* feat: have upgrade test blocks update every week (ethereum-optimism#18634)

* feat: have upgrade test blocks update every week

* fix: performance enhancements

* fix: corrected pinned block number statement

* fix: correct trigger name

* feat: simplify and use cast find block

* fix: pass rpc to fork block write step

* fix: errant comments

* all: upgrade op-geth (ethereum-optimism#18767)

* update op-geth to use dev branch

---------

Co-authored-by: smartcontracts <14298799+smartcontracts@users.noreply.github.com>
Co-authored-by: steven <12021290+stevennevins@users.noreply.github.com>
Co-authored-by: niha <205694301+0xniha@users.noreply.github.com>
Co-authored-by: IamFlux <175354924+0xiamflux@users.noreply.github.com>
Co-authored-by: OneTony <onetony@defi.sucks>
Co-authored-by: 0xOneTony <112496816+0xOneTony@users.noreply.github.com>
Co-authored-by: Stefano Charissis <stefano@oplabs.co>
Co-authored-by: Changwan Park <pcw109550@gmail.com>
Co-authored-by: Ján Jakub Naništa <jan.jakub.nanista@gmail.com>
Co-authored-by: Inphi <mlaw2501@gmail.com>
Co-authored-by: Adrian Sutton <adrian@oplabs.co>
Co-authored-by: Michael Amadi <amadimichaeld@gmail.com>
Co-authored-by: serpixel <5087962+serpixel@users.noreply.github.com>
Co-authored-by: Josh Klopfenstein <joshklop@oplabs.co>
Co-authored-by: George Knee <georgeknee@googlemail.com>
Co-authored-by: almanax-ai[bot] <174396398+almanax-ai[bot]@users.noreply.github.com>
Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: Chiin <77933451+0xChin@users.noreply.github.com>
Co-authored-by: Anton Evangelatov <anton.evangelatov@gmail.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Sam Stokes <35908605+bitwiseguy@users.noreply.github.com>
Co-authored-by: Paul Dowman <paul@pauldowman.com>
Co-authored-by: Himess <95512809+Himess@users.noreply.github.com>
Co-authored-by: Matthew Slipper <me@matthewslipper.com>
Co-authored-by: blockchaindevsh <shore.cloud@gmail.com>
Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Marius G <90795310+bearpebble@users.noreply.github.com>
Co-authored-by: Kelvin Fichter <kelvinfichter@gmail.com>
Co-authored-by: Sebastian Stammler <seb@oplabs.co>
Co-authored-by: Maurelian <john@oplabs.co>
Co-authored-by: louis.liu <louis.liu@okg.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-pkg-core-utils Area: packages/core-utils C-chore Category: Code, docs or tooling maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants