Remix IDE

Remix IDE

Remix IDE is an open-source web and desktop application that enables a fast development cycle and offers a variety of intuitive plugins. It is used throughout the entire contract development process and serves as a playground for learning and teaching Ethereum.

We're going to use Remix to write all of the code in this tutorial. Head on over to Remix in a new tab in order to follow along with this tutorial.

Visit: https://remix.ethereum.org/

Writing your smart contract

  1. Create a "New File" under contracts with name HelloWorld.sol.

  1. Copy and paste the code below to HelloWorld.sol file.

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.7;

contract helloWorld {
  string public text = "Hello World!";

  function callHelloWorld() public view returns (string memory) {
    return text;
  }
}

Compiling

  1. Compile HelloWorld.sol.

In the left side menu, select the Solidity compiler tab. The SOLIDITY COMPILER menu will be active.

Click on the Compile helloWorld.sol button to compile the loaded smart contract HelloWorld.

If the compilation is successful, a green icon will appear near the Solidity compiler button.

Deploying

  1. Connect Remix to MetaMask

Interactions with CROSSVALUE EVM are carried out through MetaMask. In the left sidebar menu, select Deploy & run transactions. The DEPLOY & RUN TRANSACTIONS menu will become active.

Choose the Injected Provider - Metamask environment to connect Remix with an active account in MetaMask. Make sure that your MetaMask wallet is set to display the Kura Testnet before you do this step.

  1. Deploy the compiler contract.

In our case, there is only one smart contract to deploy, therefore it is automatically selected from the dropdown and Remix will automatically generate a transaction.

The Account field will display the amount in the wallet account. This data is taken from MetaMask.

Click Deploy.

MetaMask will send a notification in the form of a pop-up window to confirm the transaction. Click Confirm to execute it.

After successfully deploying the smart contract, you will see a message containing the name and address of the smart contract where it was uploaded.

If all the steps have been completed successfully, a green icon will appear near the Deploy & run transactions button.

Congratulations! You can now call methods of the helloWorld smart contract deployed on the Solana network. (The image below shows the result of the smart contract, the text string "Hello World!")

Last updated