shouldMonitor(new WalletAddress(['chain_type' => 'TRON']))) { $this->info('Tokenview not configured or no supported chains — nothing to sync.'); return self::SUCCESS; } $limit = (int) $this->option('limit'); $addresses = WalletAddress::query() ->where('monitor', 1) ->orderByDesc('updated_at') ->limit($limit) ->get(); if ($addresses->isEmpty()) { $this->info('no monitor=1 addresses to sync.'); return self::SUCCESS; } $ok = 0; $fail = 0; foreach ($addresses as $addr) { if (! $svc->shouldMonitor($addr)) { continue; } try { if ($svc->syncMonitor($addr)) { $ok++; } else { $fail++; } } catch (\Throwable $e) { $this->warn(" failed: {$addr->address} ({$addr->chain_type}): {$e->getMessage()}"); $fail++; } } $this->info("synced: ok={$ok} fail={$fail} total=".count($addresses)); return self::SUCCESS; } }