Skip to content

Commit

Permalink
chore: add istestnet helper
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Mucha <jakub.mucha@icloud.com>
  • Loading branch information
drptbl committed Dec 12, 2020
1 parent 698fe83 commit 5875cb6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,34 @@ const path = require('path');

let networkName = 'mainnet';
let networkId = 1;
let isTestnet = false;

module.exports = {
setNetwork: network => {
if (network === 'main' || network === 'mainnet' || network === 1) {
networkName = 'mainnet';
networkId = 1;
isTestnet = false;
} else if (network === 'ropsten') {
networkName = 'ropsten';
networkId = 3;
isTestnet = true;
} else if (network === 'kovan') {
networkName = 'kovan';
networkId = 42;
isTestnet = true;
} else if (network === 'rinkeby') {
networkName = 'rinkeby';
networkId = 4;
isTestnet = true;
} else if (network === 'goerli') {
networkName = 'goerli';
networkId = 5;
isTestnet = true;
}
},
getNetwork: () => {
return { networkName, networkId };
return { networkName, networkId, isTestnet };
},
getSynpressPath: () => {
return 'node_modules/@synthetixio/synpress';
Expand Down

0 comments on commit 5875cb6

Please sign in to comment.