feat: bnb
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Services\Chain\BscDriver;
|
||||
use App\Services\Chain\EthDriver;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
@@ -39,8 +40,9 @@ class EthDriverTest extends TestCase
|
||||
'coruna.eth.rpc_url' => 'https://ethereum.example',
|
||||
'coruna.eth.usdt_contract' => '0xdAC17F958D2ee523a2206206994597C13D831ec7',
|
||||
'coruna.eth.usdt_decimals' => 6,
|
||||
'coruna.eth.bnb_contract' => '0xB8c77482e45F1F44dE1745F52C74426C631bDD52',
|
||||
'coruna.eth.bnb_decimals' => 18,
|
||||
'coruna.bsc.rpc_url' => 'https://ethereum.example',
|
||||
'coruna.bsc.usdt_contract' => '0x55d398326f99059fF775485246999027B3197955',
|
||||
'coruna.bsc.usdt_decimals' => 18,
|
||||
]);
|
||||
|
||||
Http::fake(function ($request) {
|
||||
@@ -54,6 +56,7 @@ class EthDriverTest extends TestCase
|
||||
$addr = '0x9858EfFD232B4033E47d90003D41EC34EcaEda94';
|
||||
|
||||
$this->assertSame('100', $driver->getTokenBalance($addr, (string) config('coruna.eth.usdt_contract')));
|
||||
$this->assertSame('1', $driver->getTokenBalance($addr, (string) config('coruna.eth.bnb_contract')));
|
||||
$bsc = new BscDriver;
|
||||
$this->assertSame('1', $bsc->getTokenBalance($addr, (string) config('coruna.bsc.usdt_contract')));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user