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

Docs x warden contract #1165

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Docs x warden contract #1165

merged 4 commits into from
Jan 15, 2025

Conversation

ijonele
Copy link
Collaborator

@ijonele ijonele commented Jan 13, 2025

Summary by CodeRabbit

  • Documentation

    • Updated deployment instructions for EVM contracts with more precise, streamlined steps.
    • Improved guide for interacting with Warden Protocol modules, including clearer project setup and contract interaction details.
    • Enhanced documentation for managing spaces and querying space information with consistent function signatures.
    • Corrected terminology in glossary and oracle services documentation for accuracy.
    • Added an introductory guide for interacting with Warden Protocol modules.
    • Structural improvements in the documentation for "Rules" and "Actions" related to the x-act module.
    • Minor grammatical and link improvements in local chain setup guide.
  • Bug Fixes

    • Corrected "stock marked data" to "stock market data" in multiple documents.

Copy link

vercel bot commented Jan 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
warden-help-center ⬜️ Ignored (Inspect) Visit Preview Jan 14, 2025 1:21pm

Copy link
Contributor

coderabbitai bot commented Jan 13, 2025

📝 Walkthrough

Walkthrough

This pull request introduces documentation updates across several files in the developer documentation, focusing on improving clarity and precision for deploying and interacting with EVM contracts on the Warden Protocol. The changes include streamlining deployment instructions, updating contract interaction guides, correcting terminology, and adding more detailed explanations about interacting with Warden modules and precompiles.

Changes

File Change Summary
docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-an-evm-contract.md Simplified Foundry project creation instructions, updated contract filename, and removed unnecessary chain ID details.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md Rephrased introduction, updated contract interaction guide, added new sections for querying spaces.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md Updated function signatures, added addOwner and removeOwner functions, improved parameter consistency.
docs/developer-docs/docs/learn/glossary.md Corrected "stock marked data" to "stock market data."
docs/developer-docs/docs/learn/oracle-services.md Fixed terminology from "stock marked data" to "stock market data."
docs/developer-docs/docs/operate-a-node/run-a-local-chain.md Minor grammatical correction and updated hyperlink reference.
docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-a-cross-chain-app.md Changed prerequisites section from numbered to bullet point format for readability.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-key-requests.md Added precompile address for IWarden and minor formatting changes.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keychains.md Added precompile address for IWarden and minor formatting changes.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keys.md Added precompile address for IWarden and a new constant declaration.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md Added precompile address for IWarden to the tip section.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/introduction.md New introductory guide for interacting with Warden Protocol modules.
docs/developer-docs/docs/build-an-app/precompiles/x-act.md Expanded "Rules" and "Actions" sections with new methods and standardized output descriptions.
docs/developer-docs/docs/learn/warden-protocol-modules/x-warden.md Corrected phrasing in the "Usage" section for clarity.

Sequence Diagram

sequenceDiagram
    participant Developer
    participant WardenProtocol
    participant EVMContract
    participant Precompile

    Developer->>EVMContract: Deploy Contract
    EVMContract->>Precompile: Call spaceById()
    Precompile-->>EVMContract: Return Space Details
    EVMContract-->>Developer: Display Space Information
Loading

Possibly related PRs

Suggested labels

protocol, x-warden, contracts


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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

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

🧹 Nitpick comments (1)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (1)

149-151: Add language specifiers to code blocks.

Add language specifiers to the code blocks to improve syntax highlighting and documentation consistency.

Apply these changes:

-   ```
+   ```bash
    wardend query warden spaces
    ```

-   ```
+   ```bash
    cast call $CONTRACT_ADDRESS "getSpace(uint64)" 1 --rpc-url $RPC_URL
    ```

-   ```
+   ```text
    0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006ea8ac1673402989e7b653ae4e83b54173719c3000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000006ea8ac1673402989e7b653ae4e83b54173719c30
    ```

-   ```
+   ```bash
    cast call $CONTRACT_ADDRESS "getSpaceCreator(uint64)" 1 --rpc-url $RPC_URL
    ```

-   ```
+   ```text
    0x0000000000000000000000006ea8ac1673402989e7b653ae4e83b54173719c30
    ```

Also applies to: 157-159, 163-165, 169-171, 175-177

🧰 Tools
🪛 Markdownlint (0.37.0)

149-149: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e0785e4 and 267b5b6.

📒 Files selected for processing (6)
  • docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-an-evm-contract.md (2 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (3 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md (2 hunks)
  • docs/developer-docs/docs/learn/glossary.md (1 hunks)
  • docs/developer-docs/docs/learn/oracle-services.md (1 hunks)
  • docs/developer-docs/docs/operate-a-node/run-a-local-chain.md (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • docs/developer-docs/docs/operate-a-node/run-a-local-chain.md
🧰 Additional context used
📓 Path-based instructions (5)
docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-an-evm-contract.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/learn/glossary.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/learn/oracle-services.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

🪛 LanguageTool
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md

[grammar] ~45-~45: The verb ‘precompile’ does not usually follow articles like ‘the’. Check that ‘precompile’ is spelled correctly; using ‘precompile’ as a noun may be non-standard.
Context: ...Add a contract with functions calling the precompile. - In the contract section, you sh...

(A_INFINITIVE)

docs/developer-docs/docs/learn/glossary.md

[uncategorized] ~206-~206: Possible missing preposition found.
Context: ...ty service that enables smart contracts access real-life data feeds: prices, stock mar...

(AI_HYDRA_LEO_MISSING_TO)

docs/developer-docs/docs/learn/oracle-services.md

[uncategorized] ~9-~9: Possible missing preposition found.
Context: ...ty service that enables smart contracts access real-life data feeds: prices, stock...

(AI_HYDRA_LEO_MISSING_TO)

🪛 Markdownlint (0.37.0)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md

149-149: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


157-157: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


163-163: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


169-169: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


175-175: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: lint
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (2)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md (1)

25-29: LGTM!

The function signatures and implementations are well-formatted and correctly implemented.

Also applies to: 314-315

docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-an-evm-contract.md (1)

127-132: LGTM!

The documentation changes improve clarity and provide better guidance for users.

Also applies to: 136-136, 339-339

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

🔭 Outside diff range comments (1)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md (1)

Line range hint 123-134: Fix inconsistent contract name.

The contract name in this section is WardenKeyRequests while other sections use WardenSignatureRequests. This inconsistency might confuse readers.

-contract WardenKeyRequests {
+contract WardenSignatureRequests {
🧹 Nitpick comments (8)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md (1)

Line range hint 123-134: Add missing language identifier to the code block.

The code block is missing the solidity language identifier which helps with syntax highlighting.

Wrap the code block with:

```solidity
// your code here
```
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/introduction.md (2)

1-3: Remove the zero-width space character from the frontmatter.

There's an invisible zero-width space character at the start of line 1 that should be removed to prevent potential parsing issues.

----
+---

9-15: Fix the step numbering sequence.

The steps jump from 1 to 3, skipping step 2. This should be corrected to maintain a proper sequence.

 1. Deploy a simple EVM contract by following the [Get started](get-started) guide.
-3. After that, you can expand your contract code as shown in these subsections:
+2. After that, you can expand your contract code as shown in these subsections:
    - [Interact with x/warden](/category/interact-with-xwarden)
    - *Other modules: coming soon*
-4. For an overview of available functions, refer to the [Precompiles](/category/precompiles) section.
+3. For an overview of available functions, refer to the [Precompiles](/category/precompiles) section.
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (3)

22-29: Improve the Foundry installation command format.

The command continuation with backslash might cause issues. Consider using a single line:

-   curl -L https://foundry.paradigm.xyz | bash \ 
-   foundryup
+   curl -L https://foundry.paradigm.xyz | bash && foundryup

52-96: Enhance contract documentation with NatSpec.

Consider adding NatSpec documentation to improve code clarity:

 contract querySpace {
+    /// @notice The IWarden precompile interface instance
     IWarden public warden;
 
+    /// @notice Initializes the contract with the IWarden precompile
     constructor() {
         warden = IWarden(WARDEN_ADDRESS);
     }
 
+    /// @notice Retrieves a Space by its ID
+    /// @param id The ID of the Space to retrieve
+    /// @return The Space data structure
     function getSpace(uint64 id) external view returns (IWarden.Space memory) {
         return warden.spaceById(id);
     }

151-179: Add language specifiers to code blocks.

Add language specifiers to improve syntax highlighting:

-   ```
+   ```bash
    wardend query warden spaces
    ```

-   ```
+   ```bash
    cast call $CONTRACT_ADDRESS "getSpace(uint64)" 1 --rpc-url $RPC_URL
    ```

-   ```
+   ```text
    0x000000000000000000000000000000000000000000000000000000000000002000000000...
    ```
🧰 Tools
🪛 Markdownlint (0.37.0)

151-151: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


159-159: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


165-165: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


171-171: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


177-177: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

docs/developer-docs/docs/build-an-app/precompiles/x-act.md (2)

26-53: Add usage examples for Rule operations.

Consider adding example code snippets demonstrating how to create and update Rules:

// Example: Creating a new Rule
function createRule() external {
    string memory name = "ApprovalRule";
    string memory definition = "count(approval) >= 2";
    uint64 templateId = act.newTemplate(name, definition);
}

// Example: Updating a Rule
function updateRule(uint64 templateId) external {
    string memory newName = "UpdatedRule";
    string memory newDefinition = "count(approval) >= 3";
    bool success = act.updateTemplate(templateId, newName, newDefinition);
    require(success, "Update failed");
}

108-108: Fix the return statement format.

The return statement is missing the @ symbol:

-  return true If execution was successful
+  @return true If execution was successful
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98a4850 and 125f392.

📒 Files selected for processing (11)
  • docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-a-cross-chain-app.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (4 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/_category_.json (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-key-requests.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keychains.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keys.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md (3 hunks)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/introduction.md (1 hunks)
  • docs/developer-docs/docs/build-an-app/precompiles/x-act.md (2 hunks)
  • docs/developer-docs/docs/learn/warden-protocol-modules/x-warden.md (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keychains.md
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/category.json
  • docs/developer-docs/docs/build-an-app/deploy-smart-contracts-on-warden/deploy-a-cross-chain-app.md
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-key-requests.md
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-keys.md
  • docs/developer-docs/docs/learn/warden-protocol-modules/x-warden.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-spaces.md
🧰 Additional context used
📓 Path-based instructions (4)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/introduction.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/build-an-app/precompiles/x-act.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (1)

Pattern **/*.md: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

🪛 LanguageTool
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md

[grammar] ~44-~44: The verb ‘precompile’ does not usually follow articles like ‘a’. Check that ‘precompile’ is spelled correctly; using ‘precompile’ as a noun may be non-standard.
Context: ...ontract named Warden.sol. To call a precompile in your contract, do this:: - Defin...

(A_INFINITIVE)


[grammar] ~47-~47: The verb ‘precompile’ does not usually follow articles like ‘the’. Check that ‘precompile’ is spelled correctly; using ‘precompile’ as a noun may be non-standard.
Context: ...Add a contract with functions calling the precompile. - In the contract section, you sh...

(A_INFINITIVE)

🪛 Markdownlint (0.37.0)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md

151-151: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


159-159: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


165-165: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


171-171: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)


177-177: null
Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (go)
🔇 Additional comments (5)
docs/developer-docs/docs/build-an-app/interact-with-warden-modules/interact-with-x-warden/manage-signature-requests.md (1)

16-17: LGTM! Essential information added.

The addition of the precompile address in the tip section is valuable information that helps developers integrate with the contract.

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/introduction.md (2)

5-7: LGTM! Clear and well-structured introduction.

The title and introduction effectively explain the purpose of the document with proper links to relevant sections.


17-22: LGTM! Well-structured reference table.

The table effectively presents the necessary resources with proper formatting and consistent precompile addresses.

docs/developer-docs/docs/build-an-app/interact-with-warden-modules/get-started.md (1)

12-16: Well-structured overview section!

The overview effectively explains the purpose and provides helpful links to related documentation.

docs/developer-docs/docs/build-an-app/precompiles/x-act.md (1)

82-108: Well-documented events section!

The events documentation is comprehensive and follows a consistent format throughout.

Copy link
Collaborator

@alijnmerchant21 alijnmerchant21 left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks!

@ijonele ijonele merged commit 80776f4 into main Jan 15, 2025
13 checks passed
@ijonele ijonele deleted the docs-x-warden-contract branch January 15, 2025 13:04
@coderabbitai coderabbitai bot mentioned this pull request Jan 23, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 5, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an example contract to the x/warden guide Small typo in docs.
2 participants