Skip to content
Merged
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
5 changes: 5 additions & 0 deletions src/@types/OceanNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ export interface StorageTypes {
url: boolean
}

export interface AddressPerChain {
[chainId: string]: string
}

export interface OceanNodeStatus {
id: string
publicKey: string
Expand All @@ -179,6 +183,7 @@ export interface OceanNodeStatus {
p2p: boolean
provider: OceanNodeProvider[]
indexer: OceanNodeIndexer[]
escrowAddress: AddressPerChain
supportedStorage: StorageTypes
platform: any
uptime?: number // seconds since start
Expand Down
6 changes: 6 additions & 0 deletions src/components/core/utils/statusHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ export async function status(
p2p: config.hasP2P,
provider: [],
indexer: [],
escrowAddress: {},
supportedStorage: getSupportedStorageTypes(config),
// uptime: process.uptime(),
platform: platformInfo,
Expand All @@ -142,6 +143,11 @@ export async function status(
if (config.supportedNetworks) {
nodeStatus.provider = getProviderInfo(config)
nodeStatus.indexer = await getIndexerInfo(oceanNode, config)
for (const chain of Object.keys(config.supportedNetworks)) {
nodeStatus.escrowAddress[chain] = oceanNode.escrow.getEscrowContractAddressForChain(
parseInt(chain)
)
}
}
// only these 2 might change between requests
nodeStatus.platform.freemem = os.freemem()
Expand Down
Loading