Skip to content

contracts: fetch batches hardhat task#1807

Merged
mslipper merged 3 commits intodevelopfrom
feat/deserialize-batches
Mar 3, 2022
Merged

contracts: fetch batches hardhat task#1807
mslipper merged 3 commits intodevelopfrom
feat/deserialize-batches

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Nov 23, 2021

Description

Adds a hardhat task to fetch batches. Logs are written
to stderr so that the stdout can be written to a file
or passed to jq.

export CONTRACTS_TARGET_NETWORK=...
export CONTRACTS_DEPLOYER_KEY=...
export CONTRACTS_RPC_URL=...
npx hardhat fetch-batches --network main --start 14311261

Note that this was not possible with the older batch serialization logic because it was string based,
hardhat would oom after a few batches

@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2021

🦋 Changeset detected

Latest commit: 4106fd5

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

This PR includes changesets to release 7 packages
Name Type
@eth-optimism/contracts Patch
@eth-optimism/core-utils Patch
@eth-optimism/batch-submitter Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/sdk Patch
@eth-optimism/message-relayer Patch
@eth-optimism/replica-healthcheck 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 tynes force-pushed the feat/deserialize-batches branch from da2c49c to 369479a Compare March 3, 2022 02:36
@github-actions github-actions bot added the A-pkg-core-utils Area: packages/core-utils label Mar 3, 2022
@tynes tynes marked this pull request as ready for review March 3, 2022 02:37
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2022

Codecov Report

Merging #1807 (5a6f539) into develop (aa726e8) will decrease coverage by 0.25%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1807      +/-   ##
===========================================
- Coverage    74.57%   74.32%   -0.26%     
===========================================
  Files           86       86              
  Lines         2962     2972      +10     
  Branches       511      512       +1     
===========================================
  Hits          2209     2209              
- Misses         753      763      +10     
Flag Coverage Δ
batch-submitter 62.03% <ø> (ø)
contracts 90.88% <ø> (ø)
core-utils 86.77% <0.00%> (-2.36%) ⬇️
data-transport-layer 49.72% <ø> (ø)
sdk 57.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/core-utils/src/optimism/batch-encoding.ts 89.30% <0.00%> (-5.05%) ⬇️

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 aa726e8...5a6f539. Read the comment docs.

tynes added 2 commits March 3, 2022 11:17
Adds a hardhat task to fetch batches. Logs are written
to stderr so that the stdout can be written to a file
or passed to `jq`.

```bash
export CONTRACTS_TARGET_NETWORK=...
export CONTRACTS_DEPLOYER_KEY=...
export CONTRACTS_RPC_URL=...
npx hardhat fetch-batches --network main --start 14311261
```
Allows for easy serialization and display in frontends
or for data collection
@tynes tynes force-pushed the feat/deserialize-batches branch from 369479a to 5a6f539 Compare March 3, 2022 19:18
Copy link
Contributor

@smartcontracts smartcontracts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mslipper mslipper merged commit 65f4514 into develop Mar 3, 2022
@mslipper mslipper deleted the feat/deserialize-batches branch March 3, 2022 23:26
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants