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 IDEStart by opening Remix IDE in your browser:
2
Create Your ContractCreate 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- Go to the "Solidity Compiler" tab
- Select compiler version 0.8.0 or higher
- Click "Compile TetreumDemo.sol"
- Ensure compilation is successful with no errors
4
Configure DeploymentSet up deployment configuration:
- Go to "Deploy & Run Transactions" tab
- Set Environment to "Injected Provider - MetaMask"
- Ensure MetaMask is connected to Tetreum testnet
- Select your contract from the dropdown
- Enter constructor parameters if needed
Tetreum Network Details:
Network: Tetreum Testnet
Chain ID: 793788
Gas Token: TET
Block Time: ~40 seconds
5
Deploy Contract- Click the "Deploy" button
- Confirm the transaction in MetaMask
- Wait for deployment confirmation (~3-10 seconds on POA)
- 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 ContractVerify your contract for transparency:
- Go to Tetreum Explorer
- Search for your contract address
- Click "Verify & Publish" on the contract page
- 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: