Skip to content
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

Add smart contract interaction tutorial under EVM section #424

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

yarikbratashchuk
Copy link
Contributor

@yarikbratashchuk yarikbratashchuk commented Jul 22, 2024

Summary by CodeRabbit

  • New Features

    • Introduced a new sidebar organization for EVM-related tutorials, enhancing navigation and content clarity.
    • Added comprehensive tutorials for deploying and interacting with smart contracts on the BeaconKit and EVM rollup platforms.
    • Enhanced existing tutorials with practical steps for user account funding and improved clarity on EVM Chain RPC availability.
  • Documentation

    • Expanded documentation on smart contract deployment and interaction within the BeaconKit and Omni EVM frameworks, including new sections and examples.

Copy link
Contributor

coderabbitai bot commented Jul 22, 2024

Walkthrough

The recent updates enhance the organization and comprehensiveness of the EVM tutorial documentation. A new parent category for EVM tutorials groups related topics, improving navigation. Additionally, new sections on smart contract deployment and interaction have been added to specific tutorials, offering clear guidance and practical steps for users engaging with the BeaconKit and Omni EVM frameworks.

Changes

Files Change Summary
.vitepress/config.ts Introduced a new sidebar grouping for EVM tutorials, enhancing navigation with collapsible sections for related content.
tutorials/beaconkit.md, tutorials/octane-evm.md Expanded documentation on smart contract deployment and interaction, including practical steps for account funding and links to existing tutorials.
tutorials/evm-contract-interaction.md New document providing a comprehensive guide for deploying and interacting with a smart contract on an EVM rollup, including setup instructions and command-line usage.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EVM_Chain
    participant Contract
    User->>EVM_Chain: Deploy Contract
    EVM_Chain-->>User: Deployment Confirmation
    User->>Contract: Interact with Contract
    Contract-->>User: Return Response
Loading

🐰 In the meadow, changes bloom,
New paths for EVM tutorials loom.
With contracts deployed, so clear and bright,
Hop along, dear users, in delight!
The rabbit sings, with joy we share,
Knowledge grows, as we all prepare! 🌼


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@RollkitBot RollkitBot requested a review from MSevey July 22, 2024 18:33
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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, codebase verification and nitpick comments (4)
tutorials/octane-evm.md (1)

57-65: Fix grammatical issue.

The phrase "hands on experience" should be "hands-on experience."

-  follow our [Contract interaction tutorial](/tutorials/evm-contract-interaction) to get a hands on experience.
+  follow our [Contract interaction tutorial](/tutorials/evm-contract-interaction) to get a hands-on experience.
Tools
LanguageTool

[grammar] ~59-~59: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

tutorials/evm-contract-interaction.md (2)

123-123: Consider a shorter alternative to avoid wordiness.

The phrase "In order to interact with the contract on the frontend" can be shortened to "To interact with the contract on the frontend."

-  In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet
+  To interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet
Tools
LanguageTool

[style] ~123-~123: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


137-137: Use "an" instead of "a" before a vowel sound.

The phrase "post a ooga booga" should be "post an ooga booga."

-  and post a ooga booga on your ooga booga portal!
+  and post an ooga booga on your ooga booga portal!
Tools
LanguageTool

[misspelling] ~137-~137: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

tutorials/beaconkit.md (1)

93-106: Fix grammatical issue.

The phrase "hands on experience" should be "hands-on experience."

-  follow our [Contract interaction tutorial](/tutorials/evm-contract-interaction) to get a hands on experience.
+  follow our [Contract interaction tutorial](/tutorials/evm-contract-interaction) to get a hands-on experience.
Tools
LanguageTool

[grammar] ~95-~95: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b8d1b7d and d714a6c.

Files ignored due to path filters (1)
  • public/frontend-evm.png is excluded by !**/*.png
Files selected for processing (4)
  • .vitepress/config.ts (1 hunks)
  • tutorials/beaconkit.md (2 hunks)
  • tutorials/evm-contract-interaction.md (1 hunks)
  • tutorials/octane-evm.md (1 hunks)
Additional context used
LanguageTool
tutorials/octane-evm.md

[grammar] ~59-~59: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

tutorials/evm-contract-interaction.md

[style] ~123-~123: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


[style] ~124-~124: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...th the contract on the frontend, you'll need to fund an account that you have in your E...

(REP_NEED_TO_VB)


[style] ~135-~135: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... the private key in originally, you may need to set it again._ Now, login with your wa...

(REP_NEED_TO_VB)


[misspelling] ~137-~137: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

tutorials/beaconkit.md

[grammar] ~95-~95: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

Gitleaks
tutorials/evm-contract-interaction.md

19-20: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


38-39: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Additional comments not posted (7)
tutorials/octane-evm.md (2)

51-55: LGTM!

The new log message example is clear and provides useful information about the readiness of the Omni node to accept EVM transactions.


61-65: LGTM!

The instructions for funding an account using the omni-cli are clear and provide the necessary steps.

tutorials/evm-contract-interaction.md (4)

1-3: LGTM!

The introduction provides a clear overview and essential prerequisites for the tutorial.


5-12: LGTM!

The installation instructions for Foundry are clear and provide the necessary steps.


32-47: LGTM!

The deployment instructions for the smart contract are clear and provide the necessary steps.

Tools
Gitleaks

38-39: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


82-91: LGTM!

The instructions for interacting with the smart contract are clear and provide the necessary steps.

.vitepress/config.ts (1)

251-259: LGTM! Verify the links.

The changes improve the organization of the EVM tutorials by grouping them under a new parent item labeled "EVM". Ensure that all the links to the tutorials are correct and functional.

Verification successful

Verification Successful: All linked files exist

The changes improve the organization of the EVM tutorials by grouping them under a new parent item labeled "EVM". All the links to the tutorials are correct and functional.

  • tutorials/octane-evm.md
  • tutorials/beaconkit.md
  • tutorials/evm-contract-interaction.md
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that all links in the new EVM section are correct and functional.

# Test: Check the existence of the linked files. Expect: All files exist.
for link in "tutorials/octane-evm" "tutorials/beaconkit" "tutorials/evm-contract-interaction"; do
  if ! fd --type f --regex "$link.md"; then
    echo "Missing file for link: $link"
  fi
done

Length of output: 438


Script:

#!/bin/bash
# List all files in the tutorials directory to verify the existence of the specific linked files.

echo "Listing all files in the tutorials directory:"
fd --type f --regex "tutorials/.*"

echo "Checking for specific linked files:"
for link in "tutorials/octane-evm.md" "tutorials/beaconkit.md" "tutorials/evm-contract-interaction.md"; do
  if fd --type f --regex "$link"; then
    echo "File exists for link: $link"
  else
    echo "Missing file for link: $link"
  fi
done

Length of output: 1013

tutorials/evm-contract-interaction.md Outdated Show resolved Hide resolved
tutorials/evm-contract-interaction.md Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jul 22, 2024

PR Preview Action v1.4.7
🚀 Deployed preview to https://rollkit.github.io/docs-preview/./pr-424/
on branch main at 2024-07-23 15:06 UTC

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d714a6c and 2981872.

Files selected for processing (1)
  • .vitepress/config.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .vitepress/config.ts

tutorials/beaconkit.md Outdated Show resolved Hide resolved
tutorials/beaconkit.md Outdated Show resolved Hide resolved
tutorials/beaconkit.md Outdated Show resolved Hide resolved
jcstein
jcstein previously approved these changes Jul 22, 2024
Copy link
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

lgtm, left some comments/suggestions for a few minor things

yarikbratashchuk and others added 2 commits July 23, 2024 15:48
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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, codebase verification and nitpick comments (2)
tutorials/evm-contract-interaction.md (1)

123-137: Improve stylistic consistency and fix grammatical error.

Consider rephrasing to avoid repetition and correct the grammatical error.

- In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet or add the private key from above into your wallet.
+ To interact with the contract on the frontend, fund an account in your Ethereum wallet or add the private key from above to your wallet.

- If you are in a different terminal than the one you set the private key in originally, you may need to set it again.
+ If you are in a different terminal than the one where you originally set the private key, you may need to set it again.

- Now, login with your wallet that you funded, and post a ooga booga on your ooga booga portal!
+ Now, log in with your funded wallet and post an ooga booga on your ooga booga portal!
Tools
LanguageTool

[style] ~123-~123: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


[style] ~124-~124: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...th the contract on the frontend, you'll need to fund an account that you have in your E...

(REP_NEED_TO_VB)


[style] ~135-~135: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... the private key in originally, you may need to set it again._ Now, login with your wa...

(REP_NEED_TO_VB)


[misspelling] ~137-~137: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

tutorials/beaconkit.md (1)

93-95: Fix grammatical error.

The adjective “hands-on” is spelled with a hyphen.

-  hands on experience
+  hands-on experience
Tools
LanguageTool

[grammar] ~95-~95: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2981872 and e66d23f.

Files selected for processing (2)
  • tutorials/beaconkit.md (2 hunks)
  • tutorials/evm-contract-interaction.md (1 hunks)
Additional context used
LanguageTool
tutorials/evm-contract-interaction.md

[style] ~123-~123: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


[style] ~124-~124: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...th the contract on the frontend, you'll need to fund an account that you have in your E...

(REP_NEED_TO_VB)


[style] ~135-~135: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... the private key in originally, you may need to set it again._ Now, login with your wa...

(REP_NEED_TO_VB)


[misspelling] ~137-~137: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

tutorials/beaconkit.md

[grammar] ~95-~95: The adjective “hands-on” is spelled with a hyphen.
Context: ...ials/evm-contract-interaction) to get a hands on experience. To fund your account with...

(HANDS_ON_HYPHEN)

Gitleaks
tutorials/evm-contract-interaction.md

19-20: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


38-39: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Additional comments not posted (7)
tutorials/evm-contract-interaction.md (2)

5-12: LGTM!

The instructions for installing Foundry are clear and correct.


141-143: LGTM!

The conclusion is clear and concise.

tutorials/beaconkit.md (5)

Line range hint 1-8:
LGTM!

The introduction is clear and provides a good overview of the tutorial.


Line range hint 9-22:
LGTM!

The prerequisites are clearly listed and provide useful links for installation.


Line range hint 23-30:
LGTM!

The instructions for running a local DA node are clear and straightforward.


Line range hint 31-36:
LGTM!

The instructions for cloning the BeaconKit repository and switching to the Rollkit branch are clear and correct.


111-117: LGTM!

The conclusion is clear and concise.

tutorials/evm-contract-interaction.md Show resolved Hide resolved
@yarikbratashchuk yarikbratashchuk requested a review from jcstein July 23, 2024 15:06
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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, codebase verification and nitpick comments (4)
tutorials/evm-contract-interaction.md (4)

124-124: Consider a shorter alternative to avoid wordiness.

The phrase "In order to" can be shortened to "To".

- In order to interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet
+ To interact with the contract on the frontend, you'll need to fund an account that you have in your Ethereum wallet
Tools
LanguageTool

[style] ~124-~124: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


125-125: Consider varying the phrasing to avoid repetition.

The phrase "you'll need to" is used multiple times. Consider rephrasing for variety.

- you'll need to fund an account that you have in your Ethereum wallet
+ you must fund an account that you have in your Ethereum wallet
Tools
LanguageTool

[style] ~125-~125: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...th the contract on the frontend, you'll need to fund an account that you have in your E...

(REP_NEED_TO_VB)


136-136: Consider varying the phrasing to avoid repetition.

The phrase "you may need to" is used multiple times. Consider rephrasing for variety.

- you may need to set it again.
+ it might be necessary to set it again.
Tools
LanguageTool

[style] ~136-~136: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... the private key in originally, you may need to set it again._ Now, login with your wa...

(REP_NEED_TO_VB)


138-138: Use "an" instead of "a" before a vowel sound.

Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.

- and post a ooga booga on your ooga booga portal!
+ and post an ooga booga on your ooga booga portal!
Tools
LanguageTool

[misspelling] ~138-~138: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e66d23f and 80f9c56.

Files selected for processing (1)
  • tutorials/evm-contract-interaction.md (1 hunks)
Additional context used
LanguageTool
tutorials/evm-contract-interaction.md

[style] ~124-~124: Consider a shorter alternative to avoid wordiness.
Context: ...`` ::: ### Interact with the frontend In order to interact with the contract on the front...

(IN_ORDER_TO_PREMIUM)


[style] ~125-~125: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...th the contract on the frontend, you'll need to fund an account that you have in your E...

(REP_NEED_TO_VB)


[style] ~136-~136: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ... the private key in originally, you may need to set it again._ Now, login with your wa...

(REP_NEED_TO_VB)


[misspelling] ~138-~138: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...h your wallet that you funded, and post a ooga booga on your ooga booga portal! ...

(EN_A_VS_AN)

Gitleaks
tutorials/evm-contract-interaction.md

19-20: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


39-40: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

Additional comments not posted (3)
tutorials/evm-contract-interaction.md (3)

5-12: LGTM!

The instructions for installing Foundry are clear and accurate.


83-98: LGTM!

The instructions for interacting with the contract are clear and accurate.


100-121: LGTM!

The instructions for starting and updating the frontend are clear and accurate.

tutorials/evm-contract-interaction.md Show resolved Hide resolved
tutorials/evm-contract-interaction.md Show resolved Hide resolved
tutorials/evm-contract-interaction.md Show resolved Hide resolved
Copy link
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

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

fixing list again

@Manav-Aggarwal Manav-Aggarwal enabled auto-merge (squash) July 24, 2024 16:56
@Manav-Aggarwal Manav-Aggarwal merged commit bc4e70e into main Jul 24, 2024
4 checks passed
@Manav-Aggarwal Manav-Aggarwal deleted the yarik/contract-interaction branch July 24, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants