Skip to content

Commit 1ef16be

Browse files
authored
Merge pull request #6496 from BitGo/WIN-6190
feat(statics): add irys chain configs
2 parents 7bbe0e0 + 89fb371 commit 1ef16be

File tree

6 files changed

+53
-2
lines changed

6 files changed

+53
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ describe('V2 Keychains', function () {
9292
n.asset !== UnderlyingAsset.SONIC &&
9393
n.asset !== UnderlyingAsset.SEIEVM &&
9494
n.asset !== UnderlyingAsset.KAIA &&
95+
n.asset !== UnderlyingAsset.IRYS &&
9596
coinFamilyValues.includes(n.name)
9697
);
9798

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ const mainnetBase: EnvironmentTemplate = {
224224
kaia: {
225225
baseUrl: 'https://public-en.node.kaia.io',
226226
},
227+
irys: {
228+
baseUrl: 'https://testnet-rpc.irys.xyz/v1/execution-rpc', //TODO: WIN-6191 add mainnet url when available
229+
},
227230
},
228231
icpNodeUrl: 'https://ic0.app',
229232
worldExplorerBaseUrl: 'https://worldscan.org/',
@@ -321,6 +324,9 @@ const testnetBase: EnvironmentTemplate = {
321324
kaia: {
322325
baseUrl: 'https://public-en-kairos.node.kaia.io',
323326
},
327+
irys: {
328+
baseUrl: 'https://testnet-rpc.irys.xyz/v1/execution-rpc',
329+
},
324330
},
325331
stxNodeUrl: 'https://api.testnet.hiro.so',
326332
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
@@ -60,6 +60,7 @@ export enum CoinFamily {
6060
ICP = 'icp',
6161
INITIA = 'initia',
6262
INJECTIVE = 'injective',
63+
IRYS = 'irys',
6364
ISLM = 'islm',
6465
KAIA = 'kaia',
6566
KAVA = 'kava',
@@ -474,6 +475,7 @@ export enum UnderlyingAsset {
474475
ICP = 'icp',
475476
INITIA = 'initia',
476477
INJECTIVE = 'injective',
478+
IRYS = 'irys',
477479
ISLM = 'islm',
478480
KAIA = 'kaia',
479481
KAVA = 'kava',

modules/statics/src/coins.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ export const coins = CoinMap.fromCoins([
14061406
18,
14071407
UnderlyingAsset.KAIA,
14081408
BaseUnit.ETH,
1409-
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK]
1409+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK, CoinFeature.EVM_COMPATIBLE_IMS]
14101410
),
14111411
account(
14121412
'f6be6f3d-ebac-49fc-8c73-e5b1fc115778',
@@ -1416,7 +1416,27 @@ export const coins = CoinMap.fromCoins([
14161416
18,
14171417
UnderlyingAsset.KAIA,
14181418
BaseUnit.ETH,
1419-
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK]
1419+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK, CoinFeature.EVM_COMPATIBLE_IMS]
1420+
),
1421+
account(
1422+
'bc8541c1-b552-48a6-9a43-1c9b11c43227',
1423+
'irys',
1424+
'Irys',
1425+
Networks.main.irys,
1426+
18,
1427+
UnderlyingAsset.IRYS,
1428+
BaseUnit.ETH,
1429+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK, CoinFeature.EVM_COMPATIBLE_IMS]
1430+
),
1431+
account(
1432+
'8861d96c-f1a1-436a-8eb7-950f73f53c3a',
1433+
'tirys',
1434+
'Irys Testnet',
1435+
Networks.test.irys,
1436+
18,
1437+
UnderlyingAsset.IRYS,
1438+
BaseUnit.ETH,
1439+
[...EVM_FEATURES, CoinFeature.SHARED_EVM_SIGNING, CoinFeature.SHARED_EVM_SDK, CoinFeature.EVM_COMPATIBLE_IMS]
14201440
),
14211441
account(
14221442
'251b78df-90c5-4ff5-b07a-8cc23f27c5ff',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,24 @@ class KaiaTestnet extends Testnet implements EthereumNetwork {
13721372
nativeCoinOperationHashPrefix = '1001';
13731373
}
13741374

1375+
class Irys extends Mainnet implements EthereumNetwork {
1376+
name = 'Irys';
1377+
family = CoinFamily.IRYS;
1378+
explorerUrl = ''; //WIN-6191 add mainnet url when available
1379+
accountExplorerUrl = ''; //WIN-6191 add mainnet url when available
1380+
chainId = 1270; //WIN-6191 add mainnet id when available
1381+
nativeCoinOperationHashPrefix = '1270';
1382+
}
1383+
1384+
class IrysTestnet extends Testnet implements EthereumNetwork {
1385+
name = 'IrysTestnet';
1386+
family = CoinFamily.IRYS;
1387+
explorerUrl = 'https://testnet-explorer.irys.xyz/tx/';
1388+
accountExplorerUrl = 'https://testnet-explorer.irys.xyz/address/';
1389+
chainId = 1270;
1390+
nativeCoinOperationHashPrefix = '1270';
1391+
}
1392+
13751393
class Xdc extends Mainnet implements EthereumNetwork {
13761394
name = 'XdcChain';
13771395
family = CoinFamily.XDC;
@@ -1691,6 +1709,7 @@ export const Networks = {
16911709
icp: Object.freeze(new Icp()),
16921710
initia: Object.freeze(new Initia()),
16931711
injective: Object.freeze(new Injective()),
1712+
irys: Object.freeze(new Irys()),
16941713
islm: Object.freeze(new Islm()),
16951714
kaia: Object.freeze(new Kaia()),
16961715
kava: Object.freeze(new Kava()),
@@ -1777,6 +1796,7 @@ export const Networks = {
17771796
icp: Object.freeze(new IcpTestnet()),
17781797
initia: Object.freeze(new InitiaTestnet()),
17791798
injective: Object.freeze(new InjectiveTestnet()),
1799+
irys: Object.freeze(new IrysTestnet()),
17801800
islm: Object.freeze(new IslmTestnet()),
17811801
kava: Object.freeze(new KavaTestnet()),
17821802
kovan: Object.freeze(new Kovan()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const expectedColdFeatures = {
7171
'hash',
7272
'icp',
7373
'initia',
74+
'irys',
7475
'islm',
7576
'injective',
7677
'kaia',
@@ -122,6 +123,7 @@ export const expectedColdFeatures = {
122123
'tia',
123124
'ticp',
124125
'tinitia',
126+
'tirys',
125127
'tislm',
126128
'tinjective',
127129
'tkaia',

0 commit comments

Comments
 (0)