mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
CW-1273: Implement USDT0 Bridge (#2855)
* feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu. * Add transaction history and status polling for USDT0 bridging * Add Transaction history and status polling for USDT0 Bridging * USDT0 Bridging Implementation * Update Arbitrum USDT token symbol * fix: Merge conflicts * fix: Merge conflicts * chore: Rever formatting * feat: Implement new flow * feat: Implement new ui flow * Add currency to configure * feat: new ui flow * Update USDT0 implementation - Switch to sqlite for storage instead of hive - Switch bridge history and details to modals - Switch bridge transfer details page to new tx details ui * refactor: rearrange modal action buttons * enhance usdt0 bridge flows * Update lib/entities/wallet_manager.dart [skip ci] --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
co-authored by
Omar Hatem
parent
162e0a5300
commit
586a040e4a
+34
-1
@@ -1392,7 +1392,13 @@ import 'package:cw_evm/evm_chain_wallet_creation_credentials.dart';
|
||||
import 'package:cw_evm/utils/evm_chain_utils.dart';
|
||||
import 'package:cw_evm/evm_chain_default_tokens.dart';
|
||||
import 'package:cw_evm/deuro/deuro_savings.dart';
|
||||
import 'package:cw_evm/usdt0/usdt0_config.dart';
|
||||
import 'package:cw_evm/usdt0/usdt0_quote.dart';
|
||||
import 'package:cw_evm/usdt0/usdt0_service.dart';
|
||||
import 'package:eth_sig_util/util/utils.dart';
|
||||
export 'package:cw_evm/evm_chain_transaction_priority.dart';
|
||||
export 'package:cw_evm/evm_erc20_balance.dart';
|
||||
export 'package:cw_evm/usdt0/usdt0_quote.dart';
|
||||
|
||||
""";
|
||||
const evmCwPart = "part 'cw_evm.dart';";
|
||||
@@ -1546,19 +1552,44 @@ abstract class EVM {
|
||||
WalletType? getWalletTypeByChainId(int chainId);
|
||||
String getChainNameByChainId(int chainId);
|
||||
String getTokenNameByChainId(int chainId);
|
||||
|
||||
// Chain selection methods
|
||||
List<ChainInfo> getAllChains();
|
||||
ChainInfo? getCurrentChain(WalletBase wallet);
|
||||
ChainInfo? getChainInfoByChainId(int chainId);
|
||||
|
||||
|
||||
int? getSelectedChainId(WalletBase wallet);
|
||||
Future<void> selectChain(WalletBase wallet, int chainId, {required Node node});
|
||||
|
||||
String? getExplorerUrlForChainId(int chainId, {bool showProtocol = true});
|
||||
|
||||
Future<bool?> getTransactionReceipt(WalletBase wallet, String txHash);
|
||||
|
||||
bool hasPriorityFee(int chainId);
|
||||
|
||||
bool isUSDT0Token(WalletBase wallet, CryptoCurrency token);
|
||||
List<ChainInfo> getUSDT0DestinationChains(WalletBase wallet);
|
||||
|
||||
Future<USDT0Quote> quoteUSDT0Transfer({
|
||||
required WalletBase wallet,
|
||||
required int sourceChainId,
|
||||
required int destinationChainId,
|
||||
required BigInt amount,
|
||||
required String recipientAddress,
|
||||
});
|
||||
|
||||
Future<PendingTransaction> executeUSDT0Transfer({
|
||||
required WalletBase wallet,
|
||||
required CryptoCurrency token,
|
||||
required int sourceChainId,
|
||||
required int destinationChainId,
|
||||
required BigInt amount,
|
||||
required String recipientAddress,
|
||||
required USDT0Quote quote,
|
||||
required TransactionPriority priority,
|
||||
bool useBlinkProtection = true,
|
||||
});
|
||||
|
||||
Future<EvmWalletConnectFeeQuote?> getWCBufferedFeeQuote(
|
||||
WalletBase wallet,
|
||||
TransactionPriority priority,
|
||||
@@ -1572,11 +1603,13 @@ class ChainInfo {
|
||||
required this.chainId,
|
||||
required this.name,
|
||||
required this.shortCode,
|
||||
required this.currency,
|
||||
});
|
||||
|
||||
final int chainId;
|
||||
final String name;
|
||||
final String shortCode;
|
||||
final CryptoCurrency currency;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
|
||||
Reference in New Issue
Block a user