<?php

use App\Application\Services\Treasury\TreasuryWalletService;
use App\Jobs\SyncTreasuryDepositBalancesJob;
use Illuminate\Contracts\Console\Kernel;

require __DIR__.'/../../vendor/autoload.php';

$app = require __DIR__.'/../../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();

$environment = $argv[1] ?? config('gateway.environment');
(new SyncTreasuryDepositBalancesJob($environment))->handle(app(TreasuryWalletService::class));

echo "Treasury deposit balances synced for {$environment}\n";
