Skip to content

Commit fc2a43d

Browse files
Merge pull request #6617 from BitGo/WIN-6480-STORY
feat: adding story chain config
2 parents a388904 + 3d2d7b0 commit fc2a43d

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
@@ -95,6 +95,7 @@ describe('V2 Keychains', function () {
9595
n.asset !== UnderlyingAsset.KAIA &&
9696
n.asset !== UnderlyingAsset.IRYS &&
9797
n.asset !== UnderlyingAsset.LINEAETH &&
98+
n.asset !== UnderlyingAsset.IP && // Story Chain
9899
coinFamilyValues.includes(n.name)
99100
);
100101

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ const mainnetBase: EnvironmentTemplate = {
238238
lineaeth: {
239239
baseUrl: 'https://api.etherscan.io/v2',
240240
},
241+
ip: {
242+
baseUrl: 'https://api.storyscan.app/',
243+
},
241244
},
242245
icpNodeUrl: 'https://ic0.app',
243246
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -348,6 +351,9 @@ const testnetBase: EnvironmentTemplate = {
348351
lineaeth: {
349352
baseUrl: 'https://api.etherscan.io/v2',
350353
},
354+
ip: {
355+
baseUrl: 'https://api.storyscan.app/',
356+
},
351357
},
352358
stxNodeUrl: 'https://api.testnet.hiro.so',
353359
vetNodeUrl: 'https://rpc-testnet.vechain.energy',

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export enum CoinFamily {
106106
ZETA = 'zeta',
107107
ZKETH = 'zketh',
108108
LINEAETH = 'lineaeth',
109+
IP = 'ip', // Story Chain
109110
}
110111

111112
/**
@@ -489,6 +490,7 @@ export enum UnderlyingAsset {
489490
HASH = 'hash', // Provenance
490491
HBAR = 'hbar', // Hedera main coin
491492
ICP = 'icp',
493+
IP = 'ip', // Story Chain
492494
INITIA = 'initia',
493495
INJECTIVE = 'injective',
494496
IRYS = 'irys',

modules/statics/src/coins.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,38 @@ export const coins = CoinMap.fromCoins([
14901490
CoinFeature.EVM_COMPATIBLE_UI,
14911491
]
14921492
),
1493+
account(
1494+
'ead0435a-ee3f-4dc5-91fd-8897f1811701',
1495+
'ip',
1496+
'Story',
1497+
Networks.main.ip,
1498+
18,
1499+
UnderlyingAsset.IP,
1500+
BaseUnit.ETH,
1501+
[
1502+
...EVM_FEATURES,
1503+
CoinFeature.SHARED_EVM_SIGNING,
1504+
CoinFeature.SHARED_EVM_SDK,
1505+
CoinFeature.EVM_COMPATIBLE_IMS,
1506+
CoinFeature.EVM_COMPATIBLE_UI,
1507+
]
1508+
),
1509+
account(
1510+
'86e7b7d6-02db-4ef7-9552-e8aeeeec2d52',
1511+
'tip',
1512+
'Story Testnet',
1513+
Networks.test.ip,
1514+
18,
1515+
UnderlyingAsset.IP,
1516+
BaseUnit.ETH,
1517+
[
1518+
...EVM_FEATURES,
1519+
CoinFeature.SHARED_EVM_SIGNING,
1520+
CoinFeature.SHARED_EVM_SDK,
1521+
CoinFeature.EVM_COMPATIBLE_IMS,
1522+
CoinFeature.EVM_COMPATIBLE_UI,
1523+
]
1524+
),
14931525
account(
14941526
'e907fdbd-2c5d-45d6-b622-9da38937da73',
14951527
'hypeevm',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,24 @@ class CoredaoTestnet extends Testnet implements EthereumNetwork {
12801280
forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b';
12811281
}
12821282

1283+
class IP extends Mainnet implements EthereumNetwork {
1284+
name = 'Story';
1285+
family = CoinFamily.IP;
1286+
explorerUrl = 'https://www.storyscan.io/tx/';
1287+
accountExplorerUrl = 'https://www.storyscan.io/address/';
1288+
chainId = 1514;
1289+
nativeCoinOperationHashPrefix = '1514';
1290+
}
1291+
1292+
class IPTestnet extends Testnet implements EthereumNetwork {
1293+
name = 'StoryTestnet';
1294+
family = CoinFamily.IP;
1295+
explorerUrl = 'https://aeneid.explorer.story.foundation/transactions/';
1296+
accountExplorerUrl = 'https://aeneid.storyscan.io/address/';
1297+
chainId = 1315;
1298+
nativeCoinOperationHashPrefix = '1315';
1299+
}
1300+
12831301
class ApeChain extends Mainnet implements EthereumNetwork {
12841302
name = 'ApeChain';
12851303
family = CoinFamily.APECHAIN;
@@ -1759,6 +1777,7 @@ export const Networks = {
17591777
hash: Object.freeze(new Hash()),
17601778
hedera: Object.freeze(new Hedera()),
17611779
icp: Object.freeze(new Icp()),
1780+
ip: Object.freeze(new IP()),
17621781
initia: Object.freeze(new Initia()),
17631782
injective: Object.freeze(new Injective()),
17641783
irys: Object.freeze(new Irys()),
@@ -1848,6 +1867,7 @@ export const Networks = {
18481867
hash: Object.freeze(new HashTestnet()),
18491868
hedera: Object.freeze(new HederaTestnet()),
18501869
icp: Object.freeze(new IcpTestnet()),
1870+
ip: Object.freeze(new IPTestnet()),
18511871
initia: Object.freeze(new InitiaTestnet()),
18521872
injective: Object.freeze(new InjectiveTestnet()),
18531873
irys: Object.freeze(new IrysTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const expectedColdFeatures = {
7070
'flr',
7171
'hash',
7272
'icp',
73+
'ip', // Story chain
7374
'initia',
7475
'irys',
7576
'islm',
@@ -126,6 +127,7 @@ export const expectedColdFeatures = {
126127
'thorchain:rune',
127128
'tia',
128129
'ticp',
130+
'tip', // Story chain
129131
'tinitia',
130132
'tirys',
131133
'tislm',

0 commit comments

Comments
 (0)