Skip to content

Conversation

@snigdha920
Copy link
Contributor

@snigdha920 snigdha920 commented Jan 10, 2025

Branches off #127, moves https://github.com/settlemint/docs/pull/123/files#diff-cd9af8f677658ff9c6841ebfb7674e32be902ea86f0f2e200cddddf9ea053881L36-L52 to it's own page

Summary by Sourcery

New Features:

  • Integrate an OpenAI GPT plugin into the Smart Contract Set IDE to provide automated code suggestions, smart contract templates, and code completion capabilities, along with interactive debugging and explanation features.

@linear
Copy link

linear bot commented Jan 10, 2025

@snigdha920 snigdha920 marked this pull request as ready for review January 10, 2025 12:14
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 10, 2025

Reviewer's Guide by Sourcery

This pull request introduces documentation for the new Generative AI plugin in the SettleMint platform. It explains the plugin's features, benefits, and usage with examples and a video tutorial. The documentation also clarifies how to deploy smart contracts using the platform's IDE, including compiling and deploying to local and platform networks.

Sequence diagram for deploying a smart contract to platform network

sequenceDiagram
    actor Developer
    participant IDE
    participant TaskManager
    participant Platform
    participant Network
    Developer->>IDE: Open IDE
    Developer->>TaskManager: Run 'SettleMint - Login'
    TaskManager->>Platform: Authenticate
    Developer->>TaskManager: Run 'Hardhat - Build'
    TaskManager->>IDE: Compile contracts
    Developer->>TaskManager: Run 'Deploy to platform network'
    TaskManager->>Developer: Request node selection
    Developer->>TaskManager: Select node
    TaskManager->>Developer: Request private key
    Developer->>TaskManager: Select private key
    TaskManager->>Network: Deploy contract
    Network-->>Developer: Confirm deployment
Loading

Sequence diagram for deploying a smart contract to local network

sequenceDiagram
    actor Developer
    participant IDE
    participant TaskManager
    participant LocalNetwork
    Developer->>IDE: Open IDE
    Developer->>TaskManager: Run 'Hardhat - Build'
    TaskManager->>IDE: Compile contracts
    Developer->>TaskManager: Run 'Start local network'
    TaskManager->>LocalNetwork: Initialize network
    Developer->>TaskManager: Run 'Deploy to local network'
    TaskManager->>LocalNetwork: Deploy contract
    LocalNetwork-->>Developer: Confirm deployment
Loading

Flow diagram for smart contract deployment process

flowchart TD
    A[Start] --> B[Open IDE]
    B --> C[Access Task Manager]
    C --> D{Choose Framework}
    D -->|Hardhat| E[Run Hardhat Build]
    D -->|Foundry| F[Run Foundry Build]
    E --> G{Choose Network}
    F --> G
    G -->|Platform Network| H[Login to Platform]
    H --> I[Select Node]
    I --> J[Select Private Key]
    J --> K[Deploy Contract]
    G -->|Local Network| L[Start Local Network]
    L --> M[Deploy to Local Network]
    M --> N[End]
    K --> N
Loading

File-Level Changes

Change Details Files
Added documentation for the Generative AI plugin.
  • Created a new file to explain the Generative AI plugin.
  • Included information about the plugin's features, such as automated code suggestions, templates, and code completion.
  • Added details on interactive debugging and explanation features.
  • Provided examples of prompts for using the plugin.
  • Embedded a YouTube video tutorial.
docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/5_AI_plugin.md
Updated the smart contract deployment documentation.
  • Revised the introduction to focus on deploying contracts to platform and local networks.
  • Added steps for accessing the Task Manager.
  • Included instructions for compiling contracts using Hardhat and Foundry.
  • Provided detailed steps for deploying to a platform network, including login, node selection, and private key selection.
  • Added a section on deploying to a local Hardhat network.
  • Removed outdated information about deploying with the terminal.
  • Added a section on customizing smart contracts and a link to the Generative AI plugin documentation.
docs/using-platform/15_dev-tools/0_code-studio/1_smart-contract-sets/4_deploying-a-contract.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the feat New feature label Jan 10, 2025
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @snigdha920 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider retaining terminal-based deployment instructions in a collapsed section for users who prefer command-line interfaces.
  • The AI plugin documentation would benefit from more detailed examples of practical use cases and limitations of the tool beyond the basic prompts.
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* main:
  feat: update deploying a contract section (#127)
@roderik roderik merged commit 142bc9d into main Jan 10, 2025
2 checks passed
@roderik roderik deleted the snigdha/eng-2147-generative-ai-plugin-docs branch January 10, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants