Popular Guide • 15.2k views

Deploy Smart Contract on Tetreum

Complete guide to deploying smart contracts on the Tetreum POA testnet using Remix IDE.

What You'll Learn
  • Configure Remix IDE for Tetreum deployment
  • Understand gas costs on Tetreum POA network
  • Deploy and verify your contract
  • Interact with deployed contracts
Prerequisites
  • MetaMask connected to Tetreum testnet
  • Test TET tokens in your wallet
  • Basic understanding of Solidity
1
Open Remix IDE

Start by opening Remix IDE in your browser:

2
Create Your Contract

Create a new file and write your smart contract:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract TetreumDemo {
    string public message;
    address public owner;
    uint256 public deployTime;
    
    event MessageUpdated(string newMessage, address updatedBy);
    
    constructor(string memory _initialMessage) {
        message = _initialMessage;
        owner = msg.sender;
        deployTime = block.timestamp;
    }
    
    function updateMessage(string memory _newMessage) public {
        message = _newMessage;
        emit MessageUpdated(_newMessage, msg.sender);
    }
    
    function getContractInfo() public view returns (
        string memory _message,
        address _owner,
        uint256 _deployTime
    ) {
        return (message, owner, deployTime);
    }
}
3
Compile Contract
  1. Go to the "Solidity Compiler" tab
  2. Select compiler version 0.8.0 or higher
  3. Click "Compile TetreumDemo.sol"
  4. Ensure compilation is successful with no errors
4
Configure Deployment

Set up deployment configuration:

  1. Go to "Deploy & Run Transactions" tab
  2. Set Environment to "Injected Provider - MetaMask"
  3. Ensure MetaMask is connected to Tetreum testnet
  4. Select your contract from the dropdown
  5. Enter constructor parameters if needed

Tetreum Network Details:

Network: Tetreum Testnet

Chain ID: 793788

Gas Token: TET

Block Time: ~40 seconds

5
Deploy Contract
  1. Click the "Deploy" button
  2. Confirm the transaction in MetaMask
  3. Wait for deployment confirmation (~3-10 seconds on POA)
  4. Copy the contract address from Remix

Low Gas Costs on Tetreum POA:

Tetreum uses Proof of Authority consensus, resulting in predictable and low gas costs. Contract deployment typically costs less than 0.001 TET.

6
Verify Contract

Verify your contract for transparency:

  1. Go to Tetreum Explorer
  2. Search for your contract address
  3. Click "Verify & Publish" on the contract page
  4. Upload your source code and compilation settings
Common Issues

MetaMask not connecting:

Ensure Tetreum testnet is added to MetaMask with correct RPC URL and Chain ID.

Insufficient gas:

Get test TET tokens from the faucet before deploying.

Compilation errors:

Check Solidity version compatibility and syntax errors.

Contract Deployed Successfully!

Your smart contract is now live on Tetreum testnet. Explore these next steps: