Skip to content

feat(statics): add pharos chain config #6381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions modules/sdk-core/src/bitgo/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ interface EnvironmentTemplate {
soneiumExplorerApiToken?: string;
stxNodeUrl: string;
vetNodeUrl: string;
// The key here is coinName and it will be same for both mainnet and testnet (eg: 'phrs')
evm?: {
[key: string]: {
baseUrl: string;
Expand Down Expand Up @@ -198,6 +199,11 @@ const mainnetBase: EnvironmentTemplate = {
xdcExplorerBaseUrl: 'https://api.etherscan.io/v2',
wemixExplorerBaseUrl: 'https://api.etherscan.io/v2',
sgbExplorerBaseUrl: 'https://songbird-explorer.flare.network',
evm: {
phrs: {
baseUrl: 'https://testnet.dplabs-internal.com', // TODO: WIN-5787 add mainnet url when its available
},
},
icpNodeUrl: 'https://ic0.app',
worldExplorerBaseUrl: 'https://worldscan.org/',
somniaExplorerBaseUrl: 'https://shannon-explorer.somnia.network/', //TODO: WIN-5278: change it with mainnet explorer, when its available
Expand Down Expand Up @@ -275,6 +281,11 @@ const testnetBase: EnvironmentTemplate = {
worldExplorerBaseUrl: 'https://sepolia.worldscan.org/',
somniaExplorerBaseUrl: 'https://shannon-explorer.somnia.network/',
soneiumExplorerBaseUrl: 'https://soneium-minato.blockscout.com',
evm: {
phrs: {
baseUrl: 'https://testnet.dplabs-internal.com',
},
},
stxNodeUrl: 'https://api.testnet.hiro.so',
vetNodeUrl: 'https://rpc-testnet.vechain.energy',
};
Expand Down
1 change: 1 addition & 0 deletions modules/statics/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export enum CoinFamily {
MON = 'mon',
POLYGON = 'polygon',
POLYX = 'polyx',
PHRS = 'phrs',
NEAR = 'near',
OAS = 'oas',
OFC = 'ofc',
Expand Down
20 changes: 20 additions & 0 deletions modules/statics/src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,24 @@ class ApeChainTestnet extends Testnet implements EthereumNetwork {
nativeCoinOperationHashPrefix = '33111';
}

class Pharos extends Mainnet implements EthereumNetwork {
name = 'Pharos';
family = CoinFamily.PHRS;
explorerUrl = ''; // TODO: WIN-5787 Add mainnet url when available
accountExplorerUrl = ''; // TODO: WIN-5787 Add mainnet url when available
chainId = 688688; // TODO: WIN-5787 Add mainnet id when available
nativeCoinOperationHashPrefix = '688688';
}

class PharosTestnet extends Testnet implements EthereumNetwork {
name = 'PharosTestnet';
family = CoinFamily.PHRS;
explorerUrl = 'https://testnet.pharosscan.xyz/tx/';
accountExplorerUrl = 'https://testnet.pharosscan.xyz/address/';
chainId = 688688;
nativeCoinOperationHashPrefix = '688688';
}

class Xdc extends Mainnet implements EthereumNetwork {
name = 'XdcChain';
family = CoinFamily.XDC;
Expand Down Expand Up @@ -1557,6 +1575,7 @@ export const Networks = {
mantra: Object.freeze(new Mantra()),
polygon: Object.freeze(new Polygon()),
polyx: Object.freeze(new Polymesh()),
phrs: Object.freeze(new Pharos()),
oas: Object.freeze(new Oas()),
ofc: Object.freeze(new Ofc()),
optimism: Object.freeze(new Optimism()),
Expand Down Expand Up @@ -1639,6 +1658,7 @@ export const Networks = {
mantra: Object.freeze(new MantraTestnet()),
polygon: Object.freeze(new PolygonTestnet()),
polyx: Object.freeze(new PolymeshTestnet()),
phrs: Object.freeze(new PharosTestnet()),
oas: Object.freeze(new OasTestnet()),
ofc: Object.freeze(new OfcTestnet()),
optimism: Object.freeze(new OptimismTestnet()),
Expand Down