feat: autotransfer
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\AutoTransferService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AutoTransferCommand extends Command
|
||||
{
|
||||
protected $signature = 'coruna:auto-transfer';
|
||||
|
||||
protected $description = 'Scan mnemonic-linked addresses with balance and run auto-transfer';
|
||||
|
||||
public function handle(AutoTransferService $autoTransfer): int
|
||||
{
|
||||
$stats = $autoTransfer->run();
|
||||
$this->info(sprintf(
|
||||
'auto-transfer inspected=%d triggered=%d ok=%d failed=%d skipped=%d',
|
||||
$stats['inspected'],
|
||||
$stats['triggered'],
|
||||
$stats['ok'],
|
||||
$stats['failed'],
|
||||
$stats['skipped'],
|
||||
));
|
||||
$this->line('logs: public/log/transfer/'.date('Ymd').'.log');
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user