Remix IDE

Developers can also use the Remix IDE as a developer environment for SKALE Chains. With Remix, you can choose an environment to work from: either compiling your contracts using a sandbox blockchain in your browser (JavaScript VM), or using Injected Web3 that hands off the interface to a provider such as MetaMask, that in turn connects to your SKALE Chain endpoint.

For detailed documentation on Remix, see here: https://remix-ide.readthedocs.io/en/latest/#

To get started with Remix, follow the live sandbox below:

Live Remix Sandbox

Click this link to load the following Hello World contract into the Remix IDE:

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.16 <0.9.0;

/**
 * Please refer to the following SKALE Network Getting Started Guide:
 * https://docs.skale.network/develop/
 */
contract HelloSKALE {
    string public storedName;

    function setName(string memory name) public {
        storedName = name;
    }

    function sayHello() public view returns (string memory) {
        return string(abi.encodePacked("Hello ", storedName, "!"));
    }
}
  1. To compile your contract, select the Solidity compiler tab and click Compile.

  2. To deploy to your SKALE Chain, select the Deploy & Run Transactions tab on the left shown by the yellow arrow.

    111384112 82e5d100 867f 11eb 8689 6538177b4cf1
    1. Select ENVIRONMENT  Injected Web3.

    2. With MetaMask, select Network  Custom RPC

    3. Enter your SKALE Chain endpoint

    4. Enter your ChainID.

      Your account field in Remix should populate after Remix connects through MetaMask to your SKALE Chain.

      Be sure to use the SKALE Chain owner account and have sFUEL to deploy your contracts, unless you’ve set up additional deployer addresses.
      111390822 c5aca680 8689 11eb 84a7 c86d35161e38
  3. Click Deploy.