Remix

Set up a Remix Ethermint testnet development environment.

Remix is an in-browser IDE for Solidity smart contracts. In this guide, we will learn how to deploy a contract to a running Ethermint network through Remix and interact with it.

Connect Oraichain Account to Remix

First, follow the steps in the Metamask guide to import your Oraichain private key into Metamask. Start the Oraichain daemon and rest server.Once that is complete, go to Remix. There are some contracts in the File Explorer. Select any of these contracts. In this example, we use Counter.sol from the Foundry guide. On the left-most bar, select the Solidity Compiler and compile the contract.CommentNext, select the Deploy and Run option. Select injected provider - Metamask as the environment. This will open a metamask popup for you to confirm connecting your Metamask to Remix. Hit confirm.CommentYou should see your account show up in the left-hand panel.Comment

Deploy and Interact with the Contract

Now that your account is connected, you can deploy the contract. Press the Deploy button. A metamask pop-up will appear, asking you to confirm. Confirm the transaction. You should see a log for the deployment transaction in the oraichain logslogs.

  1. Interact with Contract:

    • The deployed contract will be visible under Deployed Contracts in Remix.

      • Use the Remix interface to interact. For Counter.sol, click deploy. Confirm the transaction in Metamask.

      • Retrieve the counter value by clicking getCounter; it should return 1.

Last updated

Was this helpful?