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.

  • Go to Remix, you'll see the IDE

  • Let's start with one of the pre-populated default contracts in the Remix IDE, 1_Storage.sol.

  • We'll compile with version 0.8.3

  • 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.

  • Make sure you have some TARA in your wallet, Confirm the Metamask transaction prompt (wallet address redacted).

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

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

  • We can also confirm this in the explorer, we can look up the transaction ID in the explorer and make sure the deployed contract address is the same. (certain details redacted)

  • 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).

  • 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!

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

Last updated