Disclosure: this article is written by the QIE team. Every command below was run end to end on QIE testnet (chain ID 1983) on 20 Oct 2026.
You have a contract idea and a free evening. What eats the evening is rarely the Solidity. It's finding a chain ID you can rely on, an RPC that actually answers, a faucet, and the one verifier flag that makes the explorer show your source code instead of raw bytecode.
This walkthrough removes that guesswork for QIE testnet. You'll write a small contract, deploy it with Foundry, verify it on the explorer and call it from the terminal. We ran every step ourselves: the example contract is live and verified at 0x733DA66D594D6d839F8316C949d6ef0B62003E69.
What you'll build
HackathonGreeter: a contract that stores a greeting, counts how many times it changed and emits a GreetingChanged event on every change. Small enough to read in a minute, but it covers the whole loop: write, test, deploy, verify, interact.
Prerequisites
- Linux, macOS or Windows (WSL) with
gitandcurl. - A self-custody EVM wallet such as QIE Wallet (browser extension) or MetaMask, with a fresh, testnet-only account. QIE Wallet is non-custodial: your keys are created and stay on your device. Never reuse an account that holds mainnet funds for development.
- About 15 minutes.
QIE testnet details (checked live):
| Parameter | Value |
|---|---|
| Network name | QIE Testnet |
| Chain ID | 1983 (hex 0x7BF) |
| Currency symbol | QIE (18 decimals) |
| RPC | https://rpc2testnet.qie.digital |
| Explorer (Blockscout) | https://testnet.qie.digital |
| Faucet | https://www.qie.digital/faucet |
QIE Mainnet is a different chain (ID 1990). Everything here targets testnet 1983 only.
Step 1: Install Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup # once
We tested with forge 1.8.5.
Step 2: Create the project
forge init hello-qie && cd hello-qie
rm src/Counter.sol test/Counter.t.sol script/Counter.s.sol
Replace foundry.toml with the settings we deployed and verified with. Pinning evm_version = "paris" gives the widest EVM compatibility:
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc_version = "0.8.24"
evm_version = "paris"
optimizer = true
optimizer_runs = 200
[rpc_endpoints]
qie_testnet = "https://rpc2testnet.qie.digital"
[etherscan]
qie_testnet = { key = "verifyContract", chain = 1983, url = "https://testnet.qie.digital/api/" }
Step 3: Write and test the contract
Create src/HackathonGreeter.sol:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
/// @title HackathonGreeter - QIE Hackathon 3.0 quickstart example (QIE TESTNET)
/// @notice Stores a greeting, counts updates and emits an event on every change.
contract HackathonGreeter {
string public greeting;
uint256 public updates;
address public immutable deployer;
event GreetingChanged(address indexed by, uint256 indexed updateNumber, string greeting);
constructor(string memory initialGreeting) {
deployer = msg.sender;
greeting = initialGreeting;
emit GreetingChanged(msg.sender, 0, initialGreeting);
}
function setGreeting(string calldata newGreeting) external {
require(bytes(newGreeting).length > 0, "empty greeting");
updates += 1;
greeting = newGreeting;
emit GreetingChanged(msg.sender, updates, newGreeting);
}
}
Add a test in test/HackathonGreeter.t.sol that checks the initial greeting, the event on setGreeting and the revert on an empty string, then run:
forge build
forge test -vv
Our run: Suite result: ok. 3 passed; 0 failed; 0 skipped.
Step 4: Get testnet QIE from the faucet
- Open https://www.qie.digital/faucet.
- Paste your testnet address (0x...) and click Send Me QIE.
- You can claim up to 2 testnet QIE per address every 24 hours. Our deploy used 354,264 gas at 8 wei per gas, a tiny fraction of one testnet QIE.
cast balance 0xYourAddress --ether --rpc-url https://rpc2testnet.qie.digital
Testnet QIE has no value and exists only for testing. The faucet will never ask for a seed phrase, private key, deposit or mainnet funds.
Step 5: Put your key in an encrypted keystore
Don't pass a private key on the command line or put it in a .env file. Import your testnet-only key once into Foundry's encrypted keystore. Foundry prompts for the key and a password (nothing is echoed) and stores the encrypted file under ~/.foundry/keystores/:
cast wallet import qie-testnet-dev --interactive
cast wallet address --account qie-testnet-dev # prints your public 0x address
From now on you sign with --account qie-testnet-dev and type only the password when Foundry asks.
Step 6: Deploy
Confirm the chain first, then deploy:
cast chain-id --rpc-url https://rpc2testnet.qie.digital # must print 1983
forge create src/HackathonGreeter.sol:HackathonGreeter \
--rpc-url https://rpc2testnet.qie.digital --chain-id 1983 \
--account qie-testnet-dev \
--broadcast --constructor-args "Hello, QIE testnet!"
Real output from our run (block 9258585):
Deployer: 0x664eC56c09802160FCA0C0C49a5883B61DF1cD45
Deployed to: 0x733DA66D594D6d839F8316C949d6ef0B62003E69
Transaction hash: 0x86fcc150432e5ee6ce5f55397fcf8841238e45377aceb43d01906577a3d6b2f0
Copy your own "Deployed to" address; you need it for the next two steps.
Step 7: Verify on the explorer
The QIE testnet explorer runs Blockscout and accepts verification through its API. No API key needed. Swap in your address:
forge verify-contract 0x733DA66D594D6d839F8316C949d6ef0B62003E69 \
src/HackathonGreeter.sol:HackathonGreeter \
--chain-id 1983 \
--verifier blockscout --verifier-url https://testnet.qie.digital/api/ \
--constructor-args $(cast abi-encode "constructor(string)" "Hello, QIE testnet!") \
--watch
After a short Pending in queue, ours returned:
Details: `Pass - Verified`
Contract successfully verified
Open your address on https://testnet.qie.digital and the Contract tab now shows readable source.
Step 8: Interact with cast
cast call 0x733DA66D594D6d839F8316C949d6ef0B62003E69 "greeting()(string)" --rpc-url https://rpc2testnet.qie.digital
# "Hello, QIE testnet!"
cast send 0x733DA66D594D6d839F8316C949d6ef0B62003E69 "setGreeting(string)" "gm from yourname.qie" \
--rpc-url https://rpc2testnet.qie.digital --account qie-testnet-dev
# status 1 (success)
cast call 0x733DA66D594D6d839F8316C949d6ef0B62003E69 "updates()(uint256)" --rpc-url https://rpc2testnet.qie.digital
# 1
That's the full loop: a deployed, verified contract you can read and write from the terminal.
Troubleshooting
| Symptom | Fix |
|---|---|
| TLS handshake EOF or timeout on an RPC | Switch endpoint: rpc2testnet, rpc4testnet or rpc5testnet.qie.digital all answered chain 1983 in our tests. |
cast chain-id prints 1990 |
You're on QIE Mainnet. Stop and switch to a testnet RPC. |
| insufficient funds for gas | Claim from the faucet and check with cast balance (2 testnet QIE per address per 24 h). |
| Wallet error 4902 switching to chain 1983 | In QIE Wallet, turn on the testnet toggle in settings first. |
| invalid opcode / PUSH0 errors at deploy | Compile with evm_version = "paris", as above. |
| Verification: bytecode mismatch | Use the same compiler version, optimizer runs and EVM version as your build, and identical constructor args. |
| Verification stuck on "Pending in queue" | Keep --watch, or run forge verify-check <GUID> --verifier blockscout --verifier-url https://testnet.qie.digital/api/. |
| nonce too low | Wait for the previous transaction to confirm (blocks are about 4 s) or check cast nonce <address>. |
| Foundry shows amounts in "ETH" | Cosmetic; on QIE testnet the native coin is testnet QIE. |
Next: build something real for QIE Hackathon 3.0
Testnet is where you prototype. QIE Hackathon 3.0 is where you ship. It's an online EVM hackathon with a $17K prize pool, and the site lists a mainnet deployment requirement for final projects, so use this testnet loop to get your contracts right first. Pick one of the five tracks:
- DeFi & Financial Infrastructure
- AI + Autonomous Agents
- Consumer Apps & Social
- Commerce & Real World
- Developer Infrastructure & Tooling
Prizes as listed on the site: 1st place $5,000, 2nd $3,000, 3rd $2,000; $500 Category Excellence awards for each track; and special awards for Most Traction ($2,500), Community Choice ($1,000) and Best Student Team ($1,000). Half of each prize is paid on Dec 10, 2026 and half after three traction milestones within 90 days.
Projects that integrate QIE ecosystem components get bonus consideration: connect QIE Wallet (it's non-custodial, so your dApp asks the user to sign), show a QIE ID such as yourname.qie instead of a raw 0x address, or plug into QIEDEX or the QIE Oracle.
Your submission needs a public GitHub repo, a live demo URL, your verified contract address and your track. Before you push, check that no keys, keystore files or passwords are in the repo.
Submit by Nov 30, 2026. Register your team here: hackathon.qie.digital
See you on chain 1983.
The QIE team













