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, "!"));
}
}
-
To compile your contract, select the tab and click Compile.
-
To deploy to your SKALE Chain, select the tab on the left shown by the yellow arrow.
-
Select
. -
With MetaMask, select
-
Enter your SKALE Chain endpoint
-
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.
-
-
Click Deploy.