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

Function providerValidator

CLI/commands/common/global.js:27–31  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

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;
29 var regex = new RegExp(expression);
30 return url.match(regex);
31}
32
33async function httpProvider(url, file) {
34 web3 = new Web3(new Web3.providers.HttpProvider(url));

Callers 1

global.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected