Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EarnLab — Trust-minimized task payouts on QIE

Live App Tests Chain

Post a task. Lock the reward. Receive work. Release payout on-chain.

What it does

Sponsors lock native QIE into an escrow contract when posting a task. Builders submit an artifact URL on-chain. When the sponsor approves one submission, QIE releases to the builder automatically — no backend, no admin, no demo mode.

Why this matters for QIE

QIE has a growing builder ecosystem but no minimal native primitive for trust-minimized work payouts. EarnLab is that primitive: one contract, two routes, real on-chain settlement.

Live demo

  1. Open the deployed URL (see Deploy below)
  2. Connect MetaMask → QIE Testnet (chain ID 1983)
  3. Get testnet QIE: https://www.qie.digital/faucet
  4. Post a bounty for 0.01 QIE
  5. Switch wallet → submit work → approve → verify payout on explorer

On-chain proof (QIE Testnet):

Step Link
Deploy tx https://testnet.qie.digital/tx/0x4ac3bd889867855d2ef5437295cef82691c3b2f26793008d7ebd7c56c829c433
Contract https://testnet.qie.digital/address/0x8aC72a4B26e973FCdD7dAadd960Ae0eC635b4197
createBounty run live flow
submitWork run live flow
approveSubmission run live flow

Deployer (sponsor demo wallet): 0xFB76C4B6912bCF358752Fb4b4b15B959EfaDD915

Architecture

flowchart LR
  Sponsor --> MetaMask
  Builder --> MetaMask
  MetaMask --> wagmi
  wagmi --> EarnLabEscrow
  EarnLabEscrow --> QIE[Testnet QIE]
Loading

What's NOT in v1

  • Refunds, cancellation, disputes
  • AI agents, credentials, indexer
  • IPFS, backend CMS, multi-token
  • Owner/admin on the contract

Tech

  • Contract: Solidity 0.8.24, Foundry, custom ReentrancyGuard (no owner)
  • Frontend: Next.js, TypeScript, wagmi, viem, Tailwind
  • 21 Foundry tests — reentrancy, balance assertions, revert paths
  • All state from contract reads — no mock data

Roadmap

  1. Refunds for unclaimed bounties
  2. On-chain credentials for completed work
  3. Agent-eligible bounty rules

QIE Testnet

Field Value
Chain ID 1983
RPC https://rpc1testnet.qie.digital/
Explorer https://testnet.qie.digital/
Faucet https://www.qie.digital/faucet

Structure

submission/
  contracts/   Foundry — EarnLabEscrow.sol
  web/         Next.js + wagmi + viem
  scripts/     deploy-anvil.sh, deploy-testnet.sh, audit-local.sh

Phase A — Local Anvil (run audit here first)

# Terminal 1
anvil --chain-id 1983 --host 0.0.0.0

# Terminal 2
bash submission/scripts/deploy-anvil.sh
cd submission/web && npm run dev -- -p 3001

WSL + Windows MetaMask: use WSL IP for RPC, not 127.0.0.1:

http://<run: hostname -I | awk '{print $1}'>:8545

MetaMask manual network:

Field Value
Name QIE Local
RPC http://172.21.153.253:8545 (your WSL IP may differ)
Chain ID 1983
Symbol QIE

Anvil accounts

Role Private key
Sponsor 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
Builder 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78627d

Self-audit

bash submission/scripts/audit-local.sh

Then run the 11-step flow on http://localhost:3001.

Phase B — QIE Testnet

export QIE_RPC_URL=https://rpc1testnet.qie.digital/
export DEPLOYER_PRIVATE_KEY=0x...   # testnet-only wallet

bash submission/scripts/deploy-testnet.sh

Set NEXT_PUBLIC_* in web/.env.local and Vercel, then:

cd web && vercel --prod

Env vars

Variable Testnet
NEXT_PUBLIC_ESCROW_ADDRESS Deployed contract
NEXT_PUBLIC_CHAIN_ID 1983
NEXT_PUBLIC_RPC_URL https://rpc1testnet.qie.digital/
NEXT_PUBLIC_EXPLORER_URL https://testnet.qie.digital/

Tests

cd contracts && forge test -vvv

Submission checklist

  • Anvil audit 11/11 pass
  • Testnet deploy + verify on explorer
  • Vercel prod URL live
  • 90s demo video (YouTube unlisted)
  • Three tx hashes in README
  • Submit at https://hackathon.qie.digital/submit

About

Real QIE-native escrow: sponsor posts bounty → builder submits → sponsor approves → QIE releases on-chain.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages