From 107654ecca82256d3061eb9f46a5aa5ed62a6700 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Tue, 11 Jun 2019 15:45:14 +0200 Subject: [PATCH] Expose available network IDs This exposes the network IDs on which kredits is deployed. Helpful to check if the used network is supported. --- lib/kredits.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/kredits.js b/lib/kredits.js index fdcb63b..caa654b 100644 --- a/lib/kredits.js +++ b/lib/kredits.js @@ -83,6 +83,10 @@ class Kredits { return new Kredits(ethProvider, signer, kreditsOptions); } + static availableNetworks () { + return Object.keys(DaoAddresses); + } + get Kernel () { let k = this.contractFor('Kernel'); // in case we want to use a special apm (e.g. development vs. production)