Skip to content

Commit e33c6e9

Browse files
Merge pull request #8440 from BitGo/CECHO-305-2
feat(statics): add Boba Network (EVM) with ERC20 token support
2 parents 70ddda3 + 6fcf5a9 commit e33c6e9

7 files changed

Lines changed: 83 additions & 0 deletions

File tree

modules/bitgo/test/v2/unit/keychains.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ describe('V2 Keychains', function () {
115115
n.asset !== UnderlyingAsset.ARCUSDC &&
116116
n.asset !== UnderlyingAsset.ZKSYNCERA &&
117117
n.asset !== UnderlyingAsset.HYPERLIQUID &&
118+
n.asset !== UnderlyingAsset.BOBAETH &&
118119
coinFamilyValues.includes(n.name)
119120
);
120121

modules/sdk-core/src/bitgo/environments.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,9 @@ const mainnetBase: EnvironmentTemplate = {
353353
h: {
354354
baseUrl: 'https://humanity-mainnet.explorer.alchemy.com/api',
355355
},
356+
boba: {
357+
baseUrl: 'https://api.routescan.io/v2/network/mainnet/evm/288/etherscan/api',
358+
},
356359
},
357360
icpNodeUrl: 'https://ic0.app',
358361
hyperLiquidNodeUrl: 'https://api.hyperliquid.xyz',
@@ -567,6 +570,9 @@ const testnetBase: EnvironmentTemplate = {
567570
h: {
568571
baseUrl: 'https://humanity-testnet.explorer.alchemy.com/api',
569572
},
573+
boba: {
574+
baseUrl: 'https://api.routescan.io/v2/network/testnet/evm/28882/etherscan/api',
575+
},
570576
},
571577
stxNodeUrl: 'https://api.testnet.hiro.so',
572578
vetNodeUrl: 'https://sync-testnet.vechain.org',

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2416,6 +2416,40 @@ export const allCoinsAndTokens = [
24162416
CoinFeature.SUPPORTS_ERC20,
24172417
]
24182418
),
2419+
account(
2420+
'd055d442-03f1-4d24-b61c-5312e480e378',
2421+
'bobaeth',
2422+
'Boba Network',
2423+
Networks.main.boba,
2424+
18,
2425+
UnderlyingAsset.BOBAETH,
2426+
BaseUnit.ETH,
2427+
[
2428+
...EVM_FEATURES,
2429+
CoinFeature.SHARED_EVM_SIGNING,
2430+
CoinFeature.SHARED_EVM_SDK,
2431+
CoinFeature.EVM_COMPATIBLE_IMS,
2432+
CoinFeature.EVM_COMPATIBLE_UI,
2433+
CoinFeature.SUPPORTS_ERC20,
2434+
]
2435+
),
2436+
account(
2437+
'8fc7c710-e64e-4743-8ce7-03bcf71d7723',
2438+
'tbobaeth',
2439+
'Boba Network Testnet',
2440+
Networks.test.boba,
2441+
18,
2442+
UnderlyingAsset.BOBAETH,
2443+
BaseUnit.ETH,
2444+
[
2445+
...EVM_FEATURES,
2446+
CoinFeature.SHARED_EVM_SIGNING,
2447+
CoinFeature.SHARED_EVM_SDK,
2448+
CoinFeature.EVM_COMPATIBLE_IMS,
2449+
CoinFeature.EVM_COMPATIBLE_UI,
2450+
CoinFeature.SUPPORTS_ERC20,
2451+
]
2452+
),
24192453

24202454
account(
24212455
'1cc2170d-c24d-4179-b0eb-155de0f46617',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export enum CoinFamily {
142142
ARCUSDC = 'arcusdc', // ARC network
143143
TEMPO = 'tempo', // Tempo Network
144144
UNIETH = 'unieth', // Unichain
145+
BOBAETH = 'bobaeth', // BOBA Network
145146
}
146147

147148
/**
@@ -2148,6 +2149,7 @@ export enum UnderlyingAsset {
21482149
ZMT = 'zmt',
21492150
ZOOM = 'zoom',
21502151
ZRO = 'zro',
2152+
BOBAETH = 'bobaeth',
21512153
'ZRO-0x320' = 'zro-0x320',
21522154
'ZRO-0xFCF' = 'zro-0xfcf',
21532155
'ZRO-0xE5C' = 'zro-0xe5c',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,22 @@ export const ofcCoins = [
487487
),
488488
ofc('aa7e956f-2d59-4bf6-aba6-2d51bd298150', 'ofcip', 'Story', 18, UnderlyingAsset.IP, CoinKind.CRYPTO),
489489
tofc('773b02f6-32ea-493a-bca5-13d93cb0afff', 'ofctip', 'Story Testnet', 18, UnderlyingAsset.IP, CoinKind.CRYPTO),
490+
ofc(
491+
'9fd3e1b0-2e67-46c6-ab3b-a9942533b9d6',
492+
'ofcbobaeth',
493+
'Boba Network',
494+
18,
495+
UnderlyingAsset.BOBAETH,
496+
CoinKind.CRYPTO
497+
),
498+
tofc(
499+
'14c7407a-0daa-4c3d-b438-8a9d2e60cc29',
500+
'ofctbobaeth',
501+
'Boba Network Testnet',
502+
18,
503+
UnderlyingAsset.BOBAETH,
504+
CoinKind.CRYPTO
505+
),
490506
ofc(
491507
'8b50bd47-54d4-456d-a141-09f8e90df850',
492508
'ofczksyncera',

modules/statics/src/networks.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,6 +2589,26 @@ class TempoTestnet extends Testnet implements EthereumNetwork {
25892589
tokenOperationHashPrefix = '42431';
25902590
}
25912591

2592+
class Boba extends Mainnet implements EthereumNetwork {
2593+
name = 'Boba';
2594+
family = CoinFamily.BOBAETH;
2595+
explorerUrl = 'https://bobascan.com/blockchain/transactions';
2596+
accountExplorerUrl = 'https://bobascan.com/blockchain/accounts';
2597+
chainId = 288;
2598+
nativeCoinOperationHashPrefix = '288';
2599+
tokenOperationHashPrefix = '288-ERC20';
2600+
}
2601+
2602+
class BobaTestnet extends Testnet implements EthereumNetwork {
2603+
name = 'Boba Testnet';
2604+
family = CoinFamily.BOBAETH;
2605+
explorerUrl = 'https://testnet.bobascan.com/blockchain/transactions';
2606+
accountExplorerUrl = 'https://testnet.bobascan.com/blockchain/accounts';
2607+
chainId = 28882;
2608+
nativeCoinOperationHashPrefix = '28882';
2609+
tokenOperationHashPrefix = '28882-ERC20';
2610+
}
2611+
25922612
/**
25932613
* Constructor options for {@link DynamicNetwork}.
25942614
* Accepts string-typed `type` and `family` so AMS JSON can be passed directly.
@@ -2801,6 +2821,7 @@ export const Networks = {
28012821
zkSync: Object.freeze(new ZkSync()),
28022822
zkSyncEra: Object.freeze(new ZkSyncEra()),
28032823
unieth: Object.freeze(new Unieth()),
2824+
boba: Object.freeze(new Boba()),
28042825
},
28052826
test: {
28062827
abstracteth: Object.freeze(new AbstractEthTestnet()),
@@ -2929,6 +2950,7 @@ export const Networks = {
29292950
zkSync: Object.freeze(new ZkSyncTestnet()),
29302951
zkSyncEra: Object.freeze(new ZkSyncEraTestnet()),
29312952
unieth: Object.freeze(new UniethTestnet()),
2953+
boba: Object.freeze(new BobaTestnet()),
29322954
},
29332955
};
29342956

modules/statics/test/unit/fixtures/expectedColdFeatures.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export const expectedColdFeatures = {
8282
'bera',
8383
'baseeth',
8484
'bld',
85+
'bobaeth',
8586
'bsc',
8687
'canton',
8788
'chiliz',
@@ -159,6 +160,7 @@ export const expectedColdFeatures = {
159160
'tbera',
160161
'tbaseeth',
161162
'tbld',
163+
'tbobaeth',
162164
'tbsc',
163165
'tcanton',
164166
'tchiliz',

0 commit comments

Comments
 (0)