Working on Whitelists and Gas Fees

in Actifit14 days ago

Originally, the script was built to watch Hive Engine transfers for USDT and trigger Polygon payouts.
It worked — but it needed refinement. We wanted more control, more security, and better reliability.

So we rebuilt it from the ground up with:

  • Whitelisted sender verification (only trusted accounts trigger the bridge)
  • Verbose transaction reporting (full trace of every memo, block, and sender)
  • Persistent block tracking (resumes from where it left off after reboot)
  • Clean JSONL storage for all new transactions

Here’s what it looks like in action:

[MONITOR] Starting SWAP.USDT monitor for account: peakecoin.matic
[MONITOR] Whitelisted senders: peakecoin
[MONITOR] Poll #1: Checking for new SWAP.USDT transfers...
[MONITOR] APPROVED: Transaction from whitelisted sender 'peakecoin'
[MONITOR] Saved 1 new SWAP.USDT transaction.

🧩 Whitelist Security

Every transaction coming through the bridge must be from an approved Hive account.
This ensures that no random transfer triggers the Polygon side.

If someone unverified tries, you’ll see:

[MONITOR] REJECTED: Transaction from non-whitelisted sender 'unknown_user'

That’s peace of mind for developers — and accountability for every movement of digital dollars.


🧠 Persistence and Recovery

To make it bulletproof, we introduced a state file system that remembers the last processed block:

STATE_FILE = "usdt_state.json"

That means if the monitor restarts or the server reboots, it doesn’t reprocess old transactions.
Instead, it picks up right where it left off, continuing the bridge operation seamlessly.

No duplication. No confusion. Just smooth continuity.


🧾 Transparent Debugging

Each cycle now logs:

  • The latest Hive Engine poll
  • The top three most recent transactions
  • All sender, amount, memo, and block data
  • A detailed report of new approvals or rejections

And when verbose mode is on, every action is timestamped — down to the second.

2025-10-10 18:02:41 [MONITOR-DEBUG] Reading from Hive Engine...
2025-10-10 18:02:41 [MONITOR-DEBUG] Found 1 new SWAP.USDT transfer from peakecoin

It’s the kind of clarity that helps debug real blockchain workflows in real time.


🌉 What We’ve Built So Far

This isn’t just a watcher anymore — it’s the foundation of a self-sustaining cross-chain payment gateway.
It does three critical things every few seconds:

  1. Monitors Hive Engine for valid SWAP.USDT transfers
  2. Filters and logs only trusted, whitelisted accounts
  3. Hands off the confirmed transaction data for Polygon execution

From here, it will eventually connect with the Polygon-side swap script, completing the cycle — Hive deposit in, Polygon payout out.

This report was published via Actifit app (Android | iOS). Check out the original version here on actifit.io


09/10/2025
10357
Daily Activity

Sort:  
Loading...