diff --git a/configs/package.json b/configs/package.json index 1e0b3108..840485e8 100644 --- a/configs/package.json +++ b/configs/package.json @@ -1,7 +1,7 @@ { "name": "@aragon/osx-commons-configs", "author": "Aragon Association", - "version": "0.0.1", + "version": "0.0.2", "license": "AGPL-3.0-or-later", "typings": "dist/index.d.ts", "main": "dist/index.js", diff --git a/configs/src/index.ts b/configs/src/index.ts index 35eb8814..18675232 100644 --- a/configs/src/index.ts +++ b/configs/src/index.ts @@ -9,9 +9,14 @@ import * as mumbai from './deployments/mumbai.json'; import * as polygon from './deployments/polygon.json'; import * as sepolia from './deployments/sepolia.json'; import * as networks from './networks.json'; +import {NetworkConfigs} from './types'; + +export * from './types'; + +const networksTyped: NetworkConfigs = networks; export { - networks, + networksTyped as networks, arbitrum, arbitrumSepolia, baseGoerli, diff --git a/configs/src/types.ts b/configs/src/types.ts new file mode 100644 index 00000000..6812ad6a --- /dev/null +++ b/configs/src/types.ts @@ -0,0 +1,16 @@ +export type NetworkConfig = { + url: string; + isTestnet: boolean; + chainId: number; + aliases: NetworkAliases; +}; + +export type NetworkAliases = { + ethers5?: string; + ethers6?: string; + alchemySubgraphs?: string; +}; + +export type NetworkConfigs = { + [network: string]: T; +};