<?php

namespace Database\Seeders;

use App\Models\Asset;
use Illuminate\Database\Seeder;

final class AssetSeeder extends Seeder
{
    public function run(): void
    {
        Asset::updateOrCreate(
            ['code' => 'USDTTRC20', 'network' => 'tron'],
            [
                'name' => 'Tether USD',
                'contract_address' => env('TRON_USDT_CONTRACT_ADDRESS', 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t'),
                'decimals' => 6,
                'min_amount_atomic' => '1000000',
                'confirmation_policy' => [
                    'mode' => 'provider_finality_plus_blocks',
                    'minimum_confirmations' => 1,
                    'recheck_seconds' => 10,
                    'maximum_confirming_minutes' => 60,
                ],
                'enabled' => true,
            ]
        );
    }
}
