# Smart Contract

## **RalphBuilder – AI-Powered Smart Contract Generation**

RalphBuilder is an innovative platform designed to simplify the creation of powerful and secure smart contracts. Using artificial intelligence, the **Smart Contract Coder** streamlines blockchain development, making smart contract generation accessible to everyone, regardless of coding expertise.

#### **How Does RalphBuilder Work?**

With RalphBuilder, users simply describe their needs in natural language. The AI then generates a smart contract tailored to their request. For added convenience, a selection of **predefined prompts** is available to guide users through the process.

#### **Service Access & Usage Conditions**

Currently in **beta**, the service is available here:\
🔗 [**Smart Contract Generation**](https://app.ralphbuilder.org/smart-contract)

In the future, public access will be limited to users who stake **at least 3,000 $BUILD** on our **Staking** :\
🔗 [**RalphBuilder Staking**](https://app.ralphbuilder.org/staking)

#### **How to Generate a Smart Contract with RalphBuilder**

1. **Connect Your Wallet**
   * Visit the platform and connect your wallet to access the service.

<figure><img src="/files/saQfB9BPQFGDchIiK0jO" alt=""><figcaption></figcaption></figure>

2. **Navigate to the "Generator" Section**

* Enter your **prompt** in the designated field (**you can write in any language available on the site**).
* The more precise your request, the more functional the generated code will be, especially for advanced smart contracts (e.g., NFT collections).

<figure><img src="/files/Z2VuPZl10l40X4zKwLdN" alt=""><figcaption></figcaption></figure>

3. **Start the Generation Process**

* Click **"Generate"**, and RalphBuilder will analyze your request before producing the corresponding code.

<figure><img src="/files/hL4Swnv2iFoHfTV9RsTa" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/eeEeuC9FbXFJCOioTXaU" alt=""><figcaption></figcaption></figure>

4. **Retrieve Your Smart Contract**

* Once the smart contract is generated in **RALPH**, you can **easily copy** it using the copy button in the top-right corner.

<figure><img src="/files/IMtnour04N8kB1wKL3Ee" alt=""><figcaption></figcaption></figure>

You can also generate more complex smart contracts, the generator will automatically split them into multiple contracts if needed :&#x20;

<figure><img src="/files/9hZTwRhAAt0tbV30r477" alt=""><figcaption></figcaption></figure>

#### **5. History & Feedback**

* A **history** of your requests is available in the **"History"** tab, where you can review and rate your queries.
* **Your feedback matters!** The more detailed your input, the better RalphBuilder can refine the quality of generated smart contracts.

<figure><img src="/files/OjxekCEjTsMDkCzapnIn" alt=""><figcaption></figcaption></figure>

#### **Why Provide Feedback?**

RalphBuilder’s AI continuously learns. Every user feedback helps enhance the model’s accuracy and improve smart contract generation. By reporting errors and specifying your expectations, you actively contribute to its improvement.

<figure><img src="/files/SN808YwTV0xdfKmnnY7q" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ralphbuilder.org/ralphbuilder-dapp/smart-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
