-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannon: remove final dep on bindings #10408
Conversation
Removes the last dependency that cannon has on `op-bindings/bindings`. This is done my creating reusable code for reading foundry artifacts from disk. This code should be reusable between any service that wants to read the foundry artifacts from disk. This includes roundtrip tests for JSON serialization of the foundry artifacts.
WalkthroughWalkthroughThe updates involve transitioning from a "contracts" to "artifacts" paradigm, encompassing renaming functions and types, utilizing Changes
Recent Review DetailsConfiguration used: .coderabbit.yml Files selected for processing (1)
Additional comments not posted (3)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #10408 +/- ##
============================================
+ Coverage 42.30% 81.59% +39.28%
============================================
Files 73 10 -63
Lines 4848 1081 -3767
Branches 766 0 -766
============================================
- Hits 2051 882 -1169
+ Misses 2686 165 -2521
+ Partials 111 34 -77
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Since slither seems to be failing consistently in CI, try bumping the versions of the tooling. Bumps to latest slither github action release: https://github.com/crytic/slither-action/releases/tag/v0.4.0 Meant to fix the slither issue seen in #10408 ``` [-] SARIF output enabled, writing to results.sarif. [-] Slither config provided: packages/contracts-bedrock/slither.config.json [-] SLITHERARGS provided. Running slither with extra arguments 'forge clean' running (wd: /github/workspace/packages/contracts-bedrock) 'forge config --json' running 'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock) Traceback (most recent call last): File "/opt/slither/bin/slither", line 8, in <module> sys.exit(main()) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main main_impl(all_detector_classes=detectors, all_printer_classes=printers) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl ) = process_all(filename, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all ) = process_single(compilation, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single slither = Slither(target, ast_format=ast, **vars(args)) File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__ sol_parser.parse_top_level_items(ast, path) File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items get_imported_scope = self.compilation_unit.get_scope(import_directive.filename) File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup( File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup raise ValueError(f"{filename} does not exist") ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist ```
Since slither seems to be failing consistently in CI, try bumping the versions of the tooling. Bumps to latest slither github action release: https://github.com/crytic/slither-action/releases/tag/v0.4.0 Meant to fix the slither issue seen in #10408 ``` [-] SARIF output enabled, writing to results.sarif. [-] Slither config provided: packages/contracts-bedrock/slither.config.json [-] SLITHERARGS provided. Running slither with extra arguments 'forge clean' running (wd: /github/workspace/packages/contracts-bedrock) 'forge config --json' running 'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock) Traceback (most recent call last): File "/opt/slither/bin/slither", line 8, in <module> sys.exit(main()) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main main_impl(all_detector_classes=detectors, all_printer_classes=printers) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl ) = process_all(filename, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all ) = process_single(compilation, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single slither = Slither(target, ast_format=ast, **vars(args)) File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__ sol_parser.parse_top_level_items(ast, path) File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items get_imported_scope = self.compilation_unit.get_scope(import_directive.filename) File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup( File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup raise ValueError(f"{filename} does not exist") ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist ```
Since slither seems to be failing consistently in CI, try bumping the versions of the tooling. Bumps to latest slither github action release: https://github.com/crytic/slither-action/releases/tag/v0.4.0 Meant to fix the slither issue seen in #10408 ``` [-] SARIF output enabled, writing to results.sarif. [-] Slither config provided: packages/contracts-bedrock/slither.config.json [-] SLITHERARGS provided. Running slither with extra arguments 'forge clean' running (wd: /github/workspace/packages/contracts-bedrock) 'forge config --json' running 'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock) Traceback (most recent call last): File "/opt/slither/bin/slither", line 8, in <module> sys.exit(main()) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main main_impl(all_detector_classes=detectors, all_printer_classes=printers) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl ) = process_all(filename, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all ) = process_single(compilation, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single slither = Slither(target, ast_format=ast, **vars(args)) File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__ sol_parser.parse_top_level_items(ast, path) File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items get_imported_scope = self.compilation_unit.get_scope(import_directive.filename) File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup( File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup raise ValueError(f"{filename} does not exist") ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist ```
Description
Removes the last dependency that cannon has on
op-bindings/bindings
.This is done my creating reusable code for reading foundry artifacts
from disk. This code should be reusable between any service that wants
to read the foundry artifacts from disk. This includes roundtrip
tests for JSON serialization of the foundry artifacts.