Remix
Remix IDE is a browser-based development environment that requires no setup. It's perfect for quick prototyping, learning, and deploying simple contracts to LitVM.
Prerequisites
A modern web browser (Chrome, Firefox, Brave)
MetaMask or another Web3 wallet installed
Testnet zkLTC in your wallet (see Add to Your Wallet)
Access Remix
Open Remix
Open remix.ethereum.org in your browser
You'll see the Remix IDE with a default workspace
Create Your Contract
Create a New File
In the File Explorer panel (left sidebar), click the 📄 icon to create a new file
Name it Counter.sol
Write the Contract
Paste this code into Counter.sol:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract Counter {
uint256 public count;
event CountChanged(uint256 new Count);
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);
}
functiongetCount() publicviewreturns(uint256){
returncount;
}
}
Compile the Contract
Open Compiler
Click the Solidity Compiler icon in the left sidebar (looks like "S")
Configure Compiler
Compiler Version : Select 0.8.19 (or match your pragma)
EVM Version : Leave as default or select shanghai
Enable Auto compile for convenience
Compile
Click Compile Counter.sol
A green checkmark appears when successful
You'll see "Counter" in the CONTRACT dropdown
Connect to LitVM
Configure MetaMask
Ensure LitVM Testnet is added to your wallet:
Setting
Value
Network Name
LitVM Testnet
RPC URL
⚠️ ⚠️ TBA — This value will be published closer to launch — This value will be published closer to launch
Chain ID
⚠️ ⚠️ TBA — This value will be published closer to launch — This value will be published closer to launch
Currency Symbol
zkLTC
Select Network in Remix
Click the Deploy & Run icon in the left sidebar (arrow icon)
In the ENVIRONMENT dropdown, select Injected Provider - MetaMask
MetaMask will popup—select LitVM Testnet and connect
Verify Connection
You should see your wallet address under ACCOUNT
Your zkLTC balance will be displayed
The network should show the LitVM Chain ID
Deploy the Contract
Configure Deployment
In the CONTRACT dropdown, select Counter
In the field next to Deploy, enter the initial count (e.g., 0)
Deploy
Click Deploy
MetaMask will popup with the transaction
Review gas fees (paid in zkLTC)
Click Confirm
Wait for Confirmation
Watch the Remix terminal for deployment status
Once confirmed, your contract appears under Deployed Contracts
Interact with Your Contract
Read Functions (Free)
Under Deployed Contracts, expand your contract to see available functions:
count : Click to read the current count value
getCount : Alternative read function
Write Functions (Costs Gas)
increment : Click to add 1 to the count
decrement : Click to subtract 1 from the count
Each write function triggers a MetaMask transaction popup.
Example Interaction
Click "count" → Shows: 0
Click "increment" → Confirm in MetaMask
Click "count" → Shows: 1
Click "increment" → Confirm in MetaMask
Click "count" → Shows: 2
View on Block Explorer
After deploying, copy the contract address from Deployed Contracts
Visit LitVM Explorer (Coming Soon)
Paste your contract address in the search bar
View transactions, events, and contract code
Verify Your Contract
Open Verification Plugin
In Remix, go to Plugin Manager (plug icon in left sidebar)
Search for "Contract Verification"
Click Activate
Verify
Open the verification plugin
Select LitVM Testnet as the chain
Enter your contract address
Select the contract file and compiler version
Enter constructor arguments (e.g., 0)
Click Verify
Deploy an ERC-20 Token
Install OpenZeppelin
In Remix, go to Plugin Manager
Search for and activate DGIT or Remixd for GitHub imports
Create Token Contract
Create MyToken.sol:
Compile and Deploy
Compile with Solidity 0.8.19
Deploy with initial supply (e.g., 1000000 for 1M tokens)
Your wallet will receive all tokens
Tips for Using Remix
Save Your Work
Remix stores files in browser storage
For important work, use GitHub integration or download files
Use Workspaces
Create separate workspaces for different projects
Click the hamburger menu in File Explorer → Create Workspace
Debug Transactions
Go to Debugger plugin
Enter a transaction hash
Step through execution to find issues
Gas Estimation
Before deploying, Remix shows estimated gas
Ensure you have enough zkLTC
Common Issues
Deploy to Mainnet
When LitVM mainnet launches:
Switch MetaMask to LitVM Mainnet
Ensure you have mainnet zkLTC
Follow the same deployment process
Be extra careful—mainnet deployments are permanent!
Next Steps
Try deploying an NFT contract
Learn Foundry for local development
Set up Hardhat for larger projects
Explore verified contracts on LitVM Explorer
Resources
OpenZeppelin Wizard - Generate token contracts
Last updated