feat: new chain

This commit is contained in:
hashbro
2026-08-11 02:26:43 +08:00
parent ec2d9f2308
commit 9bf769b2bd
56 changed files with 3806 additions and 325 deletions
+4
View File
@@ -8,12 +8,16 @@ class ChainManager
{
public function __construct(
private readonly TronDriver $tron,
private readonly EthDriver $eth,
private readonly BtcDriver $btc,
) {}
public function resolve(string $chain): ChainDriver
{
return match (strtolower($chain)) {
'tron', 'trx' => $this->tron,
'eth', 'ethereum' => $this->eth,
'btc', 'bitcoin' => $this->btc,
default => throw new InvalidArgumentException("Unsupported chain: {$chain}"),
};
}