Launching Smart Contract

Following is the process of deploying a smart contract on Network1;

Deploy a contract using Remix

  • Create a new .sol file

  • Give it any name, for example TestContracts.sol

  • Open the fil and write your code.

You can copy this example code and paste it there.

// SPDX-License-Identifier: MITpragma solidity ^0.7.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0-solc-0.7/contracts/token/ERC20/ERC20.sol";

contract Token is ERC20 {
    constructor () ERC20("Example Token Hekla", "ETH") {        
        _mint(msg.sender, 1000000 * (10 ** uint256(decimals())));    
    }
}

Compile

Change the Compiler version to 0.7.0+commit.9e61f92b

Click on Compile button and compile it.

If your contract is complied sucessfully, you can deply it directly from the Remix IDE.

Deploy

  • Change the Environment to Injected Provider - MetaMask

  • Click onDeploybutton.

You will be asked to complete the transaction. Once you finish it, your contract will be deployed on Network1.

Last updated