Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

LitVM-smart-contract

image

requirements

  • zkLTC faucet: get here, connect wallet, click on faucet and select zkLTC
  • liteforge network, add here

step 1: set up remix environment

  • visit remix
  • sign in with your github
  • create a new workspace (blank template)
  • go to contracts and create a new file
  • name it counter.sol

step 2: code, compile and deploy

  • paste this code
      //SPDX-LICENSE-IDENTIFIER:MIT
    pragma solidity ^0.8.19;
    
    contract Counter {
        uint256 public count;
    
        event CountChanged(uint256 newCount);
    
        constructor(uint256 _initialCount) {
            count = _initialCount;
        }
    
        function increment() public {
            count += 1;
            emit CountChanged(count);
        }
    
        function decrement() public {
            require(count > 0, "Count cannot go below zero");
            count -= 1;
            emit CountChanged(count);
        }
    
        function getCount() public view returns (uint256) {
            return count;
        }
    }
1

b. go to compile

  • click on compile
2

c. deploy

  • go to deploy
  • on environment, change from remix vm to browser extension then select your evm wallet
  • manually switch to liteforge network
3

Deploying

  • enter any numerical value in the box and deploy
  • sign transaction
4

you have created your smart contract on Liteforge testnet network

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors