@ethereansos/interfaces-core 0.3.3 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -0
- package/dist/index.cjs.js +57 -40
- package/dist/index.esm.js +57 -40
- package/package.json +1 -1
package/README.md
CHANGED
File without changes
|
package/dist/index.cjs.js
CHANGED
@@ -32826,72 +32826,89 @@ nhp.NodeType;
|
|
32826
32826
|
|
32827
32827
|
var url = "https://etherscan.io/gastracker/";
|
32828
32828
|
|
32829
|
-
var request = require('http' + (url.indexOf('https') === 0 ? 's' : ''));
|
32830
|
-
|
32831
32829
|
function gasCalculator(_x) {
|
32832
32830
|
return _gasCalculator.apply(this, arguments);
|
32833
32831
|
}
|
32834
32832
|
|
32835
32833
|
function _gasCalculator() {
|
32836
|
-
_gasCalculator = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function
|
32834
|
+
_gasCalculator = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(provider) {
|
32837
32835
|
var chainId;
|
32838
|
-
return regeneratorRuntime.wrap(function
|
32836
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
32839
32837
|
while (1) {
|
32840
|
-
switch (
|
32838
|
+
switch (_context2.prev = _context2.next) {
|
32841
32839
|
case 0:
|
32842
|
-
|
32843
|
-
|
32840
|
+
_context2.t0 = parseInt;
|
32841
|
+
_context2.next = 3;
|
32844
32842
|
return sendAsync(provider, 'eth_chainId');
|
32845
32843
|
|
32846
32844
|
case 3:
|
32847
|
-
|
32848
|
-
chainId = (0,
|
32845
|
+
_context2.t1 = _context2.sent;
|
32846
|
+
chainId = (0, _context2.t0)(_context2.t1);
|
32849
32847
|
|
32850
32848
|
if (!(chainId !== 1 && !provider.blockchainConnection)) {
|
32851
|
-
|
32849
|
+
_context2.next = 7;
|
32852
32850
|
break;
|
32853
32851
|
}
|
32854
32852
|
|
32855
|
-
return
|
32853
|
+
return _context2.abrupt("return", "1.500000009");
|
32856
32854
|
|
32857
32855
|
case 7:
|
32858
|
-
|
32859
|
-
return new Promise(function (
|
32860
|
-
var
|
32861
|
-
|
32862
|
-
|
32863
|
-
|
32864
|
-
|
32865
|
-
|
32866
|
-
|
32867
|
-
|
32868
|
-
|
32869
|
-
|
32870
|
-
|
32871
|
-
|
32872
|
-
|
32873
|
-
|
32874
|
-
|
32875
|
-
|
32876
|
-
|
32856
|
+
_context2.next = 9;
|
32857
|
+
return new Promise( /*#__PURE__*/function () {
|
32858
|
+
var _ref = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ok) {
|
32859
|
+
var backup, gas;
|
32860
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
32861
|
+
while (1) {
|
32862
|
+
switch (_context.prev = _context.next) {
|
32863
|
+
case 0:
|
32864
|
+
backup = function backup() {
|
32865
|
+
return ok("2000000000");
|
32866
|
+
};
|
32867
|
+
|
32868
|
+
_context.prev = 1;
|
32869
|
+
_context.t0 = parseInt;
|
32870
|
+
_context.t1 = parse;
|
32871
|
+
_context.next = 6;
|
32872
|
+
return fetch(url);
|
32873
|
+
|
32874
|
+
case 6:
|
32875
|
+
_context.next = 8;
|
32876
|
+
return _context.sent.text();
|
32877
|
+
|
32878
|
+
case 8:
|
32879
|
+
_context.t2 = _context.sent;
|
32880
|
+
_context.t3 = (0, _context.t1)(_context.t2).querySelectorAll("#spanHighPrice")[0].innerHTML.trim();
|
32881
|
+
gas = (0, _context.t0)(_context.t3);
|
32882
|
+
return _context.abrupt("return", ok(numberToString(parseInt(numberToString(gas * 1.3)))));
|
32883
|
+
|
32884
|
+
case 14:
|
32885
|
+
_context.prev = 14;
|
32886
|
+
_context.t4 = _context["catch"](1);
|
32887
|
+
console.error(_context.t4);
|
32888
|
+
backup();
|
32889
|
+
|
32890
|
+
case 18:
|
32891
|
+
case "end":
|
32892
|
+
return _context.stop();
|
32893
|
+
}
|
32877
32894
|
}
|
32878
|
-
});
|
32879
|
-
|
32880
|
-
|
32881
|
-
|
32882
|
-
|
32883
|
-
}
|
32884
|
-
});
|
32895
|
+
}, _callee, null, [[1, 14]]);
|
32896
|
+
}));
|
32897
|
+
|
32898
|
+
return function (_x2) {
|
32899
|
+
return _ref.apply(this, arguments);
|
32900
|
+
};
|
32901
|
+
}());
|
32885
32902
|
|
32886
32903
|
case 9:
|
32887
|
-
return
|
32904
|
+
return _context2.abrupt("return", _context2.sent);
|
32888
32905
|
|
32889
32906
|
case 10:
|
32890
32907
|
case "end":
|
32891
|
-
return
|
32908
|
+
return _context2.stop();
|
32892
32909
|
}
|
32893
32910
|
}
|
32894
|
-
},
|
32911
|
+
}, _callee2);
|
32895
32912
|
}));
|
32896
32913
|
return _gasCalculator.apply(this, arguments);
|
32897
32914
|
}
|
package/dist/index.esm.js
CHANGED
@@ -32808,72 +32808,89 @@ nhp.NodeType;
|
|
32808
32808
|
|
32809
32809
|
var url = "https://etherscan.io/gastracker/";
|
32810
32810
|
|
32811
|
-
var request = require('http' + (url.indexOf('https') === 0 ? 's' : ''));
|
32812
|
-
|
32813
32811
|
function gasCalculator(_x) {
|
32814
32812
|
return _gasCalculator.apply(this, arguments);
|
32815
32813
|
}
|
32816
32814
|
|
32817
32815
|
function _gasCalculator() {
|
32818
|
-
_gasCalculator = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function
|
32816
|
+
_gasCalculator = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(provider) {
|
32819
32817
|
var chainId;
|
32820
|
-
return regeneratorRuntime.wrap(function
|
32818
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
32821
32819
|
while (1) {
|
32822
|
-
switch (
|
32820
|
+
switch (_context2.prev = _context2.next) {
|
32823
32821
|
case 0:
|
32824
|
-
|
32825
|
-
|
32822
|
+
_context2.t0 = parseInt;
|
32823
|
+
_context2.next = 3;
|
32826
32824
|
return sendAsync(provider, 'eth_chainId');
|
32827
32825
|
|
32828
32826
|
case 3:
|
32829
|
-
|
32830
|
-
chainId = (0,
|
32827
|
+
_context2.t1 = _context2.sent;
|
32828
|
+
chainId = (0, _context2.t0)(_context2.t1);
|
32831
32829
|
|
32832
32830
|
if (!(chainId !== 1 && !provider.blockchainConnection)) {
|
32833
|
-
|
32831
|
+
_context2.next = 7;
|
32834
32832
|
break;
|
32835
32833
|
}
|
32836
32834
|
|
32837
|
-
return
|
32835
|
+
return _context2.abrupt("return", "1.500000009");
|
32838
32836
|
|
32839
32837
|
case 7:
|
32840
|
-
|
32841
|
-
return new Promise(function (
|
32842
|
-
var
|
32843
|
-
|
32844
|
-
|
32845
|
-
|
32846
|
-
|
32847
|
-
|
32848
|
-
|
32849
|
-
|
32850
|
-
|
32851
|
-
|
32852
|
-
|
32853
|
-
|
32854
|
-
|
32855
|
-
|
32856
|
-
|
32857
|
-
|
32858
|
-
|
32838
|
+
_context2.next = 9;
|
32839
|
+
return new Promise( /*#__PURE__*/function () {
|
32840
|
+
var _ref = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee(ok) {
|
32841
|
+
var backup, gas;
|
32842
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
32843
|
+
while (1) {
|
32844
|
+
switch (_context.prev = _context.next) {
|
32845
|
+
case 0:
|
32846
|
+
backup = function backup() {
|
32847
|
+
return ok("2000000000");
|
32848
|
+
};
|
32849
|
+
|
32850
|
+
_context.prev = 1;
|
32851
|
+
_context.t0 = parseInt;
|
32852
|
+
_context.t1 = parse;
|
32853
|
+
_context.next = 6;
|
32854
|
+
return fetch(url);
|
32855
|
+
|
32856
|
+
case 6:
|
32857
|
+
_context.next = 8;
|
32858
|
+
return _context.sent.text();
|
32859
|
+
|
32860
|
+
case 8:
|
32861
|
+
_context.t2 = _context.sent;
|
32862
|
+
_context.t3 = (0, _context.t1)(_context.t2).querySelectorAll("#spanHighPrice")[0].innerHTML.trim();
|
32863
|
+
gas = (0, _context.t0)(_context.t3);
|
32864
|
+
return _context.abrupt("return", ok(numberToString(parseInt(numberToString(gas * 1.3)))));
|
32865
|
+
|
32866
|
+
case 14:
|
32867
|
+
_context.prev = 14;
|
32868
|
+
_context.t4 = _context["catch"](1);
|
32869
|
+
console.error(_context.t4);
|
32870
|
+
backup();
|
32871
|
+
|
32872
|
+
case 18:
|
32873
|
+
case "end":
|
32874
|
+
return _context.stop();
|
32875
|
+
}
|
32859
32876
|
}
|
32860
|
-
});
|
32861
|
-
|
32862
|
-
|
32863
|
-
|
32864
|
-
|
32865
|
-
}
|
32866
|
-
});
|
32877
|
+
}, _callee, null, [[1, 14]]);
|
32878
|
+
}));
|
32879
|
+
|
32880
|
+
return function (_x2) {
|
32881
|
+
return _ref.apply(this, arguments);
|
32882
|
+
};
|
32883
|
+
}());
|
32867
32884
|
|
32868
32885
|
case 9:
|
32869
|
-
return
|
32886
|
+
return _context2.abrupt("return", _context2.sent);
|
32870
32887
|
|
32871
32888
|
case 10:
|
32872
32889
|
case "end":
|
32873
|
-
return
|
32890
|
+
return _context2.stop();
|
32874
32891
|
}
|
32875
32892
|
}
|
32876
|
-
},
|
32893
|
+
}, _callee2);
|
32877
32894
|
}));
|
32878
32895
|
return _gasCalculator.apply(this, arguments);
|
32879
32896
|
}
|