Skip to content

Commit 5661a1a

Browse files
committed
feat: add mantle chain config
TICKET: COIN-6448
1 parent e136ac5 commit 5661a1a

File tree

6 files changed

+63
-0
lines changed

6 files changed

+63
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ describe('V2 Keychains', function () {
100100
n.asset !== UnderlyingAsset.SOMI &&
101101
n.asset !== UnderlyingAsset.FLRP &&
102102
n.asset !== UnderlyingAsset.FLUENTETH &&
103+
n.asset !== UnderlyingAsset.MANTLE &&
103104
coinFamilyValues.includes(n.name)
104105
);
105106

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ const mainnetBase: EnvironmentTemplate = {
275275
fluenteth: {
276276
baseUrl: 'https://testnet.fluentscan.xyz/api/', //TODO: COIN-6478: add mainnet url when available
277277
},
278+
mantle: {
279+
baseUrl: 'https://api.mantlescan.xyz/api',
280+
},
278281
},
279282
icpNodeUrl: 'https://ic0.app',
280283
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -418,6 +421,9 @@ const testnetBase: EnvironmentTemplate = {
418421
fluenteth: {
419422
baseUrl: 'https://testnet.fluentscan.xyz/api/',
420423
},
424+
mantle: {
425+
baseUrl: 'https://api-sepolia.mantlescan.xyz/api',
426+
},
421427
},
422428
stxNodeUrl: 'https://api.testnet.hiro.so',
423429
vetNodeUrl: 'https://sync-testnet.vechain.org',

modules/statics/src/allCoinsAndTokens.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,38 @@ export const allCoinsAndTokens = [
22012201
'',
22022202
'FluentETH'
22032203
),
2204+
account(
2205+
'bc7e8d57-696a-4ead-a0a3-1aa479ed0665',
2206+
'mantle',
2207+
'Mantle Native',
2208+
Networks.main.mantle,
2209+
18,
2210+
UnderlyingAsset.MANTLE,
2211+
BaseUnit.ETH,
2212+
[
2213+
...EVM_FEATURES,
2214+
CoinFeature.SHARED_EVM_SIGNING,
2215+
CoinFeature.SHARED_EVM_SDK,
2216+
CoinFeature.EVM_COMPATIBLE_IMS,
2217+
CoinFeature.EVM_COMPATIBLE_UI,
2218+
]
2219+
),
2220+
account(
2221+
'53cd61e4-1fdd-4c95-a8da-cb39bf383c2e',
2222+
'tmantle',
2223+
'Testnet Mantle Native',
2224+
Networks.test.mantle,
2225+
18,
2226+
UnderlyingAsset.MANTLE,
2227+
BaseUnit.ETH,
2228+
[
2229+
...EVM_FEATURES,
2230+
CoinFeature.SHARED_EVM_SIGNING,
2231+
CoinFeature.SHARED_EVM_SDK,
2232+
CoinFeature.EVM_COMPATIBLE_IMS,
2233+
CoinFeature.EVM_COMPATIBLE_UI,
2234+
]
2235+
),
22042236
canton(
22052237
'07385320-5a4f-48e9-97a5-86d4be9f24b0',
22062238
'canton',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export enum CoinFamily {
7272
KAVAEVM = 'kavaevm',
7373
LNBTC = 'lnbtc',
7474
LTC = 'ltc',
75+
MANTLE = 'mantle',
7576
MANTRA = 'mantra',
7677
MEGAETH = 'megaeth',
7778
MON = 'mon',
@@ -563,6 +564,7 @@ export enum UnderlyingAsset {
563564
LNBTC = 'lnbtc',
564565
LTC = 'ltc',
565566
LINEAETH = 'lineaeth',
567+
MANTLE = 'mantle',
566568
MANTRA = 'mantra',
567569
MEGAETH = 'megaeth',
568570
MON = 'mon',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,24 @@ class FluentETHTestnet extends Testnet implements EthereumNetwork {
15091509
nativeCoinOperationHashPrefix = '20994';
15101510
}
15111511

1512+
class Mantle extends Mainnet implements EthereumNetwork {
1513+
name = 'Mantle Native';
1514+
family = CoinFamily.MANTLE;
1515+
explorerUrl = 'https://mantlescan.xyz/tx/';
1516+
accountExplorerUrl = 'https://mantlescan.xyz/address/';
1517+
chainId = 5000;
1518+
nativeCoinOperationHashPrefix = '5000';
1519+
}
1520+
1521+
class MantleTestnet extends Testnet implements EthereumNetwork {
1522+
name = 'Testnet Mantle Native';
1523+
family = CoinFamily.MANTLE;
1524+
explorerUrl = 'https://sepolia.mantlescan.xyz/tx/';
1525+
accountExplorerUrl = 'https://sepolia.mantlescan.xyz/address/';
1526+
chainId = 5003;
1527+
nativeCoinOperationHashPrefix = '5003';
1528+
}
1529+
15121530
class CreditcoinTestnet extends Testnet implements EthereumNetwork {
15131531
name = 'CreditcoinTestnet';
15141532
family = CoinFamily.CTC;
@@ -2111,6 +2129,7 @@ export const Networks = {
21112129
litecoin: Object.freeze(new Litecoin()),
21122130
megaeth: Object.freeze(new MegaETH()),
21132131
mon: Object.freeze(new Monad()),
2132+
mantle: Object.freeze(new Mantle()),
21142133
mantra: Object.freeze(new Mantra()),
21152134
plume: Object.freeze(new Plume()),
21162135
polygon: Object.freeze(new Polygon()),
@@ -2214,6 +2233,7 @@ export const Networks = {
22142233
hoodi: Object.freeze(new Hoodi()),
22152234
lnbtc: Object.freeze(new LightningBitcoinTestnet()),
22162235
litecoin: Object.freeze(new LitecoinTestnet()),
2236+
mantle: Object.freeze(new MantleTestnet()),
22172237
mantra: Object.freeze(new MantraTestnet()),
22182238
polygon: Object.freeze(new PolygonTestnet()),
22192239
polyx: Object.freeze(new PolymeshTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export const expectedColdFeatures = {
9999
'kaia',
100100
'kava',
101101
'megaeth',
102+
'mantle',
102103
'mantra',
103104
'mon',
104105
'near',
@@ -166,6 +167,7 @@ export const expectedColdFeatures = {
166167
'tiota',
167168
'tkaia',
168169
'tkava',
170+
'tmantle',
169171
'tmantra',
170172
'tnear',
171173
'tosmo',

0 commit comments

Comments
 (0)