# Remix

Here's a step-by-step example to deploy a simple contract onto Taraxa's mainnet via [Remix](https://remix.ethereum.org/).&#x20;

* Go to [Remix](https://remix.ethereum.org/), you'll see the IDE

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

* Let's start with one of the pre-populated default contracts in the Remix IDE, `1_Storage.sol`.&#x20;

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

* We'll compile with version 0.8.3 in this example. In general you can use compiler version up to 0.8.23, our team is constantly updating our VM implementation to maximize compatibility.&#x20;

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

* Let's deploy, change the Environment to "Injected Provider - Metamask" and make sure that you're on the Taraxa Mainnet network on Metamask. If you don't know how, here's how you can [add Taraxa into Metamask](/taraxa-network/wallet/metamask.md).&#x20;

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

* Make sure you have some TARA in your wallet, Confirm the Metamask transaction prompt (wallet address redacted).&#x20;

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

* Check out the console output inside the Remix IDE, looks like the contract was successfully deployed! (wallet address & transaction hash redacted)&#x20;

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

* You can find the deployed contract address on the bottom left side of the Deploy & Run Transactions panel in the Remix IDE.&#x20;

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

* We can also confirm this in the [explorer](https://explorer.mainnet.taraxa.io/), we can look up the transaction ID in the explorer and make sure the deployed contract address is the same. (certain details redacted)&#x20;

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

* Let's try interacting with the contract via the Remix IDE, let's store a number into the contract by calling the `store()` function, and of course confirm the transaction on Metamask. (certain details redacted).&#x20;

<figure><img src="/files/0yZmgkeMhrGStwebhwgd" alt=""><figcaption></figcaption></figure>

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

* From the Remix IDE console output, it looks like the transaction went through, and calling the `retrieve()` function correctly recalls the stored number. Everything checks out!&#x20;

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

🎊🎊 That's it, you're done! You've successfully deployed a smart contract onto Taraxa. 🎊🎊


---

# 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://taraxa.gitbook.io/taraxa-network/develop/smart-contracts/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.
