# Remix

{% hint style="info" %}
Remix is an open-source, web-based integrated development environment (IDE) for writing, compiling, deploying, and debugging Solidity smart contracts on the Ethereum blockchain. It provides a user-friendly interface with tools for testing, debugging, and interacting with smart contracts directly from the browser.
{% endhint %}

Open Remix at [https://remix.etherium.org](https://remix.ethereum.org/)

## Deploying your first smart contract

By default you can find the HelloWorld.sol contract in the file explorer under contracts.

Compile it using the third tab.

You can deploy it using the fourth tab. You will need to select the `injected provider` environment and make sure your metamask is connected to the right network and account.

Deploy the contract, it should open a window for signature (notice the fees in XRP).

Once deployed successfully you can interact with it by scrolling down tab 4.

## Creating other contracts

Create the following contract in remix, give it the name `counter.sol`

{% code title="counter.sol" %}

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Counter {
    uint256 private counter;

    constructor() {
        counter = 0;  // Initialize counter to 0
    }

    function incrementAndGet() public returns (uint256) {
        counter += 1;  // Increment the counter
        return counter;  // Return the updated counter value
    }

    function getCounter() public view returns (uint256) {
        return counter;  // Return the current counter value
    }
}

```

{% endcode %}

Compile the new contract using the third tab.

Deploy the contract using the fourth tab.

You can now interact with the counter smart contract:

* send a transaction to increment it, this will trigger a transaction to sign in Metamask
* read the current value (notice how this is free)

To go further you can explore the [key concepts](/evm-sidechain/banking-contract-key-concepts.md) behind the simple banking contract we deploy in the banking app.


---

# 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.xrpl-commons.org/evm-sidechain/remix.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.
