Skip to content

Commit 5583e86

Browse files
Merge pull request #6609 from BitGo/WIN-6479-ZERO
feat: adding configs for ZERO GRAVITY chain
2 parents 059fc0a + 7c4b83e commit 5583e86

File tree

6 files changed

+69
-0
lines changed

6 files changed

+69
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('V2 Keychains', function () {
7878
n.asset !== UnderlyingAsset.ICP &&
7979
n.asset !== UnderlyingAsset.MANTRA &&
8080
n.asset !== UnderlyingAsset.MON &&
81+
n.asset !== UnderlyingAsset.OG &&
8182
n.asset !== UnderlyingAsset.WORLD &&
8283
n.asset !== UnderlyingAsset.PHRS &&
8384
n.asset !== UnderlyingAsset.CTC &&

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ const mainnetBase: EnvironmentTemplate = {
217217
hypeevm: {
218218
baseUrl: 'https://rpc.hyperliquid.xyz/evm',
219219
},
220+
og: {
221+
baseUrl: '', //TODO- WIN-6519 when mainnet details available
222+
},
220223
sonic: {
221224
baseUrl: 'https://rpc.soniclabs.com',
222225
},
@@ -324,6 +327,9 @@ const testnetBase: EnvironmentTemplate = {
324327
hypeevm: {
325328
baseUrl: 'https://rpc.hyperliquid-testnet.xyz/evm',
326329
},
330+
og: {
331+
baseUrl: 'https://chainscan-test.0g.ai/open/api',
332+
},
327333
sonic: {
328334
baseUrl: 'https://rpc.blaze.soniclabs.com',
329335
},

modules/statics/src/base.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export enum CoinFamily {
7676
NEAR = 'near',
7777
OAS = 'oas',
7878
OFC = 'ofc',
79+
OG = 'og',
7980
OPETH = 'opeth',
8081
OSMO = 'osmo',
8182
RBTC = 'rbtc',
@@ -501,6 +502,7 @@ export enum UnderlyingAsset {
501502
MON = 'mon',
502503
NEAR = 'near',
503504
OAS = 'oas',
505+
OG = 'og',
504506
OPETH = 'opeth',
505507
OSMO = 'osmo',
506508
POLYGON = 'polygon',

modules/statics/src/coins.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,44 @@ export const coins = CoinMap.fromCoins([
707707
BaseUnit.BLD,
708708
COSMOS_SIDECHAIN_FEATURES_WITH_STAKING
709709
),
710+
account(
711+
'0d2d6a7f-70a9-4475-afca-2af5cfaddff6',
712+
'tog',
713+
'Zero Gravity Testnet',
714+
Networks.test.og,
715+
18,
716+
UnderlyingAsset.OG,
717+
BaseUnit.ETH,
718+
[
719+
...EVM_FEATURES,
720+
CoinFeature.SHARED_EVM_SIGNING,
721+
CoinFeature.SHARED_EVM_SDK,
722+
CoinFeature.EVM_COMPATIBLE_IMS,
723+
CoinFeature.EVM_COMPATIBLE_UI,
724+
],
725+
KeyCurve.Secp256k1,
726+
'',
727+
't0G'
728+
),
729+
account(
730+
'f180825c-a79c-4e4d-8c91-ebeffbd19819',
731+
'og',
732+
'Zero Gravity',
733+
Networks.main.og,
734+
18,
735+
UnderlyingAsset.OG,
736+
BaseUnit.ETH,
737+
[
738+
...EVM_FEATURES,
739+
CoinFeature.SHARED_EVM_SIGNING,
740+
CoinFeature.SHARED_EVM_SDK,
741+
CoinFeature.EVM_COMPATIBLE_IMS,
742+
CoinFeature.EVM_COMPATIBLE_UI,
743+
],
744+
KeyCurve.Secp256k1,
745+
'',
746+
'0G'
747+
),
710748
account(
711749
'4777265e-37f4-44d8-bccd-13e56189fcae',
712750
'sei',

modules/statics/src/networks.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,24 @@ class IrysTestnet extends Testnet implements EthereumNetwork {
14241424
nativeCoinOperationHashPrefix = '1270';
14251425
}
14261426

1427+
class Og extends Mainnet implements EthereumNetwork {
1428+
name = 'Zero Gravity';
1429+
family = CoinFamily.OG;
1430+
explorerUrl = ''; //TODO- WIN-6519 when mainnet details available
1431+
accountExplorerUrl = ''; //TODO- WIN-6519 when mainnet details available
1432+
chainId = 9999999999999; //TODO- WIN-6519 when mainnet details available ,this is a dummy value
1433+
nativeCoinOperationHashPrefix = ''; //TODO- WIN-6519 when mainnet details available
1434+
}
1435+
1436+
class OgTestnet extends Testnet implements EthereumNetwork {
1437+
name = 'Zero Gravity Testnet';
1438+
family = CoinFamily.OG;
1439+
explorerUrl = 'https://chainscan-galileo.0g.ai/tx/';
1440+
accountExplorerUrl = 'https://chainscan-galileo.0g.ai/address/';
1441+
chainId = 16601;
1442+
nativeCoinOperationHashPrefix = '16601';
1443+
}
1444+
14271445
class Xdc extends Mainnet implements EthereumNetwork {
14281446
name = 'XdcChain';
14291447
family = CoinFamily.XDC;
@@ -1758,6 +1776,7 @@ export const Networks = {
17581776
hypeevm: Object.freeze(new HypeEVM()),
17591777
lineaeth: Object.freeze(new LineaETH()),
17601778
oas: Object.freeze(new Oas()),
1779+
og: Object.freeze(new Og()),
17611780
ofc: Object.freeze(new Ofc()),
17621781
optimism: Object.freeze(new Optimism()),
17631782
osmo: Object.freeze(new Osmo()),
@@ -1848,6 +1867,7 @@ export const Networks = {
18481867
hypeevm: Object.freeze(new HypeEVMTestnet()),
18491868
lineaeth: Object.freeze(new LineaETHTestnet()),
18501869
oas: Object.freeze(new OasTestnet()),
1870+
og: Object.freeze(new OgTestnet()),
18511871
ofc: Object.freeze(new OfcTestnet()),
18521872
optimism: Object.freeze(new OptimismTestnet()),
18531873
osmo: Object.freeze(new OsmoTestnet()),

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export const expectedColdFeatures = {
8080
'mon',
8181
'near',
8282
'oas',
83+
'og',
8384
'osmo',
8485
'polyx',
8586
'sgb',
@@ -114,6 +115,7 @@ export const expectedColdFeatures = {
114115
'tdot',
115116
'tfetchai',
116117
'tflr',
118+
'tog',
117119
'tmon',
118120
'tworld',
119121
'tphrs',

0 commit comments

Comments
 (0)