-
Notifications
You must be signed in to change notification settings - Fork 194
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
Tracing Deposits and Withdrawals #966
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 pull request updates documentation and code to transition from the "Optimism SDK" to the "viem" library. The tutorial content has been revised to instruct users on utilizing the viem library for tracing transactions between Layer 1 and Layer 2. Additionally, JavaScript scripts have been modified to replace SDK-specific functions and providers with their viem counterparts. The Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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 (7)
pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (6)
12-14
: LGTM: Introduction updated to reflect the use of viem library.The introduction has been appropriately updated to mention the viem library. However, consider adding a brief explanation of why viem is being used instead of the Optimism SDK to provide context for the change.
Consider adding a sentence explaining the reason for switching to viem, such as:
"We now recommend using viem as it provides improved performance and a more streamlined API for interacting with Ethereum networks."
22-23
: LGTM: Project setup instructions updated for viem.The project setup instructions have been correctly updated to use the viem library. However, there's a minor inconsistency in the installation step.
In the installation step, the comment mentions installing both viem and ethers.js, but the command only installs viem. Consider either removing the mention of ethers.js or adding it to the installation command if it's needed for the tutorial.
Also applies to: 40-43
49-55
: LGTM: RPC URL section updated for viem and new networks.The section has been appropriately updated to mention the viem library's
getTransactionReceipt
function and the new network URLs for Sepolia and OP Sepolia.Consider adding a brief explanation of why Sepolia and OP Sepolia are being used (e.g., "We're using Sepolia and OP Sepolia as they are the current testnet environments for Ethereum and Optimism, respectively.").
105-133
: LGTM: Deposit tracing steps updated for viem.The deposit tracing steps have been appropriately updated to use viem functions instead of the Optimism SDK. The instructions are clear and provide a good guide for users.
Consider adding brief comments explaining what each step does, especially for the log parsing step. This would help users understand the purpose of each operation in the tracing process.
138-165
: LGTM: Withdrawal tracing steps updated for viem.The withdrawal tracing steps have been appropriately updated to use viem functions instead of the Optimism SDK. The instructions are clear and provide a good guide for users.
Similar to the deposit tracing section, consider adding brief comments explaining what each step does, especially for the log parsing step. This would help users understand the purpose of each operation in the withdrawal tracing process.
Line range hint
1-172
: Overall: Excellent update to use viem library.The tutorial has been successfully updated to use the viem library instead of the Optimism SDK. The changes are consistent throughout the file, maintaining the tutorial's structure and flow while providing clear instructions for using viem to trace deposits and withdrawals.
To further improve the tutorial:
- Consider adding a brief introduction explaining why viem is now recommended over the Optimism SDK.
- Add more explanatory comments to the code snippets to help users understand each step of the process.
- Ensure that all linked tutorials and resources are also updated or include notes about any differences in the libraries used.
public/tutorials/sdk-trace-txns.js (1)
9-10
: Add error handling for missing RPC URLs.It's a good practice to check if
l1RpcUrl
andl2RpcUrl
are defined to prevent runtime errors if the environment variables are not set.Consider adding error handling:
const l1RpcUrl = process.env.L1_RPC_URL; const l2RpcUrl = process.env.L2_RPC_URL; +if (!l1RpcUrl || !l2RpcUrl) { + throw new Error('L1_RPC_URL and L2_RPC_URL environment variables must be set.'); +}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (2 hunks)
- public/tutorials/sdk-trace-txns.js (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
pages/builders/app-developers/tutorials/sdk-trace-txns.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. Use bold for prominence instead of all caps or italics.
- 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).
"
🔇 Additional comments (2)
pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (2)
4-4
: LGTM: Updated description accurately reflects the tutorial content.The description has been appropriately updated to mention the viem library instead of the Optimism SDK, which aligns with the changes made throughout the tutorial.
70-72
: LGTM: Dependency import updated to use viem.The import statement has been correctly updated to use the viem library instead of the Optimism SDK.
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.
This still needs a tech review so I'm happy to review again later, but this look great to me! Just make sure to update the headers to comply with the new style
For all of these tutorials usually there is a step for running the command
|
@ZakAyesh Updated the tut, can you take a second review? |
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.
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.
the chains are not imported, they should
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: 3
🧹 Outside diff range and nitpick comments (2)
pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (1)
49-55
: LGTM with a minor suggestion.The changes accurately reflect the use of viem's
getTransactionReceipt
function and provide appropriate RPC URLs for test networks. The explanation about using an RPC provider that supports indexed event queries is helpful for users.Consider adding a brief note explaining that these are test network URLs and that users should use mainnet URLs for production environments.
pages/builders/app-developers/transactions/estimates.mdx (1)
Line range hint
1-24
: Overall adherence to coding guidelines is commendable.The document generally follows the provided coding guidelines, including:
- Use of proper nouns instead of personal pronouns
- Appropriate capitalization for emphasis
- Correct capitalization of proper nouns in sentences
- Consistent use of the Oxford comma
- Proper title case for headers
- Correct spelling and grammar
To ensure complete compliance, a final proofreading of the entire document is recommended.
Consider performing a final proofreading pass to catch any minor inconsistencies that may have been overlooked.
🧰 Tools
🪛 LanguageTool
[style] ~26-~26: ‘exactly the same’ might be wordy. Consider a shorter alternative.
Context: ...> A transaction's execution gas fee is exactly the same fee that you would pay for the same tra...(EN_WORDINESS_PREMIUM_EXACTLY_THE_SAME)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
- pages/builders/app-developers/transactions/estimates.mdx (1 hunks)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
pages/builders/app-developers/transactions/estimates.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. Use bold for prominence instead of all caps or italics.
- 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).
"pages/builders/app-developers/tutorials/sdk-trace-txns.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. Use bold for prominence instead of all caps or italics.
- 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).
"
🔇 Additional comments (14)
pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (14)
4-4
: LGTM: Description updated correctly.The description has been appropriately updated to reflect the use of the viem library instead of the Optimism SDK, accurately representing the content of the updated tutorial.
10-12
: LGTM: Introduction updated correctly.The introduction has been appropriately updated to reflect the use of the viem library instead of the Optimism SDK. The link to the viem library documentation is correctly provided, which is helpful for users who want to learn more about the library.
22-23
: LGTM: Project setup instructions updated correctly.The project setup instructions have been appropriately updated to reflect the use of the viem library instead of the Optimism SDK. This change is consistent with the overall update of the tutorial.
59-64
: LGTM: Helpful Node REPL instructions added.The addition of instructions for starting and using the Node REPL is beneficial, especially for users who may be new to this environment. The explanation is clear and concise, which will help users follow the tutorial more easily.
70-72
: LGTM: Viem import statement added correctly.The import statement for viem has been correctly added, which is consistent with the use of viem throughout the updated tutorial.
76-81
: LGTM: RPC URL import instructions added.The instructions for importing RPC URLs have been clearly added and are consistent with the earlier introduction of these URLs. The use of environment variables for managing configuration is a good practice that has been correctly implemented here.
86-88
: LGTM: Deposit transaction hash setup instructions added.The instructions for setting up a deposit transaction hash have been clearly added. The explanation about deposit tracing being based on the transaction hash is helpful for users' understanding. The flexibility to use a custom transaction hash is a good feature for users following the tutorial.
93-95
: LGTM: Withdrawal transaction hash setup instructions added.The instructions for setting up a withdrawal transaction hash have been clearly added. The explanation about withdrawal tracing being based on the transaction hash is helpful and consistent with the previous deposit transaction hash setup. The flexibility to use a custom transaction hash is maintained, which is beneficial for users following the tutorial.
100-100
: LGTM: RPC provider creation updated to use viem.The code snippet for creating RPC providers has been correctly updated to use viem's
createPublicClient
function. The creation of separate clients for L1 and L2 is appropriate and consistent with the tutorial's purpose of tracing transactions across both layers.
105-119
: LGTM: Deposit tracing instructions updated to use viem.The instructions for tracing a deposit have been appropriately updated to use viem functions. The step-by-step guidance is clear and demonstrates the correct use of viem's
getTransactionReceipt
function. These changes are consistent with the overall update to use viem instead of the Optimism SDK throughout the tutorial.
124-127
: LGTM: Deposit log parsing instructions added.The addition of instructions for parsing deposit logs is a valuable inclusion. It demonstrates how to use viem's functions to extract detailed information from the transaction logs, which is helpful for users who need to perform more in-depth analysis of their deposits.
131-133
: LGTM: Deposit transaction retrieval updated to use viem.The instructions for getting the deposit transaction have been correctly updated to use viem. The changes are consistent with the overall update of the tutorial, and they clearly demonstrate how to query for the L2 transaction that executed the deposit using viem's functions.
138-151
: LGTM: Withdrawal tracing instructions updated to use viem.The instructions for tracing a withdrawal have been appropriately updated to use viem functions. The step-by-step guidance is clear and demonstrates the correct use of viem's functions for getting withdrawal status and transaction receipt. These changes are consistent with the overall update to use viem instead of the Optimism SDK throughout the tutorial.
156-159
: LGTM: Withdrawal log parsing instructions added.The addition of instructions for parsing withdrawal logs is a valuable inclusion. It demonstrates how to use viem's functions to extract detailed information from the transaction logs, which is helpful for users who need to perform more in-depth analysis of their withdrawals.
Co-authored-by: Bradley Camacho <[email protected]>
Co-authored-by: Bradley Camacho <[email protected]>
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
🧹 Outside diff range and nitpick comments (2)
public/tutorials/sdk-trace-txns.js (2)
10-11
: Consider using environment variables for RPC URLs.For better security and configurability:
- Move RPC URLs to environment variables
- Consider using authenticated RPC providers (like Alchemy) as mentioned in the comment
- const l1RpcUrl = "https://rpc.ankr.com/eth_sepolia"; - const l2RpcUrl = "https://sepolia.optimism.io"; + const l1RpcUrl = process.env.L1_RPC_URL || "https://rpc.ankr.com/eth_sepolia"; + const l2RpcUrl = process.env.L2_RPC_URL || "https://sepolia.optimism.io";
14-15
: Document transaction hashes and consider making them configurable.The hard-coded transaction hashes should be:
- Documented with their specific purpose and expected outcomes
- Made configurable for different environments
+ // Example transactions from the Docs CI wallet on Sepolia + // depositHash: L1->L2 deposit transaction showing successful bridging + // withdrawalHash: L2->L1 withdrawal transaction showing successful bridging const depositHash = process.env.EXAMPLE_DEPOSIT_HASH || '0x5896d6e4a47b465e0d925723bab838c62ef53468139a5e9ba501efd70f90cccb' const withdrawalHash = process.env.EXAMPLE_WITHDRAWAL_HASH || '0x18b8b4022b8d9e380fd89417a2e897adadf31e4f41ca17442870bf89ad024f42'
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
- next-env.d.ts (1 hunks)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (1 hunks)
- public/tutorials/sdk-trace-txns.js (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- next-env.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx
🔇 Additional comments (1)
public/tutorials/sdk-trace-txns.js (1)
3-4
: 🛠️ Refactor suggestionImprove chain imports for better maintainability.
Consider destructuring all required chains in a single import statement for better organization:
- const { createPublicClient, http } = require('viem'); - const { optimismSepolia, sepolia } = require('viem/chains'); + import { createPublicClient, http } from 'viem'; + import { + sepolia, + optimismSepolia, + // Add other chains as needed + } from 'viem/chains';Likely invalid or redundant comment.
@ZakAyesh Can you please check this one more time? |
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 (3)
public/tutorials/sdk-trace-txns.js (1)
17-18
: Add documentation for example transactions.
The hardcoded transaction hashes need proper documentation to explain what they demonstrate.
- const depositHash = '0x5896d6e4a47b465e0d925723bab838c62ef53468139a5e9ba501efd70f90cccb'
- const withdrawalHash = '0x18b8b4022b8d9e380fd89417a2e897adadf31e4f41ca17442870bf89ad024f42'
+ // Example deposit transaction from Sepolia to Optimism Sepolia
+ // This transaction demonstrates a successful deposit with finality on L2
+ const depositHash = '0x5896d6e4a47b465e0d925723bab838c62ef53468139a5e9ba501efd70f90cccb'
+
+ // Example withdrawal transaction from Optimism Sepolia to Sepolia
+ // This transaction demonstrates a successful withdrawal with finality on L1
+ const withdrawalHash = '0x18b8b4022b8d9e380fd89417a2e897adadf31e4f41ca17442870bf89ad024f42'
words.txt (2)
Line range hint 355-359
: Redundant Superchain-related entries.
There are multiple variations of "Superchain" that might be redundant:
- SUPERCHAIN
- Superchain
- superchain
- Superchain's
- Superchains
Consider keeping only the essential variations needed for documentation. The possessive form "Superchain's" and lowercase "superchain" might be sufficient, as spell checkers can typically handle basic capitalization.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~355-~355: Hier werden zwei Wörter wiederholt. Meinten Sie „SUPERCHAIN Superchain“?
Context: ...nents subgame subheaders SUBU Sunnyside SUPERCHAIN Superchain superchain Superchain's Superchains Superscan Supersim supers...
(DE_PHRASE_REPETITION)
Line range hint 406-407
: Inconsistent casing for project name.
The term "zora" appears in both uppercase and lowercase forms.
Since "Zora" is a proper noun (project name), standardize on the capitalized version:
Zora
-zora
🧰 Tools
🪛 LanguageTool
[duplication] ~394-~394: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...VHOSTS vhosts Viem viem VMDEBUG vmdebug VMODULE vmodule voxel wagmi Warpcast xlarge XORI xtensi...
(GERMAN_WORD_REPEAT_RULE)
[duplication] ~404-~404: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...cast xlarge XORI xtensibility ZKPs ZKVM Zora zora
(GERMAN_WORD_REPEAT_RULE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (3)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx (1 hunks)
- public/tutorials/sdk-trace-txns.js (1 hunks)
- words.txt (12 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pages/builders/app-developers/tutorials/sdk-trace-txns.mdx
🧰 Additional context used
🪛 eslint
public/tutorials/sdk-trace-txns.js
[error] 52-52: Extra semicolon.
(semi)
🪛 LanguageTool
words.txt
[duplication] ~2-~2: Möglicher Tippfehler: ein Wort wird wiederholt
Context: accountqueue ACCOUNTQUEUE ACCOUNTSLOTS accountslots ADDI ADDIU ADDU airgap Allnodes Allocs ...
(GERMAN_WORD_REPEAT_RULE)
[duplication] ~308-~308: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...EMOTEDB remotedb replayability replayor REQUIREDBLOCKS requiredblocks rollouts Rollups rollups Routescan rpck...
(GERMAN_WORD_REPEAT_RULE)
[uncategorized] ~355-~355: Hier werden zwei Wörter wiederholt. Meinten Sie „SUPERCHAIN Superchain“?
Context: ...nents subgame subheaders SUBU Sunnyside SUPERCHAIN Superchain superchain Superchain's Superchains Superscan Supersim supers...
(DE_PHRASE_REPETITION)
[duplication] ~379-~379: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...rustlessly trustrpc txfeecap txmgr txns TXPOOL txpool txproxy uncountered Unprotect unsubmitt...
(GERMAN_WORD_REPEAT_RULE)
[duplication] ~404-~404: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...cast xlarge XORI xtensibility ZKPs ZKVM Zora zora
(GERMAN_WORD_REPEAT_RULE)
🔇 Additional comments (1)
words.txt (1)
14-14
: Verify new blockchain/crypto terms.
The following new terms have been added:
- Infrastructure providers: Ankr, Pyth
- Security platforms: Immunefi
- Development tools: Crosschain, voxel
- Documentation terms: Runbooks, Mitigations
- UI components: Sunnyside
These terms align with the PR objectives of updating documentation for the viem library integration. However, some terms need verification:
Also applies to: 33-33, 69-69, 151-151, 200-200, 294-295, 322-323, 355-355, 397-397
✅ Verification successful
All new terms are actively used in the codebase and documentation
The terms added to words.txt are verified to be legitimate additions as they are actively used throughout the codebase:
- Ankr: Used as an RPC provider in documentation and code examples
- Pyth: Documented as an oracle network with multiple references to its price feeds and features
- Immunefi: Referenced in security documentation and bug bounty program
- Crosschain/voxel: Used in SDK documentation and game-related content
- Runbooks/Mitigations: Used in security and technical documentation
- Sunnyside: Referenced in UI-related content
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify if these terms are used in the documentation
echo "Searching for usage of new terms in documentation..."
rg -i "ankr|pyth|immunefi|crosschain|voxel|runbooks|mitigations|sunnyside" --type md
Length of output: 201
Script:
#!/bin/bash
# Let's try a broader search across all file types to see where these terms are used
echo "Searching for usage of new terms across all files..."
rg -i "ankr|pyth|immunefi|crosschain|voxel|runbooks|mitigations|sunnyside"
# Also search for any configuration or package files that might reference these services
echo -e "\nSearching for configuration files..."
fd -e json -e yaml -e yml -e toml | xargs cat | grep -i "ankr\|pyth\|immunefi"
# Check for any code references to these services
echo -e "\nSearching for code references..."
ast-grep --pattern 'import { $_ } from "$_"' | grep -i "ankr\|pyth\|immunefi"
Length of output: 11372
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
🧹 Outside diff range and nitpick comments (2)
public/tutorials/sdk-trace-txns.js (1)
31-52
: Add structured logging.Consider using structured logging to make the output more machine-readable and easier to parse.
Apply this diff:
+ function logTransaction(type, step, data) { + console.log(JSON.stringify({ + type, + step, + timestamp: new Date().toISOString(), + data + }, null, 2)); + } - console.log('Grabbing deposit status...') - console.log(depositStatus); + logTransaction('deposit', 'status', depositStatus); - console.log('Grabbing deposit receipt...') - console.log(depositReceipt); + logTransaction('deposit', 'receipt', depositReceipt); // Apply similar changes to other logging statements🧰 Tools
🪛 eslint
[error] 31-31: Extra semicolon.
(semi)
[error] 32-32: Extra semicolon.
(semi)
[error] 35-35: Extra semicolon.
(semi)
[error] 36-36: Extra semicolon.
(semi)
[error] 39-39: Extra semicolon.
(semi)
[error] 40-40: Extra semicolon.
(semi)
[error] 43-43: Extra semicolon.
(semi)
[error] 44-44: Extra semicolon.
(semi)
[error] 47-47: Extra semicolon.
(semi)
[error] 48-48: Extra semicolon.
(semi)
[error] 51-51: Extra semicolon.
(semi)
[error] 52-52: Extra semicolon.
(semi)
words.txt (1)
Line range hint
1-412
: Consider maintaining alphabetical order.While the new terms are appropriate additions, maintaining strict alphabetical ordering would improve maintainability and make it easier to check for duplicates.
🧰 Tools
🪛 LanguageTool
[duplication] ~35-~35: Möglicher Tippfehler: ein Wort wird wiederholt
Context: ...lockhash BLOCKLOGS blocklists blocklogs BLOCKPROFILERATE blockprofilerate Blockscout blockspace blocktime BLOOMFI...(GERMAN_WORD_REPEAT_RULE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
public/tutorials/sdk-trace-txns.js
(1 hunks)words.txt
(3 hunks)
🧰 Additional context used
🪛 eslint
public/tutorials/sdk-trace-txns.js
[error] 3-3: Extra semicolon.
(semi)
[error] 4-4: Extra semicolon.
(semi)
[error] 6-6: Extra semicolon.
(semi)
[error] 7-7: Extra semicolon.
(semi)
[error] 13-13: Extra semicolon.
(semi)
[error] 14-14: Extra semicolon.
(semi)
[error] 23-23: Extra semicolon.
(semi)
[error] 28-28: Extra semicolon.
(semi)
[error] 31-31: Extra semicolon.
(semi)
[error] 32-32: Extra semicolon.
(semi)
[error] 35-35: Extra semicolon.
(semi)
[error] 36-36: Extra semicolon.
(semi)
[error] 39-39: Extra semicolon.
(semi)
[error] 40-40: Extra semicolon.
(semi)
[error] 43-43: Extra semicolon.
(semi)
[error] 44-44: Extra semicolon.
(semi)
[error] 47-47: Extra semicolon.
(semi)
[error] 48-48: Extra semicolon.
(semi)
[error] 51-51: Extra semicolon.
(semi)
[error] 52-52: Extra semicolon.
(semi)
🪛 LanguageTool
words.txt
[duplication] ~2-~2: Möglicher Tippfehler: ein Wort wird wiederholt
Context: accountqueue ACCOUNTQUEUE ACCOUNTSLOTS accountslots ADDI ADDIU ADDU airgap Allnodes Allocs ...
(GERMAN_WORD_REPEAT_RULE)
🔇 Additional comments (3)
public/tutorials/sdk-trace-txns.js (1)
3-4
:
Use ES modules instead of CommonJS require.
Since you're using top-level await, you should use ES modules instead of CommonJS.
Apply this diff:
- const { createPublicClient, http } = require('viem');
- const { optimismSepolia, sepolia } = require('viem/chains');
+ import { createPublicClient, http } from 'viem';
+ import { optimismSepolia, sepolia } from 'viem/chains';
🧰 Tools
🪛 eslint
[error] 3-3: Extra semicolon.
(semi)
[error] 4-4: Extra semicolon.
(semi)
words.txt (2)
34-34
: LGTM: New blockchain terminology added.
The addition of "blocklists" is relevant for transaction tracing functionality mentioned in the PR objectives.
412-412
: LGTM: Protocol-specific term added.
The addition of "zora" (Zora protocol) enhances the dictionary's coverage of blockchain protocols.
Description
This tutorial explains how you can use the Viem race a deposit or withdrawal transaction between L1 and L2. It deprecates the Optimism SDK.
Tests
Additional context
Metadata