Skip to content

Commit

Permalink
app, dapp: Add Coinbase Base.
Browse files Browse the repository at this point in the history
  • Loading branch information
patniemeyer committed Jul 25, 2024
1 parent d95f0b5 commit 2871178
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
15 changes: 14 additions & 1 deletion gui-orchid/lib/api/orchid_eth/chains.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class Chains {
blocktime: 0.5,
);

// RSK (BTC)
// RSK (BTC)
static const int RSK_CHAINID = 30;
static Chain RSK = Chain(
chainId: RSK_CHAINID,
Expand All @@ -223,6 +223,18 @@ class Chains {
blocktime: 5,
);

// Coinbase Base (BASE_ETH)
static const int BASE_CHAINID = 8453;
static Chain Base = Chain(
chainId: BASE_CHAINID,
name: 'Base',
nativeCurrency: Tokens.BASE_ETH,
defaultProviderUrl: 'https://mainnet.base.org',
iconPath: OrchidAssetSvgChain.unknown_chain_path,
explorerUrl: 'https://basescan.org',
blocktime: 0,
);

static Map<int, Chain> _map = [
Aurora,
Avalanche,
Expand All @@ -234,6 +246,7 @@ class Chains {
Gnosis,
Optimism,
Polygon,
Base,
// ArbitrumOne,
// RSK,
// Telos,
Expand Down
11 changes: 9 additions & 2 deletions gui-orchid/lib/api/orchid_eth/tokens.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import 'token_type.dart';
export 'tokens_legacy.dart';

class Tokens {

static const ETHPriceSource = const UniswapETHPriceSource(
// USDC / ETH 0.3%
dollarTokenVsETHPoolAddress: USDCVsETHPoolAddress,
Expand Down Expand Up @@ -146,6 +145,14 @@ class Tokens {
iconPath: OrchidAssetSvgToken.celo_token_path,
);

static const TokenType BASE_ETH = TokenType(
symbol: 'ETH',
// BASE ETH is ETH on L2
exchangeRateSource: ETHPriceSource,
chainId: Chains.BASE_CHAINID,
iconPath: OrchidAssetSvgToken.ethereum_eth_token_path,
);

static const USDCVsETHPoolAddress =
'0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8';
static const USDC_DECIMALS = 6;
Expand All @@ -171,9 +178,9 @@ class Tokens {
AURORA_ETH,
FTM,
CELO,
BASE_ETH,
// ARBITRUM_ETH,
// RBTC,
// TLOS,
];
}

0 comments on commit 2871178

Please sign in to comment.