-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
83 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
packages/shared/src/lib/core/layer-2/actions/getNetworkFromAddress.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { IEvmNetwork, IscChain, getIscChains } from '@core/network' | ||
import { IscChain, getIscChains } from '@core/network' | ||
|
||
export function getNetworkFromAddress(networkAddress: string | undefined): IEvmNetwork | undefined { | ||
const evmNetwork = getIscChains().find((evmNetwork) => (evmNetwork as IscChain).aliasAddress === networkAddress) | ||
export function getNetworkFromAddress(networkAddress: string | undefined): IscChain | undefined { | ||
const evmNetwork = getIscChains().find(({ aliasAddress }) => aliasAddress === networkAddress) | ||
return evmNetwork | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 6 additions & 8 deletions
14
packages/shared/src/lib/core/network/classes/evm-network.class.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { IPureEvmNetworkConfiguration } from '../interfaces' | ||
import { NetworkType } from '../enums' | ||
import { IEvmNetwork, IPureEvmNetworkConfiguration } from '../interfaces' | ||
import { BaseEvmNetwork } from './base-evm-network.class' | ||
|
||
export class EvmNetwork extends BaseEvmNetwork { | ||
export class EvmNetwork extends BaseEvmNetwork implements IEvmNetwork { | ||
public readonly type = NetworkType.Evm | ||
|
||
constructor(chainConfiguration: IPureEvmNetworkConfiguration) { | ||
try { | ||
super(chainConfiguration) | ||
} catch (err) { | ||
console.error(err) | ||
throw new Error('Failed to construct isc Chain!') | ||
} | ||
super(chainConfiguration) | ||
} | ||
} |
24 changes: 10 additions & 14 deletions
24
packages/shared/src/lib/core/network/classes/isc-chain.class.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/shared/src/lib/core/network/enums/evm-network-type.enum.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export * from './chain-id.enum' | ||
export * from './evm-network-type.enum' | ||
export * from './explorer-api-endpoint.enum' | ||
export * from './explorer-endpoint.enum' | ||
export * from './network-health.enum' | ||
export * from './network-namespace.enum' | ||
export * from './network-type.enum' | ||
export * from './stardust-network-name.enum' | ||
export * from './token-supply.enum' |
5 changes: 5 additions & 0 deletions
5
packages/shared/src/lib/core/network/enums/network-type.enum.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum NetworkType { | ||
Stardust = 'stardust', | ||
Isc = 'iscp', | ||
Evm = 'evm', | ||
} |
8 changes: 4 additions & 4 deletions
8
packages/shared/src/lib/core/network/interfaces/evm-network-configuration.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.