-
Notifications
You must be signed in to change notification settings - Fork 156
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
Communicating Between OP Mainnet and Ethereum in Solidity #989
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-optimism ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WalkthroughThe changes in this pull request involve updates to documentation and code related to cross-domain messaging in Solidity contracts, transitioning from the Optimism SDK to the Viem library. Key modifications include renaming configuration options in the Changes
Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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: 4
🧹 Outside diff range and nitpick comments (8)
pages/builders/app-developers/tutorials/cross-dom-solidity.mdx (3)
83-84
: Approved with a suggestion for clarityThe update to reference Viem instead of the Optimism SDK is correct and aligns with the overall changes in the tutorial. The sentence structure and grammar are appropriate.
To enhance clarity, consider adding a brief explanation of what Viem is for readers who might be unfamiliar with it.
Consider adding a brief explanation of Viem, such as:
-You can use Viem to programmatically check the status of any message between L1 and L2. +You can use Viem, a TypeScript library for interacting with Ethereum, to programmatically check the status of any message between L1 and L2.
Line range hint
1-371
: Overall changes approved with a suggestion for final proofreadThe tutorial has been successfully updated to use Viem instead of the Optimism SDK throughout the document. The changes are consistent, and the overall structure and flow of the tutorial have been maintained. The updates align well with the stated objectives of the PR, and the tutorial continues to provide clear and valuable guidance for developers.
Consider performing a final proofread of the entire document to ensure all references to the Optimism SDK have been updated to Viem, and that the terminology used is consistent throughout. This will help maintain the high quality of the tutorial and prevent any confusion for readers.
Missing Viem-Specific Functions in
cross-dom-solidity.js
The
public/tutorials/cross-dom-solidity.js
file does not contain any Viem-specific functions as expected. Please ensure that the Viem-specific implementations are correctly added to the file to maintain the tutorial's accuracy and functionality.
- File:
public/tutorials/cross-dom-solidity.js
- Issue: No Viem-specific functions found in the relevant sections.
🔗 Analysis chain
Line range hint
204-219
: Changes approved with a verification requestThe updates to use Viem-specific functions and the modified explanation are correct and maintain the clarity of the tutorial. The changes align well with the transition to Viem.
Please verify that the referenced external file
<rootDir>/public/tutorials/cross-dom-solidity.js
contains the correct Viem-specific function for waiting until the message is ready to prove. You can use the following script to check the content:
Please use the following script to verify the content of
public/tutorials/cross-dom-solidity.js
:
Please use the following script to verify that
public/tutorials/cross-dom-solidity.js
contains the correct Viem-specific function for waiting until the message is ready to prove:🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific function for waiting cat <rootDir>/public/tutorials/cross-dom-solidity.js | sed -n '17,20p'Length of output: 104
Script:
#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific function for waiting cat public/tutorials/cross-dom-solidity.js | sed -n '17,20p'Length of output: 133
Script:
#!/bin/bash # Description: Search for Viem-specific functions in cross-dom-solidity.js # Test: Look for any mentions of "Viem" to identify relevant functions rg 'Viem' public/tutorials/cross-dom-solidity.jsLength of output: 48
pages/builders/chain-operators/configuration/batcher.mdx (5)
Line range hint
662-686
: Enhance clarity in the new recommendation forOP_BATCHER_MAX_CHANNEL_DURATION
The new recommendation for setting
OP_BATCHER_MAX_CHANNEL_DURATION
is a valuable addition to the documentation. To improve clarity and readability, consider the following suggestions:
In the first paragraph, change "When non-zero, this parameter is the max time (in L1 blocks, which are 12 seconds each) between which batches will be submitted to the L1" to "When non-zero, this parameter sets the maximum time (in L1 blocks, with each block taking approximately 12 seconds) between batch submissions to L1."
In the bullet point about not recommending values higher than 5 hours, consider rephrasing for clarity: "We do not recommend setting values that target more than 5 hours, as batches must be submitted within the sequencing window (which defaults to 12 hours for OP chains). Exceeding this window may result in a 12-hour long chain reorg."
In the warning callout, consider adding a brief explanation of what the "safe head" is, or link to a definition, to help readers who may not be familiar with the term.
These changes will enhance the readability and understanding of this important recommendation.
🧰 Tools
🪛 LanguageTool
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Line range hint
688-720
: Enhance the new section on configuring multiple blobsThe new section on configuring the batcher to use multiple blobs is a valuable addition to the documentation. To further improve its clarity and usefulness, consider the following suggestions:
Add a brief introduction explaining why using multiple blobs can be beneficial (e.g., improved efficiency, cost savings for higher volume chains).
In the configuration example, add comments explaining what each setting does, especially for less obvious options like
OP_BATCHER_BATCH_TYPE=1
.After the configuration example, provide a brief explanation of each setting and why it's important.
In the paragraph about multi-blob transactions being useful for medium to high-throughput chains, consider adding a rough guideline or example of what constitutes "medium" or "high" throughput.
The link to the calculator is helpful, but consider adding a brief description of what the calculator does and how chain operators can use it to determine the optimal configuration for their specific needs.
Add a note about monitoring and adjusting these settings based on actual chain performance and cost metrics.
These additions will make this section even more valuable for chain operators looking to optimize their batcher configuration.
🧰 Tools
🪛 LanguageTool
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Line range hint
1-720
: Improve document structure and formatting consistencyThe overall structure and formatting of the document are well-organized and promote readability. To further enhance the document, consider the following suggestions:
Ensure consistent capitalization in headers. For example, change "Miscellaneous" to "Miscellaneous Options" to match the style of other section headers.
Add a table of contents at the beginning of the document to help readers navigate the various sections more easily.
Consider grouping related configuration options into logical categories (e.g., "Network Settings", "Performance Tuning", "Security Options") to make it easier for readers to find relevant options.
For the "Recommendations" section, consider using a numbered list instead of bullet points to make it easier to reference specific recommendations.
Ensure that all code blocks (including the one in the "Configure Your Batcher to Use Multiple Blobs" section) use consistent syntax highlighting.
Add a "See Also" or "Related Topics" section at the end of the document to link to other relevant documentation pages.
These changes will improve the overall consistency and usability of the document.
🧰 Tools
🪛 LanguageTool
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Line range hint
1-720
: Final suggestions for document improvementThe document provides comprehensive and valuable information about batcher configuration. To further enhance its usefulness, consider the following suggestions:
Add a brief introduction at the beginning of the document explaining what the batcher is and its role in the OP Stack ecosystem. This context will be helpful for newcomers.
Include a "Version Information" section specifying which version of the OP Stack or batcher software this configuration applies to.
Consider adding a "Best Practices" section that summarizes key recommendations and provides guidance on how to choose appropriate values for critical configuration options.
Add examples of common configuration scenarios (e.g., for low, medium, and high throughput chains) to help operators quickly set up their batcher.
Include information on how to monitor the batcher's performance and troubleshoot common issues.
Add a "Changelog" section at the end of the document to track significant changes to the batcher configuration options over time.
These additions will make the document even more comprehensive and useful for chain operators of all experience levels.
🧰 Tools
🪛 LanguageTool
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Residual
altda
references found in documentationThe following references to
altda
were found inpages/builders/chain-operators/features/alt-da-mode.mdx
. Please update them to use theplasma
prefix to ensure consistency:
--altda.da-server
--altda.enabled
--altda.verify-on-read
--altda.da-service
🔗 Analysis chain
Line range hint
265-303
: Terminology update:altda
renamed toplasma
in configuration optionsThe configuration options previously prefixed with
altda
have been renamed to use theplasma
prefix. This change affects the following options:
plasma.da-server
plasma.da-service
plasma.enabled
plasma.verify-on-read
While the functionality and default values remain the same, this terminology update may require corresponding changes in other parts of the documentation or codebase that reference these options.
To ensure consistency across the documentation, please run the following command to check for any remaining references to the old
altda
prefix:🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any remaining references to 'altda' in the documentation rg --type md --type mdx 'altda'Length of output: 59
Script:
#!/bin/bash # Search for any remaining references to 'altda' in markdown and MDX files rg 'altda' -g '*.md' -g '*.mdx'Length of output: 2102
🧰 Tools
🪛 LanguageTool
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (4)
- next-env.d.ts (1 hunks)
- pages/builders/app-developers/tutorials/cross-dom-solidity.mdx (5 hunks)
- pages/builders/chain-operators/configuration/batcher.mdx (3 hunks)
- public/tutorials/cross-dom-solidity.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- next-env.d.ts
🧰 Additional context used
📓 Path-based instructions (2)
pages/builders/app-developers/tutorials/cross-dom-solidity.mdx (1)
Pattern
**/*.mdx
: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
- Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
- Avoid gender-specific language and use the imperative form.
- Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
- Ensure proper nouns are capitalized in sentences.
- Apply the Oxford comma.
- Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
- Use correct spelling and grammar at all times (IMPORTANT).
- Use sentence case for H1, H2, and H3 headers, capitalizing only the first word and any proper nouns.
- For all headers (H1, H2, H3), do not change the capitalization of proper nouns; keep them as they are.
"pages/builders/chain-operators/configuration/batcher.mdx (1)
Pattern
**/*.mdx
: "ALWAYS review Markdown content THOROUGHLY with the following criteria:
- Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
- Avoid gender-specific language and use the imperative form.
- Monitor capitalization for emphasis. Avoid using all caps, italics, or bold for emphasis.
- Ensure proper nouns are capitalized in sentences.
- Apply the Oxford comma.
- Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
- Use correct spelling and grammar at all times (IMPORTANT).
- Use sentence case for H1, H2, and H3 headers, capitalizing only the first word and any proper nouns.
- For all headers (H1, H2, H3), do not change the capitalization of proper nouns; keep them as they are.
"
🪛 LanguageTool
pages/builders/chain-operators/configuration/batcher.mdx
[style] ~271-~271: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... <Tabs.Tab>--plasma.da-server=
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~282-~282: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...s.Tab>--plasma.da-service=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_DA_SERV...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~292-~292: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Tabs.Tab>--plasma.enabled=false
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_ENABLED...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~303-~303: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ab>--plasma.verify-on-read=true
</Tabs.Tab> <Tabs.Tab>`OP_BATCHER_PLASMA_VERIFY_...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 Biome
public/tutorials/cross-dom-solidity.js
[error] 15-16: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
🔇 Additional comments (6)
pages/builders/app-developers/tutorials/cross-dom-solidity.mdx (5)
146-151
: Changes approvedThe updates to the heading and installation command correctly reflect the transition from the Optimism SDK to Viem. The heading follows the correct sentence case format as per the coding guidelines, and the code block is properly formatted.
232-239
: Changes approved with a verification requestThe updates to use Viem-specific functions for waiting until the message is ready for relay are correct and consistent with the tutorial's transition to Viem.
Please verify that the referenced external file
<rootDir>/public/tutorials/cross-dom-solidity.js
contains the correct Viem-specific function for waiting until the message is ready for relay. You can use the following script to check the content:#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific function for waiting until ready for relay cat <rootDir>/public/tutorials/cross-dom-solidity.js | sed -n '30,33p'
246-246
: Change approved with a verification requestThe update to use a Viem-specific function for waiting until the message is relayed is correct and consistent with the tutorial's transition to Viem.
Please verify that the referenced external file
<rootDir>/public/tutorials/cross-dom-solidity.js
contains the correct Viem-specific function for waiting until the message is relayed. You can use the following script to check the content:#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific function for waiting until the message is relayed cat <rootDir>/public/tutorials/cross-dom-solidity.js | sed -n '43,46p'
194-199
: Changes approved with a verification requestThe updates to use Viem-specific objects are correct and align with the tutorial's transition to Viem.
Please verify that the referenced external file
<rootDir>/public/tutorials/cross-dom-solidity.js
contains the correct Viem-specific object creation. You can use the following script to check the content:✅ Verification successful
Script Correction Required
The previous script failed because
<rootDir>
is not a valid directory. Please use the correct relative path to access thecross-dom-solidity.js
file. You can use the following updated script to verify the content:
Verification Successful
The
public/tutorials/cross-dom-solidity.js
file contains the correct Viem-specific object creation on lines 11-12.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific object creation cat <rootDir>/public/tutorials/cross-dom-solidity.js | sed -n '11,12p'Length of output: 104
Script:
#!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file contains the correct Viem-specific object creation sed -n '11,12p' public/tutorials/cross-dom-solidity.jsLength of output: 332
182-189
: Changes approved with a suggestionThe updates to import Viem instead of the Optimism SDK are correct and consistent with the tutorial's changes. The heading follows the proper sentence case format as per the coding guidelines.
Please verify that the referenced external file
<rootDir>/public/tutorials/cross-dom-solidity.js
contains the correct Viem import statements. You can use the following script to check the content:✅ Verification successful
--- <!-- [monologue] [task finalize_verification_1/1] [observations] - The latest shell script successfully located `cross-dom-solidity.js` and extracted lines 3-5. - The extracted lines show that Viem is correctly imported, replacing the Optimism SDK as intended. - This confirms that the external file has the correct import statements. - No issues were found with the import statements in the external file. [analysis] - The initial concern about missing or incorrect import statements has been addressed. - The verification is successful, and no further actions are needed. - The review comment can now be marked as verified. [actions] - Generate a final response approving the changes. - Append the tag to indicate successful verification. --> **Verification Successful** The referenced external file `./public/tutorials/cross-dom-solidity.js` contains the correct Viem import statements as expected. The changes are consistent and accurate. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the content of the cross-dom-solidity.js file # Test: Check if the file exists and contains the correct import statements cat <rootDir>/public/tutorials/cross-dom-solidity.js | sed -n '3,5p'
Length of output: 104
Script:
#!/bin/bash # Description: Find and verify the content of cross-dom-solidity.js # Find the cross-dom-solidity.js file in the repository file_path=$(fd "cross-dom-solidity\.js" .) if [ -z "$file_path" ]; then echo "File not found." exit 1 fi # Output lines 3-5 from the found file sed -n '3,5p' "$file_path"Length of output: 354
public/tutorials/cross-dom-solidity.js (1)
35-38
: Verify that 'message.withdrawalHash' is definedEnsure that the
message
object contains thewithdrawalHash
property before accessing it to avoid runtime errors.Run the following script to check if
withdrawalHash
exists onmessage
:Review the output to confirm that
withdrawalHash
is present.
const { createPublicClient, http } = require('viem'); | ||
const { optimismSepolia } = require('viem/chains'); | ||
const { publicActionsL2 } = require('viem/op-stack'); |
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.
Import missing dependencies 'sepolia' and 'publicActionsL1'
The variable sepolia
and the function publicActionsL1
are used but not imported. This will cause ReferenceError
s when l1Provider
is initialized.
Apply this diff to import the missing dependencies:
const { createPublicClient, http } = require('viem');
+const { sepolia, optimismSepolia } = require('viem/chains');
-const { optimismSepolia } = require('viem/chains');
const { publicActionsL2 } = require('viem/op-stack');
+const { publicActionsL1 } = require('viem/op-stack');
Also applies to: 11-12
|
||
const privateKey = process.env.TUTORIAL_PRIVATE_KEY | ||
const privateKey = process.env.TUTORIAL_PRIVATE_KE |
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.
Fix the typo in the environment variable name
There is a typo in the environment variable name on line 7. It should be TUTORIAL_PRIVATE_KEY
instead of TUTORIAL_PRIVATE_KE
.
Apply this diff to fix the typo:
-const privateKey = process.env.TUTORIAL_PRIVATE_KE
+const privateKey = process.env.TUTORIAL_PRIVATE_KEY
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const privateKey = process.env.TUTORIAL_PRIVATE_KE | |
const privateKey = process.env.TUTORIAL_PRIVATE_KEY |
await l1Provider.getWithdrawalStatus({ | ||
receipt, | ||
targetChain: l2Provider.chain, | ||
}) |
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.
Fix usage of 'receipt' before its declaration
The variable receipt
is used before it is declared on line 21. This will result in a ReferenceError
.
Move the declaration of receipt
before its usage. Apply this diff to fix the issue:
console.log('Waiting for message to be provable...')
+const receipt = await l2Provider.getTransactionReceipt(transactionHash)
await l1Provider.getWithdrawalStatus({
receipt,
targetChain: l2Provider.chain,
})
Committable suggestion was skipped due to low confidence.
🧰 Tools
🪛 Biome
[error] 15-16: This variable is used before its declaration.
The variable is declared here:
(lint/correctness/noInvalidUseBeforeDeclaration)
|
||
console.log('Relaying message...') | ||
await messenger.finalizeMessage(transactionHash) | ||
const [message] = getWithdrawals(receipt) |
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.
Import or define 'getWithdrawals' before using it
The function getWithdrawals
is used but not defined or imported in the current scope. This will cause a ReferenceError
.
If getWithdrawals
is provided by a library, ensure you import it at the beginning of the file. Apply this diff to import getWithdrawals
:
const { publicActionsL2 } = require('viem/op-stack');
+const { getWithdrawals } = require('viem/op-stack');
If it's a custom function, ensure it is defined or imported appropriately.
Committable suggestion was skipped due to low confidence.
Description
Updated the Communicating Between OP Mainnet and Ethereum in Solidity Tutorial to use Viem
Tests
Additional context
Metadata
Include a link to any github issues that this may close in the following form: