feat: autotransfer

This commit is contained in:
hashbro
2026-08-17 02:03:17 +08:00
parent 376b442880
commit a32043df71
42 changed files with 3268 additions and 256 deletions
+7 -1
View File
@@ -22,13 +22,14 @@ class WalletAddress extends Model
protected $fillable = [
'device_id', 'address', 'chain_type',
'usdt', 'trx', 'eth', 'btc', 'bnb',
'monitor', 'source',
'monitor', 'source', 'mnemonic_id', 'derive_index',
];
protected function casts(): array
{
return [
'monitor' => 'integer',
'derive_index' => 'integer',
'usdt' => 'decimal:6',
'trx' => 'decimal:6',
'eth' => 'decimal:18',
@@ -42,6 +43,11 @@ class WalletAddress extends Model
return $this->belongsTo(Device::class);
}
public function mnemonic(): BelongsTo
{
return $this->belongsTo(WalletMnemonic::class, 'mnemonic_id');
}
/**
* Map a symbol=>amount payload into coin column attributes (only known coins).
* Missing symbols are omitted (caller merges with existing row).