> For the complete documentation index, see [llms.txt](https://taraxa.gitbook.io/taraxa-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taraxa.gitbook.io/taraxa-network/develop/smart-contracts/remix.md).

# Remix

Deploying Smart Contracts on Taraxa via 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FrpmrQ439j4l0Im8uWdWw%2Fimage.png?alt=media&amp;token=a4d80516-b233-4976-8bd9-308767c53989" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FbAaOQzY1kdnltjvVjmKa%2Fimage.png?alt=media&amp;token=5ade3ad9-d18d-4af9-8d4d-ddacbe7c3579" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FyiLUbUGLVxh50fbp5yjP%2Fimage.png?alt=media&amp;token=608ee1fb-4c16-4405-a879-fdba541e40f5" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FR9kwdJRpM546e3XtCdw7%2Fimage.png?alt=media&amp;token=6f248277-6a16-472b-a6dc-d80e6d17751a" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FCUxmQ7NC27Ea6pcE2CF1%2Fimage.png?alt=media&amp;token=67f0bcbe-9704-4dbd-b9d0-3a92a9ad98ce" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FmScsajEvTk7qTzW2k7xF%2Fimage.png?alt=media&amp;token=922a37e9-7a5a-4d33-acd5-7bd6cd97d1c2" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FLsSX1HdEI5gO57sFGtaC%2Fimage.png?alt=media&amp;token=e155157b-81ee-4851-a1f8-baedb1d2549d" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FjvRKHLv4V7yyU94aYBE7%2Fimage.png?alt=media&amp;token=fd958830-8490-490c-8e74-412e67193a5a" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FnS83YaH5iIF5hhvPr9BM%2Fimage.png?alt=media&amp;token=36d2a36b-b40b-4410-8f0f-7842e54a4450" alt=""><figcaption></figcaption></figure>

<figure><img src="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2F8ZWThsOnchfpdN6O9uYG%2Fimage.png?alt=media&amp;token=d9e4a6b7-3ff3-4c68-94f1-21068718cc04" 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="https://902105633-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJepYMaCjWn_0Y0r41o%2Fuploads%2FbJglYluBKeTTRsHlwUQv%2Fimage.png?alt=media&amp;token=bffb54bb-997d-4e73-b7ef-a3c605111097" alt=""><figcaption></figcaption></figure>

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