Skip to content

Commit d55d5cb

Browse files
Merge pull request #8148 from BitGo/coin-onboard/stable
feat: add Stable EVM chain support
2 parents e92a0cc + 464b508 commit d55d5cb

6 files changed

Lines changed: 75 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
@@ -245,6 +245,9 @@ const mainnetBase: EnvironmentTemplate = {
245245
sonic: {
246246
baseUrl: 'https://api.etherscan.io/v2',
247247
},
248+
stable: {
249+
baseUrl: 'https://stablescan.xyz/api',
250+
},
248251
seievm: {
249252
baseUrl: 'https://api.etherscan.io/v2',
250253
},
@@ -436,6 +439,9 @@ const testnetBase: EnvironmentTemplate = {
436439
sonic: {
437440
baseUrl: 'https://api.etherscan.io/v2',
438441
},
442+
stable: {
443+
baseUrl: 'https://testnet.stablescan.xyz/api',
444+
},
439445
seievm: {
440446
baseUrl: 'https://api.etherscan.io/v2',
441447
},

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,6 +1770,42 @@ export const allCoinsAndTokens = [
17701770
CoinFeature.EVM_NON_BITGO_RECOVERY,
17711771
]
17721772
),
1773+
account(
1774+
'599ab8d6-ebda-460e-8527-677157f86021',
1775+
'stable',
1776+
'Stable',
1777+
Networks.main.stable,
1778+
18,
1779+
UnderlyingAsset.STABLE,
1780+
BaseUnit.ETH,
1781+
[
1782+
...EVM_FEATURES,
1783+
CoinFeature.SHARED_EVM_SIGNING,
1784+
CoinFeature.SHARED_EVM_SDK,
1785+
CoinFeature.EVM_COMPATIBLE_IMS,
1786+
CoinFeature.EVM_COMPATIBLE_UI,
1787+
CoinFeature.EVM_COMPATIBLE_WP,
1788+
CoinFeature.SUPPORTS_ERC20,
1789+
]
1790+
),
1791+
account(
1792+
'fd6b7af0-aff3-45fb-9a71-2d7100a1cd89',
1793+
'tstable',
1794+
'Testnet Stable',
1795+
Networks.test.stable,
1796+
18,
1797+
UnderlyingAsset.STABLE,
1798+
BaseUnit.ETH,
1799+
[
1800+
...EVM_FEATURES,
1801+
CoinFeature.SHARED_EVM_SIGNING,
1802+
CoinFeature.SHARED_EVM_SDK,
1803+
CoinFeature.EVM_COMPATIBLE_IMS,
1804+
CoinFeature.EVM_COMPATIBLE_UI,
1805+
CoinFeature.EVM_COMPATIBLE_WP,
1806+
CoinFeature.SUPPORTS_ERC20,
1807+
]
1808+
),
17731809
account(
17741810
'df01a650-3c8b-4182-a7cb-8ee7ad115c21',
17751811
'xpl',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export enum CoinFamily {
104104
SOL = 'sol',
105105
SONIC = 'sonic',
106106
SONEIUM = 'soneium',
107+
STABLE = 'stable',
107108
STT = 'stt',
108109
SUI = 'sui',
109110
STX = 'stx',
@@ -635,6 +636,7 @@ export enum UnderlyingAsset {
635636
SGB = 'sgb',
636637
SOL = 'sol',
637638
SONIC = 'sonic',
639+
STABLE = 'stable',
638640
SUI = 'sui',
639641
STX = 'stx',
640642
TIA = 'tia', // Celestia

modules/statics/src/coins/ofcCoins.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ export const ofcCoins = [
194194
UnderlyingAsset.SONIC,
195195
CoinKind.CRYPTO
196196
),
197+
ofc('13151b0b-3734-452d-8ad9-21af03a08bfe', 'ofcstable', 'Stable', 18, UnderlyingAsset.STABLE, CoinKind.CRYPTO),
198+
tofc(
199+
'39a4dd77-b824-47b9-baff-b45398012511',
200+
'ofctstable',
201+
'Stable Testnet',
202+
18,
203+
UnderlyingAsset.STABLE,
204+
CoinKind.CRYPTO
205+
),
197206
ofc(
198207
'ec31b18d-f034-4e84-837e-2c7d2908bbae',
199208
'ofchypeevm',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,24 @@ class SonicTestnet extends Testnet implements EthereumNetwork {
18271827
walletImplementationAddress = '0x944fef03af368414f29dc31a72061b8d64f568d2';
18281828
}
18291829

1830+
class Stable extends Mainnet implements EthereumNetwork {
1831+
name = 'Stable';
1832+
family = CoinFamily.STABLE;
1833+
explorerUrl = 'https://stablescan.xyz/tx/';
1834+
accountExplorerUrl = 'https://stablescan.xyz/address/';
1835+
chainId = 988;
1836+
nativeCoinOperationHashPrefix = '988';
1837+
}
1838+
1839+
class StableTestnet extends Testnet implements EthereumNetwork {
1840+
name = 'Testnet Stable';
1841+
family = CoinFamily.STABLE;
1842+
explorerUrl = 'https://testnet.stablescan.xyz/tx/';
1843+
accountExplorerUrl = 'https://testnet.stablescan.xyz/address/';
1844+
chainId = 2201;
1845+
nativeCoinOperationHashPrefix = '2201';
1846+
}
1847+
18301848
class Kaia extends Mainnet implements EthereumNetwork {
18311849
name = 'Kaia';
18321850
family = CoinFamily.KAIA;
@@ -2502,6 +2520,7 @@ export const Networks = {
25022520
sgb: Object.freeze(new Songbird()),
25032521
sol: Object.freeze(new Sol()),
25042522
sonic: Object.freeze(new Sonic()),
2523+
stable: Object.freeze(new Stable()),
25052524
sui: Object.freeze(new Sui()),
25062525
near: Object.freeze(new Near()),
25072526
stx: Object.freeze(new Stx()),
@@ -2623,6 +2642,7 @@ export const Networks = {
26232642
stt: Object.freeze(new SomniaTestnet()),
26242643
soneium: Object.freeze(new SoneiumTestnet()),
26252644
sonic: Object.freeze(new SonicTestnet()),
2645+
stable: Object.freeze(new StableTestnet()),
26262646
kaia: Object.freeze(new KaiaTestnet()),
26272647
susd: Object.freeze(new SUSDTestnet()),
26282648
coreum: Object.freeze(new CoreumTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export const expectedColdFeatures = {
125125
'sol',
126126
'sonic',
127127
'somi',
128+
'stable',
128129
'sui',
129130
'tao',
130131
'tempo',
@@ -213,6 +214,7 @@ export const expectedColdFeatures = {
213214
'tseievm',
214215
'tton',
215216
'tsonic',
217+
'tstable',
216218
],
217219
neither: [
218220
'ethw',

0 commit comments

Comments
 (0)