Skip to content

Commit 9ed034d

Browse files
feat(statics): add MIDL Bitcoin EVM chain
Add MIDL Bitcoin (midlbtc) EVM chain to BitGoJS statics and SDK core. MIDL is a dual-layer blockchain with Bitcoin L1 settlement and EVM L2 execution. P0 integration covers EVM-to-EVM value transfers only. Mainnet entries use staging placeholders (chain ID, explorer URLs) pending mainnet launch details. Display symbol set to midlBTC. Ticket: CECHO-1231 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c849e3e commit 9ed034d

6 files changed

Lines changed: 87 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ const mainnetBase: EnvironmentTemplate = {
313313
hemieth: {
314314
baseUrl: 'https://explorer.hemi.xyz/api',
315315
},
316+
midlbtc: {
317+
baseUrl: 'https://blockscout.staging.midl.xyz/api', // TODO: update with mainnet explorer URL when available
318+
},
316319
katanaeth: {
317320
baseUrl: 'https://katanascan.com/api',
318321
},
@@ -546,6 +549,9 @@ const testnetBase: EnvironmentTemplate = {
546549
hemieth: {
547550
baseUrl: 'https://testnet.explorer.hemi.xyz/api',
548551
},
552+
midlbtc: {
553+
baseUrl: 'https://blockscout.staging.midl.xyz/api',
554+
},
549555
tkatanaeth: {
550556
baseUrl: 'https://explorer-bokuto.katanarpc.com/api',
551557
},

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2664,6 +2664,46 @@ export const allCoinsAndTokens = [
26642664
UnderlyingAsset['hemieth:hemibtc'],
26652665
Networks.main.hemieth
26662666
),
2667+
account(
2668+
'1d547ad4-3165-4a51-922a-b29f8a427f88',
2669+
'midlbtc',
2670+
'MIDL Bitcoin',
2671+
Networks.main.midlbtc,
2672+
18,
2673+
UnderlyingAsset.MIDLBTC,
2674+
BaseUnit.MIDLBTC,
2675+
[
2676+
...EVM_NON_EIP1559_FEATURES,
2677+
CoinFeature.SHARED_EVM_SIGNING,
2678+
CoinFeature.SHARED_EVM_SDK,
2679+
CoinFeature.EVM_COMPATIBLE_IMS,
2680+
CoinFeature.EVM_COMPATIBLE_UI,
2681+
CoinFeature.EVM_COMPATIBLE_WP,
2682+
],
2683+
KeyCurve.Secp256k1,
2684+
'',
2685+
'midlBTC'
2686+
),
2687+
account(
2688+
'1b2bdc62-c990-4194-b05e-fb4d840abc1d',
2689+
'tmidlbtc',
2690+
'Testnet MIDL Bitcoin',
2691+
Networks.test.midlbtc,
2692+
18,
2693+
UnderlyingAsset.MIDLBTC,
2694+
BaseUnit.MIDLBTC,
2695+
[
2696+
...EVM_NON_EIP1559_FEATURES,
2697+
CoinFeature.SHARED_EVM_SIGNING,
2698+
CoinFeature.SHARED_EVM_SDK,
2699+
CoinFeature.EVM_COMPATIBLE_IMS,
2700+
CoinFeature.EVM_COMPATIBLE_UI,
2701+
CoinFeature.EVM_COMPATIBLE_WP,
2702+
],
2703+
KeyCurve.Secp256k1,
2704+
'',
2705+
'midlBTC'
2706+
),
26672707
account(
26682708
'd055d442-03f1-4d24-b61c-5312e480e378',
26692709
'bobaeth',

modules/statics/src/base.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export enum CoinFamily {
9090
MANTLE = 'mantle',
9191
MANTRA = 'mantra',
9292
MEGAETH = 'megaeth',
93+
MIDLBTC = 'midlbtc', // MIDL Bitcoin EVM L2
9394
MON = 'mon',
9495
XPL = 'xpl', // Plasma Network
9596
POLYGON = 'polygon',
@@ -673,6 +674,7 @@ export enum UnderlyingAsset {
673674
MANTLE = 'mantle',
674675
MANTRA = 'mantra',
675676
MEGAETH = 'megaeth',
677+
MIDLBTC = 'midlbtc',
676678
MON = 'mon',
677679
MORPH = 'morph',
678680
MORPHETH = 'morpheth',
@@ -4047,6 +4049,7 @@ export enum BaseUnit {
40474049
INITIA = 'uinit',
40484050
ASI = 'afet',
40494051
VET = 'wei',
4052+
MIDLBTC = 'wei',
40504053
TCRONOS = 'basetcro',
40514054
TASI = 'atestfet',
40524055
CANTON = 'canton',

modules/statics/src/coins/ofcCoins.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,22 @@ export const ofcCoins = [
425425
UnderlyingAsset.HEMIETH,
426426
CoinKind.CRYPTO
427427
),
428+
ofc(
429+
'c2698de6-27a0-41fc-96fc-8a2bf2777359',
430+
'ofcmidlbtc',
431+
'MIDL Bitcoin',
432+
18,
433+
UnderlyingAsset.MIDLBTC,
434+
CoinKind.CRYPTO
435+
),
436+
tofc(
437+
'f67dee61-409b-40e2-a7b0-bda680d889eb',
438+
'ofctmidlbtc',
439+
'MIDL Bitcoin Testnet',
440+
18,
441+
UnderlyingAsset.MIDLBTC,
442+
CoinKind.CRYPTO
443+
),
428444
tofc(
429445
'7d18cdc5-a7da-4c76-8ce0-f80c391f80b3',
430446
'ofctprividiumeth',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,6 +2580,24 @@ class HemiEthTestnet extends Testnet implements EthereumNetwork {
25802580
chainId = 743111;
25812581
nativeCoinOperationHashPrefix = '743111';
25822582
}
2583+
class MidlBtc extends Mainnet implements EthereumNetwork {
2584+
name = 'MIDL Bitcoin';
2585+
family = CoinFamily.MIDLBTC;
2586+
explorerUrl = 'https://blockscout.staging.midl.xyz/tx/'; // TODO: update with mainnet explorer URL when available
2587+
accountExplorerUrl = 'https://blockscout.staging.midl.xyz/address/'; // TODO: update with mainnet explorer URL when available
2588+
chainId = 15001; // TODO: update with mainnet chain ID when available
2589+
nativeCoinOperationHashPrefix = '15001'; // TODO: update with mainnet chain ID when available
2590+
}
2591+
2592+
class MidlBtcTestnet extends Testnet implements EthereumNetwork {
2593+
name = 'Testnet MIDL Bitcoin';
2594+
family = CoinFamily.MIDLBTC;
2595+
explorerUrl = 'https://blockscout.staging.midl.xyz/tx/';
2596+
accountExplorerUrl = 'https://blockscout.staging.midl.xyz/address/';
2597+
chainId = 15001;
2598+
nativeCoinOperationHashPrefix = '15001';
2599+
}
2600+
25832601
class KatanaEth extends Mainnet implements EthereumNetwork {
25842602
name = 'Katana';
25852603
family = CoinFamily.KATANAETH;
@@ -2892,6 +2910,7 @@ export const Networks = {
28922910
lnbtc: Object.freeze(new LightningBitcoin()),
28932911
litecoin: Object.freeze(new Litecoin()),
28942912
megaeth: Object.freeze(new MegaETH()),
2913+
midlbtc: Object.freeze(new MidlBtc()),
28952914
mon: Object.freeze(new Monad()),
28962915
mantle: Object.freeze(new Mantle()),
28972916
mantra: Object.freeze(new Mantra()),
@@ -3008,6 +3027,7 @@ export const Networks = {
30083027
hederaEVM: Object.freeze(new HederaEVMTestnet()),
30093028
hemieth: Object.freeze(new HemiEthTestnet()),
30103029
inketh: Object.freeze(new InkEthTestnet()),
3030+
midlbtc: Object.freeze(new MidlBtcTestnet()),
30113031
icp: Object.freeze(new IcpTestnet()),
30123032
ip: Object.freeze(new IPTestnet()),
30133033
initia: Object.freeze(new InitiaTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export const expectedColdFeatures = {
120120
'megaeth',
121121
'mantle',
122122
'mantra',
123+
'midlbtc',
123124
'mon',
124125
'morph',
125126
'morpheth',
@@ -193,6 +194,7 @@ export const expectedColdFeatures = {
193194
'tmorph',
194195
'tmorpheth',
195196
'tmegaeth',
197+
'tmidlbtc',
196198
'tmon',
197199
'tworld',
198200
'tphrs',

0 commit comments

Comments
 (0)