MCPcopy Create free account
hub / github.com/PolymathNetwork/polymath-core / getGasPrice

Function getGasPrice

CLI/commands/common/global.js:6–25  ·  view source on GitHub ↗
(networkId)

Source from the content-addressed store, hash-verified

4global.web3, global.Issuer, global.defaultGasPrice, global.remoteNetwork;
5
6function getGasPrice(networkId) {
7 let gasPrice;
8 switch (networkId) {
9 case 1: //Mainnet
10 gasPrice = 4000000000;
11 break;
12 case 3: //Ropsten
13 gasPrice = 50000000000;
14 break;
15 case 15: //Ganache
16 gasPrice = 50000000000;
17 break;
18 case 42: //Kovan
19 gasPrice = 50000000000;
20 break;
21 default:
22 throw new Error('Network ID not identified');
23 }
24 return gasPrice;
25}
26
27function providerValidator(url) {
28 var expression = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,4}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g;

Callers 1

global.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected