quais 0.1.13 → 0.1.15
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/dist/quais.esm.js +132 -70
- package/dist/quais.esm.js.map +1 -1
- package/dist/quais.esm.min.js +1 -1
- package/dist/quais.esm.min.js.map +1 -1
- package/dist/quais.umd.js +256 -179
- package/dist/quais.umd.js.map +1 -1
- package/dist/quais.umd.min.js +1 -1
- package/dist/quais.umd.min.js.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/quais.js +5 -1
- package/lib/quais.js.map +1 -1
- package/lib/utils.js +5 -1
- package/lib/utils.js.map +1 -1
- package/package.json +4 -4
package/dist/quais.umd.js
CHANGED
|
@@ -3656,7 +3656,7 @@
|
|
|
3656
3656
|
LogLevel["WARNING"] = "WARNING";
|
|
3657
3657
|
LogLevel["ERROR"] = "ERROR";
|
|
3658
3658
|
LogLevel["OFF"] = "OFF";
|
|
3659
|
-
})(LogLevel
|
|
3659
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
3660
3660
|
var ErrorCode;
|
|
3661
3661
|
(function (ErrorCode) {
|
|
3662
3662
|
///////////////////
|
|
@@ -3735,7 +3735,7 @@
|
|
|
3735
3735
|
// The user rejected the action, such as signing a message or sending
|
|
3736
3736
|
// a transaction
|
|
3737
3737
|
ErrorCode["ACTION_REJECTED"] = "ACTION_REJECTED";
|
|
3738
|
-
})(ErrorCode
|
|
3738
|
+
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
3739
3739
|
;
|
|
3740
3740
|
var HEX = "0123456789abcdef";
|
|
3741
3741
|
var Logger = /** @class */ (function () {
|
|
@@ -3808,8 +3808,8 @@
|
|
|
3808
3808
|
messageDetails.push(key + "=" + JSON.stringify(params[key].toString()));
|
|
3809
3809
|
}
|
|
3810
3810
|
});
|
|
3811
|
-
messageDetails.push("code="
|
|
3812
|
-
messageDetails.push("version="
|
|
3811
|
+
messageDetails.push("code=".concat(code));
|
|
3812
|
+
messageDetails.push("version=".concat(this.version));
|
|
3813
3813
|
var reason = message;
|
|
3814
3814
|
var url = "";
|
|
3815
3815
|
switch (code) {
|
|
@@ -4898,7 +4898,7 @@
|
|
|
4898
4898
|
return value;
|
|
4899
4899
|
}
|
|
4900
4900
|
if (typeof (value) === "number") {
|
|
4901
|
-
value = "fixed128x"
|
|
4901
|
+
value = "fixed128x".concat(value);
|
|
4902
4902
|
}
|
|
4903
4903
|
var signed = true;
|
|
4904
4904
|
var width = 128;
|
|
@@ -5180,7 +5180,7 @@
|
|
|
5180
5180
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
5181
5181
|
function step(op) {
|
|
5182
5182
|
if (f) throw new TypeError("Generator is already executing.");
|
|
5183
|
-
while (_) try {
|
|
5183
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
5184
5184
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
5185
5185
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
5186
5186
|
switch (op[0]) {
|
|
@@ -5296,7 +5296,7 @@
|
|
|
5296
5296
|
}
|
|
5297
5297
|
return true;
|
|
5298
5298
|
}
|
|
5299
|
-
return logger.throwArgumentError("Cannot deepCopy "
|
|
5299
|
+
return logger.throwArgumentError("Cannot deepCopy ".concat(typeof (object)), "object", object);
|
|
5300
5300
|
}
|
|
5301
5301
|
// Returns a new copy of object, such that no properties may be replaced.
|
|
5302
5302
|
// New properties may be added only to objects.
|
|
@@ -5319,7 +5319,7 @@
|
|
|
5319
5319
|
}
|
|
5320
5320
|
return result;
|
|
5321
5321
|
}
|
|
5322
|
-
return logger.throwArgumentError("Cannot deepCopy "
|
|
5322
|
+
return logger.throwArgumentError("Cannot deepCopy ".concat(typeof (object)), "object", object);
|
|
5323
5323
|
}
|
|
5324
5324
|
function deepCopy(object) {
|
|
5325
5325
|
return _deepCopy(object);
|
|
@@ -5402,7 +5402,7 @@
|
|
|
5402
5402
|
function parseParamType(param, allowIndexed) {
|
|
5403
5403
|
var originalParam = param;
|
|
5404
5404
|
function throwError(i) {
|
|
5405
|
-
logger.throwArgumentError("unexpected character at position "
|
|
5405
|
+
logger.throwArgumentError("unexpected character at position ".concat(i), "param", param);
|
|
5406
5406
|
}
|
|
5407
5407
|
param = param.replace(/\s/g, " ");
|
|
5408
5408
|
function newNode(parent) {
|
|
@@ -6131,7 +6131,7 @@
|
|
|
6131
6131
|
function checkForbidden(fragment) {
|
|
6132
6132
|
var sig = fragment.format();
|
|
6133
6133
|
if (sig === "Error(string)" || sig === "Panic(uint256)") {
|
|
6134
|
-
logger.throwArgumentError("cannot specify user defined "
|
|
6134
|
+
logger.throwArgumentError("cannot specify user defined ".concat(sig, " error"), "fragment", fragment);
|
|
6135
6135
|
}
|
|
6136
6136
|
return fragment;
|
|
6137
6137
|
}
|
|
@@ -6215,7 +6215,7 @@
|
|
|
6215
6215
|
var regexIdentifier = new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");
|
|
6216
6216
|
function verifyIdentifier(value) {
|
|
6217
6217
|
if (!value || !value.match(regexIdentifier)) {
|
|
6218
|
-
logger.throwArgumentError("invalid identifier \""
|
|
6218
|
+
logger.throwArgumentError("invalid identifier \"".concat(value, "\""), "value", value);
|
|
6219
6219
|
}
|
|
6220
6220
|
return value;
|
|
6221
6221
|
}
|
|
@@ -8056,7 +8056,7 @@
|
|
|
8056
8056
|
UnicodeNormalizationForm["NFD"] = "NFD";
|
|
8057
8057
|
UnicodeNormalizationForm["NFKC"] = "NFKC";
|
|
8058
8058
|
UnicodeNormalizationForm["NFKD"] = "NFKD";
|
|
8059
|
-
})(UnicodeNormalizationForm
|
|
8059
|
+
})(UnicodeNormalizationForm || (exports.UnicodeNormalizationForm = UnicodeNormalizationForm = {}));
|
|
8060
8060
|
;
|
|
8061
8061
|
var Utf8ErrorReason;
|
|
8062
8062
|
(function (Utf8ErrorReason) {
|
|
@@ -8084,10 +8084,10 @@
|
|
|
8084
8084
|
// - offset = start of this codepoint
|
|
8085
8085
|
// - badCodepoint = the computed codepoint; already bounds checked
|
|
8086
8086
|
Utf8ErrorReason["OVERLONG"] = "overlong representation";
|
|
8087
|
-
})(Utf8ErrorReason
|
|
8087
|
+
})(Utf8ErrorReason || (exports.Utf8ErrorReason = Utf8ErrorReason = {}));
|
|
8088
8088
|
;
|
|
8089
8089
|
function errorFunc(reason, offset, bytes, output, badCodepoint) {
|
|
8090
|
-
return logger.throwArgumentError("invalid codepoint at offset "
|
|
8090
|
+
return logger.throwArgumentError("invalid codepoint at offset ".concat(offset, "; ").concat(reason), "bytes", bytes);
|
|
8091
8091
|
}
|
|
8092
8092
|
function ignoreFunc(reason, offset, bytes, output, badCodepoint) {
|
|
8093
8093
|
// If there is an invalid prefix (including stray continuation), skip any additional continuation bytes
|
|
@@ -9241,7 +9241,7 @@
|
|
|
9241
9241
|
}
|
|
9242
9242
|
}
|
|
9243
9243
|
catch (err) {
|
|
9244
|
-
throw new Error("Invalid label \""
|
|
9244
|
+
throw new Error("Invalid label \"".concat(label, "\": ").concat(err.message));
|
|
9245
9245
|
}
|
|
9246
9246
|
}
|
|
9247
9247
|
return name;
|
|
@@ -9273,7 +9273,7 @@
|
|
|
9273
9273
|
output.push.apply(output, cps);
|
|
9274
9274
|
continue;
|
|
9275
9275
|
}
|
|
9276
|
-
throw new Error("Disallowed codepoint: 0x"
|
|
9276
|
+
throw new Error("Disallowed codepoint: 0x".concat(cp.toString(16).toUpperCase()));
|
|
9277
9277
|
}
|
|
9278
9278
|
return ens_normalize_post_check(nfc(String.fromCodePoint.apply(String, output)));
|
|
9279
9279
|
}
|
|
@@ -9453,7 +9453,7 @@
|
|
|
9453
9453
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
9454
9454
|
function step(op) {
|
|
9455
9455
|
if (f) throw new TypeError("Generator is already executing.");
|
|
9456
|
-
while (_) try {
|
|
9456
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
9457
9457
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
9458
9458
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
9459
9459
|
switch (op[0]) {
|
|
@@ -9514,7 +9514,7 @@
|
|
|
9514
9514
|
function checkString(key) {
|
|
9515
9515
|
return function (value) {
|
|
9516
9516
|
if (typeof (value) !== "string") {
|
|
9517
|
-
logger.throwArgumentError("invalid domain value for "
|
|
9517
|
+
logger.throwArgumentError("invalid domain value for ".concat(JSON.stringify(key)), "domain.".concat(key), value);
|
|
9518
9518
|
}
|
|
9519
9519
|
return value;
|
|
9520
9520
|
};
|
|
@@ -9563,7 +9563,7 @@
|
|
|
9563
9563
|
return function (value) {
|
|
9564
9564
|
var v = lib$2.BigNumber.from(value);
|
|
9565
9565
|
if (v.lt(boundsLower_1) || v.gt(boundsUpper_1)) {
|
|
9566
|
-
logger.throwArgumentError("value out-of-bounds for "
|
|
9566
|
+
logger.throwArgumentError("value out-of-bounds for ".concat(type), "value", value);
|
|
9567
9567
|
}
|
|
9568
9568
|
return (0, lib$1.hexZeroPad)(v.toTwos(256).toHexString(), 32);
|
|
9569
9569
|
};
|
|
@@ -9580,7 +9580,7 @@
|
|
|
9580
9580
|
return function (value) {
|
|
9581
9581
|
var bytes = (0, lib$1.arrayify)(value);
|
|
9582
9582
|
if (bytes.length !== width_1) {
|
|
9583
|
-
logger.throwArgumentError("invalid length for "
|
|
9583
|
+
logger.throwArgumentError("invalid length for ".concat(type), "value", value);
|
|
9584
9584
|
}
|
|
9585
9585
|
return hexPadRight(value);
|
|
9586
9586
|
};
|
|
@@ -9603,10 +9603,10 @@
|
|
|
9603
9603
|
return null;
|
|
9604
9604
|
}
|
|
9605
9605
|
function encodeType(name, fields) {
|
|
9606
|
-
return name
|
|
9606
|
+
return "".concat(name, "(").concat(fields.map(function (_a) {
|
|
9607
9607
|
var name = _a.name, type = _a.type;
|
|
9608
9608
|
return (type + " " + name);
|
|
9609
|
-
}).join(",")
|
|
9609
|
+
}).join(","), ")");
|
|
9610
9610
|
}
|
|
9611
9611
|
var TypedDataEncoder = /** @class */ (function () {
|
|
9612
9612
|
function TypedDataEncoder(types) {
|
|
@@ -9629,13 +9629,13 @@
|
|
|
9629
9629
|
types[name_1].forEach(function (field) {
|
|
9630
9630
|
// Check each field has a unique name
|
|
9631
9631
|
if (uniqueNames[field.name]) {
|
|
9632
|
-
logger.throwArgumentError("duplicate variable name "
|
|
9632
|
+
logger.throwArgumentError("duplicate variable name ".concat(JSON.stringify(field.name), " in ").concat(JSON.stringify(name_1)), "types", types);
|
|
9633
9633
|
}
|
|
9634
9634
|
uniqueNames[field.name] = true;
|
|
9635
9635
|
// Get the base type (drop any array specifiers)
|
|
9636
9636
|
var baseType = field.type.match(/^([^\x5b]*)(\x5b|$)/)[1];
|
|
9637
9637
|
if (baseType === name_1) {
|
|
9638
|
-
logger.throwArgumentError("circular type reference to "
|
|
9638
|
+
logger.throwArgumentError("circular type reference to ".concat(JSON.stringify(baseType)), "types", types);
|
|
9639
9639
|
}
|
|
9640
9640
|
// Is this a base encoding type?
|
|
9641
9641
|
var encoder = getBaseEncoder(baseType);
|
|
@@ -9643,7 +9643,7 @@
|
|
|
9643
9643
|
return;
|
|
9644
9644
|
}
|
|
9645
9645
|
if (!parents[baseType]) {
|
|
9646
|
-
logger.throwArgumentError("unknown type "
|
|
9646
|
+
logger.throwArgumentError("unknown type ".concat(JSON.stringify(baseType)), "types", types);
|
|
9647
9647
|
}
|
|
9648
9648
|
// Add linkage
|
|
9649
9649
|
parents[baseType].push(name_1);
|
|
@@ -9659,13 +9659,13 @@
|
|
|
9659
9659
|
logger.throwArgumentError("missing primary type", "types", types);
|
|
9660
9660
|
}
|
|
9661
9661
|
else if (primaryTypes.length > 1) {
|
|
9662
|
-
logger.throwArgumentError("ambiguous primary types or unused types: "
|
|
9662
|
+
logger.throwArgumentError("ambiguous primary types or unused types: ".concat(primaryTypes.map(function (t) { return (JSON.stringify(t)); }).join(", ")), "types", types);
|
|
9663
9663
|
}
|
|
9664
9664
|
(0, lib$3.defineReadOnly)(this, "primaryType", primaryTypes[0]);
|
|
9665
9665
|
// Check for circular type references
|
|
9666
9666
|
function checkCircular(type, found) {
|
|
9667
9667
|
if (found[type]) {
|
|
9668
|
-
logger.throwArgumentError("circular type reference to "
|
|
9668
|
+
logger.throwArgumentError("circular type reference to ".concat(JSON.stringify(type)), "types", types);
|
|
9669
9669
|
}
|
|
9670
9670
|
found[type] = true;
|
|
9671
9671
|
Object.keys(links[type]).forEach(function (child) {
|
|
@@ -9739,12 +9739,12 @@
|
|
|
9739
9739
|
return (0, lib$1.hexConcat)(values);
|
|
9740
9740
|
};
|
|
9741
9741
|
}
|
|
9742
|
-
return logger.throwArgumentError("unknown type: "
|
|
9742
|
+
return logger.throwArgumentError("unknown type: ".concat(type), "type", type);
|
|
9743
9743
|
};
|
|
9744
9744
|
TypedDataEncoder.prototype.encodeType = function (name) {
|
|
9745
9745
|
var result = this._types[name];
|
|
9746
9746
|
if (!result) {
|
|
9747
|
-
logger.throwArgumentError("unknown type: "
|
|
9747
|
+
logger.throwArgumentError("unknown type: ".concat(JSON.stringify(name)), "name", name);
|
|
9748
9748
|
}
|
|
9749
9749
|
return result;
|
|
9750
9750
|
};
|
|
@@ -9788,7 +9788,7 @@
|
|
|
9788
9788
|
return accum;
|
|
9789
9789
|
}, {});
|
|
9790
9790
|
}
|
|
9791
|
-
return logger.throwArgumentError("unknown type: "
|
|
9791
|
+
return logger.throwArgumentError("unknown type: ".concat(type), "type", type);
|
|
9792
9792
|
};
|
|
9793
9793
|
TypedDataEncoder.prototype.visit = function (value, callback) {
|
|
9794
9794
|
return this._visit(this.primaryType, value, callback);
|
|
@@ -9807,7 +9807,7 @@
|
|
|
9807
9807
|
for (var name_3 in domain) {
|
|
9808
9808
|
var type = domainFieldTypes[name_3];
|
|
9809
9809
|
if (!type) {
|
|
9810
|
-
logger.throwArgumentError("invalid typed-data domain key: "
|
|
9810
|
+
logger.throwArgumentError("invalid typed-data domain key: ".concat(JSON.stringify(name_3)), "domain", domain);
|
|
9811
9811
|
}
|
|
9812
9812
|
domainFields.push({ name: name_3, type: type });
|
|
9813
9813
|
}
|
|
@@ -9829,9 +9829,9 @@
|
|
|
9829
9829
|
// Replaces all address types with ENS names with their looked up address
|
|
9830
9830
|
TypedDataEncoder.resolveNames = function (domain, types, value, resolveName) {
|
|
9831
9831
|
return __awaiter(this, void 0, void 0, function () {
|
|
9832
|
-
var ensCache, encoder, _a, _b, _i, name_4,
|
|
9833
|
-
return __generator(this, function (
|
|
9834
|
-
switch (
|
|
9832
|
+
var ensCache, encoder, _a, _b, _c, _i, name_4, _d, _e;
|
|
9833
|
+
return __generator(this, function (_f) {
|
|
9834
|
+
switch (_f.label) {
|
|
9835
9835
|
case 0:
|
|
9836
9836
|
// Make a copy to isolate it from the object passed in
|
|
9837
9837
|
domain = (0, lib$3.shallowCopy)(domain);
|
|
@@ -9848,20 +9848,23 @@
|
|
|
9848
9848
|
}
|
|
9849
9849
|
return value;
|
|
9850
9850
|
});
|
|
9851
|
-
_a =
|
|
9852
|
-
|
|
9853
|
-
|
|
9851
|
+
_a = ensCache;
|
|
9852
|
+
_b = [];
|
|
9853
|
+
for (_c in _a)
|
|
9854
|
+
_b.push(_c);
|
|
9854
9855
|
_i = 0;
|
|
9855
|
-
|
|
9856
|
+
_f.label = 1;
|
|
9856
9857
|
case 1:
|
|
9857
|
-
if (!(_i <
|
|
9858
|
-
|
|
9859
|
-
_c
|
|
9860
|
-
|
|
9858
|
+
if (!(_i < _b.length)) return [3 /*break*/, 4];
|
|
9859
|
+
_c = _b[_i];
|
|
9860
|
+
if (!(_c in _a)) return [3 /*break*/, 3];
|
|
9861
|
+
name_4 = _c;
|
|
9862
|
+
_d = ensCache;
|
|
9863
|
+
_e = name_4;
|
|
9861
9864
|
return [4 /*yield*/, resolveName(name_4)];
|
|
9862
9865
|
case 2:
|
|
9863
|
-
|
|
9864
|
-
|
|
9866
|
+
_d[_e] = _f.sent();
|
|
9867
|
+
_f.label = 3;
|
|
9865
9868
|
case 3:
|
|
9866
9869
|
_i++;
|
|
9867
9870
|
return [3 /*break*/, 1];
|
|
@@ -10036,7 +10039,7 @@
|
|
|
10036
10039
|
"0x4e487b71": { signature: "Panic(uint256)", name: "Panic", inputs: ["uint256"] }
|
|
10037
10040
|
};
|
|
10038
10041
|
function wrapAccessError(property, error) {
|
|
10039
|
-
var wrap = new Error("deferred error during ABI decoding triggered accessing "
|
|
10042
|
+
var wrap = new Error("deferred error during ABI decoding triggered accessing ".concat(property));
|
|
10040
10043
|
wrap.error = error;
|
|
10041
10044
|
return wrap;
|
|
10042
10045
|
}
|
|
@@ -10055,8 +10058,8 @@
|
|
|
10055
10058
|
*/
|
|
10056
10059
|
var Interface = /** @class */ (function () {
|
|
10057
10060
|
function Interface(fragments$1) {
|
|
10058
|
-
var _newTarget = this.constructor;
|
|
10059
10061
|
var _this = this;
|
|
10062
|
+
var _newTarget = this.constructor;
|
|
10060
10063
|
var abi = [];
|
|
10061
10064
|
if (typeof (fragments$1) === "string") {
|
|
10062
10065
|
abi = JSON.parse(fragments$1);
|
|
@@ -10271,7 +10274,7 @@
|
|
|
10271
10274
|
}
|
|
10272
10275
|
var bytes = (0, lib$1.arrayify)(data);
|
|
10273
10276
|
if ((0, lib$1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(fragment)) {
|
|
10274
|
-
logger.throwArgumentError("data signature does not match error "
|
|
10277
|
+
logger.throwArgumentError("data signature does not match error ".concat(fragment.name, "."), "data", (0, lib$1.hexlify)(bytes));
|
|
10275
10278
|
}
|
|
10276
10279
|
return this._decodeParams(fragment.inputs, bytes.slice(4));
|
|
10277
10280
|
};
|
|
@@ -10291,7 +10294,7 @@
|
|
|
10291
10294
|
}
|
|
10292
10295
|
var bytes = (0, lib$1.arrayify)(data);
|
|
10293
10296
|
if ((0, lib$1.hexlify)(bytes.slice(0, 4)) !== this.getSighash(functionFragment)) {
|
|
10294
|
-
logger.throwArgumentError("data signature does not match function "
|
|
10297
|
+
logger.throwArgumentError("data signature does not match function ".concat(functionFragment.name, "."), "data", (0, lib$1.hexlify)(bytes));
|
|
10295
10298
|
}
|
|
10296
10299
|
return this._decodeParams(functionFragment.inputs, bytes.slice(4));
|
|
10297
10300
|
};
|
|
@@ -10334,10 +10337,10 @@
|
|
|
10334
10337
|
reason = errorArgs[0];
|
|
10335
10338
|
}
|
|
10336
10339
|
if (errorName === "Error") {
|
|
10337
|
-
message = "; VM Exception while processing transaction: reverted with reason string "
|
|
10340
|
+
message = "; VM Exception while processing transaction: reverted with reason string ".concat(JSON.stringify(errorArgs[0]));
|
|
10338
10341
|
}
|
|
10339
10342
|
else if (errorName === "Panic") {
|
|
10340
|
-
message = "; VM Exception while processing transaction: reverted with panic code "
|
|
10343
|
+
message = "; VM Exception while processing transaction: reverted with panic code ".concat(errorArgs[0]);
|
|
10341
10344
|
}
|
|
10342
10345
|
}
|
|
10343
10346
|
else {
|
|
@@ -10538,7 +10541,7 @@
|
|
|
10538
10541
|
if (value_1 instanceof Error) {
|
|
10539
10542
|
Object.defineProperty(result, param.name, {
|
|
10540
10543
|
enumerable: true,
|
|
10541
|
-
get: function () { throw wrapAccessError("property "
|
|
10544
|
+
get: function () { throw wrapAccessError("property ".concat(JSON.stringify(param.name)), value_1); }
|
|
10542
10545
|
});
|
|
10543
10546
|
}
|
|
10544
10547
|
else {
|
|
@@ -10551,7 +10554,7 @@
|
|
|
10551
10554
|
if (value instanceof Error) {
|
|
10552
10555
|
Object.defineProperty(result, i, {
|
|
10553
10556
|
enumerable: true,
|
|
10554
|
-
get: function () { throw wrapAccessError("index "
|
|
10557
|
+
get: function () { throw wrapAccessError("index ".concat(i), value); }
|
|
10555
10558
|
});
|
|
10556
10559
|
}
|
|
10557
10560
|
};
|
|
@@ -10701,7 +10704,7 @@
|
|
|
10701
10704
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
10702
10705
|
function step(op) {
|
|
10703
10706
|
if (f) throw new TypeError("Generator is already executing.");
|
|
10704
|
-
while (_) try {
|
|
10707
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
10705
10708
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10706
10709
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
10707
10710
|
switch (op[0]) {
|
|
@@ -10748,17 +10751,15 @@
|
|
|
10748
10751
|
var BlockForkEvent = /** @class */ (function (_super) {
|
|
10749
10752
|
__extends(BlockForkEvent, _super);
|
|
10750
10753
|
function BlockForkEvent(blockHash, expiry) {
|
|
10751
|
-
var _this = this;
|
|
10752
10754
|
if (!(0, lib$1.isHexString)(blockHash, 32)) {
|
|
10753
10755
|
logger.throwArgumentError("invalid blockHash", "blockHash", blockHash);
|
|
10754
10756
|
}
|
|
10755
|
-
|
|
10757
|
+
return _super.call(this, {
|
|
10756
10758
|
_isForkEvent: true,
|
|
10757
10759
|
_isBlockForkEvent: true,
|
|
10758
10760
|
expiry: (expiry || 0),
|
|
10759
10761
|
blockHash: blockHash
|
|
10760
10762
|
}) || this;
|
|
10761
|
-
return _this;
|
|
10762
10763
|
}
|
|
10763
10764
|
return BlockForkEvent;
|
|
10764
10765
|
}(ForkEvent));
|
|
@@ -10766,17 +10767,15 @@
|
|
|
10766
10767
|
var TransactionForkEvent = /** @class */ (function (_super) {
|
|
10767
10768
|
__extends(TransactionForkEvent, _super);
|
|
10768
10769
|
function TransactionForkEvent(hash, expiry) {
|
|
10769
|
-
var _this = this;
|
|
10770
10770
|
if (!(0, lib$1.isHexString)(hash, 32)) {
|
|
10771
10771
|
logger.throwArgumentError("invalid transaction hash", "hash", hash);
|
|
10772
10772
|
}
|
|
10773
|
-
|
|
10773
|
+
return _super.call(this, {
|
|
10774
10774
|
_isForkEvent: true,
|
|
10775
10775
|
_isTransactionForkEvent: true,
|
|
10776
10776
|
expiry: (expiry || 0),
|
|
10777
10777
|
hash: hash
|
|
10778
10778
|
}) || this;
|
|
10779
|
-
return _this;
|
|
10780
10779
|
}
|
|
10781
10780
|
return TransactionForkEvent;
|
|
10782
10781
|
}(ForkEvent));
|
|
@@ -10784,21 +10783,19 @@
|
|
|
10784
10783
|
var TransactionOrderForkEvent = /** @class */ (function (_super) {
|
|
10785
10784
|
__extends(TransactionOrderForkEvent, _super);
|
|
10786
10785
|
function TransactionOrderForkEvent(beforeHash, afterHash, expiry) {
|
|
10787
|
-
var _this = this;
|
|
10788
10786
|
if (!(0, lib$1.isHexString)(beforeHash, 32)) {
|
|
10789
10787
|
logger.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash);
|
|
10790
10788
|
}
|
|
10791
10789
|
if (!(0, lib$1.isHexString)(afterHash, 32)) {
|
|
10792
10790
|
logger.throwArgumentError("invalid transaction hash", "afterHash", afterHash);
|
|
10793
10791
|
}
|
|
10794
|
-
|
|
10792
|
+
return _super.call(this, {
|
|
10795
10793
|
_isForkEvent: true,
|
|
10796
10794
|
_isTransactionOrderForkEvent: true,
|
|
10797
10795
|
expiry: (expiry || 0),
|
|
10798
10796
|
beforeHash: beforeHash,
|
|
10799
10797
|
afterHash: afterHash
|
|
10800
10798
|
}) || this;
|
|
10801
|
-
return _this;
|
|
10802
10799
|
}
|
|
10803
10800
|
return TransactionOrderForkEvent;
|
|
10804
10801
|
}(ForkEvent));
|
|
@@ -10908,7 +10905,7 @@
|
|
|
10908
10905
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
10909
10906
|
function step(op) {
|
|
10910
10907
|
if (f) throw new TypeError("Generator is already executing.");
|
|
10911
|
-
while (_) try {
|
|
10908
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
10912
10909
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
10913
10910
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
10914
10911
|
switch (op[0]) {
|
|
@@ -11175,7 +11172,6 @@
|
|
|
11175
11172
|
case 2: return [4 /*yield*/, this.getFeeData()];
|
|
11176
11173
|
case 3:
|
|
11177
11174
|
feeData = _a.sent();
|
|
11178
|
-
console.log("FEE DATA:", feeData);
|
|
11179
11175
|
if (tx.type == null) {
|
|
11180
11176
|
// We need to auto-detect the intended type of this transaction...
|
|
11181
11177
|
if (feeData.maxFeePerGas != null && feeData.maxPriorityFeePerGas != null) {
|
|
@@ -18727,7 +18723,11 @@
|
|
|
18727
18723
|
"use strict";
|
|
18728
18724
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18729
18725
|
if (k2 === undefined) k2 = k;
|
|
18730
|
-
Object.
|
|
18726
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18727
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
18728
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18729
|
+
}
|
|
18730
|
+
Object.defineProperty(o, k2, desc);
|
|
18731
18731
|
}) : (function(o, m, k, k2) {
|
|
18732
18732
|
if (k2 === undefined) k2 = k;
|
|
18733
18733
|
o[k2] = m[k];
|
|
@@ -18761,7 +18761,7 @@
|
|
|
18761
18761
|
TransactionTypes[TransactionTypes["standard"] = 0] = "standard";
|
|
18762
18762
|
TransactionTypes[TransactionTypes["etx"] = 1] = "etx";
|
|
18763
18763
|
TransactionTypes[TransactionTypes["standardETx"] = 2] = "standardETx";
|
|
18764
|
-
})(TransactionTypes
|
|
18764
|
+
})(TransactionTypes || (exports.TransactionTypes = TransactionTypes = {}));
|
|
18765
18765
|
;
|
|
18766
18766
|
///////////////////////////////
|
|
18767
18767
|
function handleAddress(value) {
|
|
@@ -18797,7 +18797,7 @@
|
|
|
18797
18797
|
address: (0, lib$6.getAddress)(addr),
|
|
18798
18798
|
storageKeys: (storageKeys || []).map(function (storageKey, index) {
|
|
18799
18799
|
if ((0, lib$1.hexDataLength)(storageKey) !== 32) {
|
|
18800
|
-
logger.throwArgumentError("invalid access list storageKey", "accessList["
|
|
18800
|
+
logger.throwArgumentError("invalid access list storageKey", "accessList[".concat(addr, ":").concat(index, "]"), storageKey);
|
|
18801
18801
|
}
|
|
18802
18802
|
return storageKey.toLowerCase();
|
|
18803
18803
|
})
|
|
@@ -18808,7 +18808,7 @@
|
|
|
18808
18808
|
return value.map(function (set, index) {
|
|
18809
18809
|
if (Array.isArray(set)) {
|
|
18810
18810
|
if (set.length > 2) {
|
|
18811
|
-
logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value["
|
|
18811
|
+
logger.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[".concat(index, "]"), set);
|
|
18812
18812
|
}
|
|
18813
18813
|
return accessSetify(set[0], set[1]);
|
|
18814
18814
|
}
|
|
@@ -18833,6 +18833,7 @@
|
|
|
18833
18833
|
// If there is an explicit gasPrice, make sure it matches the
|
|
18834
18834
|
// EIP-1559 fees; otherwise they may not understand what they
|
|
18835
18835
|
// think they are setting in terms of fee.
|
|
18836
|
+
//console.log('Serializing tx: \n', JSON.stringify(transaction, null, 4));
|
|
18836
18837
|
if (transaction.gasPrice != null) {
|
|
18837
18838
|
var gasPrice = lib$2.BigNumber.from(transaction.gasPrice);
|
|
18838
18839
|
var maxFeePerGas = lib$2.BigNumber.from(transaction.maxFeePerGas || 0);
|
|
@@ -18860,6 +18861,7 @@
|
|
|
18860
18861
|
fields.push((0, lib$1.stripZeros)(sig.r));
|
|
18861
18862
|
fields.push((0, lib$1.stripZeros)(sig.s));
|
|
18862
18863
|
}
|
|
18864
|
+
//console.log('Encoding tx: \n', JSON.stringify(fields, null, 4));
|
|
18863
18865
|
return (0, lib$1.hexConcat)(["0x00", RLP.encode(fields)]);
|
|
18864
18866
|
}
|
|
18865
18867
|
function _serializeStandardETx(transaction, signature) {
|
|
@@ -18897,7 +18899,7 @@
|
|
|
18897
18899
|
default:
|
|
18898
18900
|
break;
|
|
18899
18901
|
}
|
|
18900
|
-
return logger.throwError("unsupported transaction type: "
|
|
18902
|
+
return logger.throwError("unsupported transaction type: ".concat(transaction.type), lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
18901
18903
|
operation: "serializeTransaction",
|
|
18902
18904
|
transactionType: transaction.type
|
|
18903
18905
|
});
|
|
@@ -18952,9 +18954,9 @@
|
|
|
18952
18954
|
}
|
|
18953
18955
|
function _parseStandardETx(payload) {
|
|
18954
18956
|
var transaction = RLP.decode(payload.slice(1));
|
|
18955
|
-
if (transaction.length !== 8 && transaction.length !== 17) {
|
|
18956
|
-
|
|
18957
|
-
}
|
|
18957
|
+
// if (transaction.length !== 8 && transaction.length !== 17) {
|
|
18958
|
+
// logger.throwArgumentError("invalid component count for transaction type: 1", "payload", hexlify(payload));
|
|
18959
|
+
// }
|
|
18958
18960
|
var maxPriorityFeePerGas = handleNumber(transaction[2]);
|
|
18959
18961
|
var maxFeePerGas = handleNumber(transaction[3]);
|
|
18960
18962
|
var tx = {
|
|
@@ -18994,7 +18996,7 @@
|
|
|
18994
18996
|
default:
|
|
18995
18997
|
break;
|
|
18996
18998
|
}
|
|
18997
|
-
return logger.throwError("unsupported transaction type: "
|
|
18999
|
+
return logger.throwError("unsupported transaction type: ".concat(payload[0]), lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
18998
19000
|
operation: "parseTransaction",
|
|
18999
19001
|
transactionType: payload[0]
|
|
19000
19002
|
});
|
|
@@ -19047,7 +19049,7 @@
|
|
|
19047
19049
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
19048
19050
|
function step(op) {
|
|
19049
19051
|
if (f) throw new TypeError("Generator is already executing.");
|
|
19050
|
-
while (_) try {
|
|
19052
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
19051
19053
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19052
19054
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19053
19055
|
switch (op[0]) {
|
|
@@ -19299,7 +19301,7 @@
|
|
|
19299
19301
|
delete overrides.ccipReadEnabled;
|
|
19300
19302
|
leftovers = Object.keys(overrides).filter(function (key) { return overrides[key] != null; });
|
|
19301
19303
|
if (leftovers.length) {
|
|
19302
|
-
logger.throwError("cannot override "
|
|
19304
|
+
logger.throwError("cannot override ".concat(leftovers.map(function (l) { return JSON.stringify(l); }).join(",")), lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
19303
19305
|
operation: "overrides",
|
|
19304
19306
|
overrides: leftovers,
|
|
19305
19307
|
});
|
|
@@ -19644,8 +19646,8 @@
|
|
|
19644
19646
|
}(RunningEvent));
|
|
19645
19647
|
var BaseContract = /** @class */ (function () {
|
|
19646
19648
|
function BaseContract(addressOrName, contractInterface, signerOrProvider) {
|
|
19647
|
-
var _newTarget = this.constructor;
|
|
19648
19649
|
var _this = this;
|
|
19650
|
+
var _newTarget = this.constructor;
|
|
19649
19651
|
// @TODO: Maybe still check the addressOrName looks like a valid address or name?
|
|
19650
19652
|
//address = getAddress(address);
|
|
19651
19653
|
(0, lib$3.defineReadOnly)(this, "interface", (0, lib$3.getStatic)(_newTarget, "getInterface")(contractInterface));
|
|
@@ -19694,7 +19696,7 @@
|
|
|
19694
19696
|
(0, lib$3.defineReadOnly)(_this.filters, name, _this.filters[filters[0]]);
|
|
19695
19697
|
}
|
|
19696
19698
|
else {
|
|
19697
|
-
logger.warn("Duplicate definition of "
|
|
19699
|
+
logger.warn("Duplicate definition of ".concat(name, " (").concat(filters.join(", "), ")"));
|
|
19698
19700
|
}
|
|
19699
19701
|
});
|
|
19700
19702
|
}
|
|
@@ -19727,7 +19729,7 @@
|
|
|
19727
19729
|
// Check that the signature is unique; if not the ABI generation has
|
|
19728
19730
|
// not been cleaned or may be incorrectly generated
|
|
19729
19731
|
if (uniqueSignatures[signature]) {
|
|
19730
|
-
logger.warn("Duplicate ABI entry for "
|
|
19732
|
+
logger.warn("Duplicate ABI entry for ".concat(JSON.stringify(signature)));
|
|
19731
19733
|
return;
|
|
19732
19734
|
}
|
|
19733
19735
|
uniqueSignatures[signature] = true;
|
|
@@ -19735,10 +19737,10 @@
|
|
|
19735
19737
|
// are ambiguous
|
|
19736
19738
|
{
|
|
19737
19739
|
var name_1 = fragment.name;
|
|
19738
|
-
if (!uniqueNames["%"
|
|
19739
|
-
uniqueNames["%"
|
|
19740
|
+
if (!uniqueNames["%".concat(name_1)]) {
|
|
19741
|
+
uniqueNames["%".concat(name_1)] = [];
|
|
19740
19742
|
}
|
|
19741
|
-
uniqueNames["%"
|
|
19743
|
+
uniqueNames["%".concat(name_1)].push(signature);
|
|
19742
19744
|
}
|
|
19743
19745
|
if (_this[signature] == null) {
|
|
19744
19746
|
(0, lib$3.defineReadOnly)(_this, signature, buildDefault(_this, fragment, true));
|
|
@@ -20423,7 +20425,7 @@
|
|
|
20423
20425
|
(function (SupportedAlgorithm) {
|
|
20424
20426
|
SupportedAlgorithm["sha256"] = "sha256";
|
|
20425
20427
|
SupportedAlgorithm["sha512"] = "sha512";
|
|
20426
|
-
})(SupportedAlgorithm
|
|
20428
|
+
})(SupportedAlgorithm || (exports.SupportedAlgorithm = SupportedAlgorithm = {}));
|
|
20427
20429
|
;
|
|
20428
20430
|
|
|
20429
20431
|
});
|
|
@@ -21071,7 +21073,7 @@
|
|
|
21071
21073
|
if (typeof (index) !== "number" || index < 0 || index >= HardenedBit || index % 1) {
|
|
21072
21074
|
logger.throwArgumentError("invalid account index", "index", index);
|
|
21073
21075
|
}
|
|
21074
|
-
return "m/44'/60'/"
|
|
21076
|
+
return "m/44'/60'/".concat(index, "'/0/0");
|
|
21075
21077
|
}
|
|
21076
21078
|
exports.getAccountPath = getAccountPath;
|
|
21077
21079
|
function getShardAddressChildNode(hdnode, path, startingIndex, shard) {
|
|
@@ -22751,7 +22753,7 @@
|
|
|
22751
22753
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
22752
22754
|
function step(op) {
|
|
22753
22755
|
if (f) throw new TypeError("Generator is already executing.");
|
|
22754
|
-
while (_) try {
|
|
22756
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
22755
22757
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
22756
22758
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
22757
22759
|
switch (op[0]) {
|
|
@@ -23192,7 +23194,7 @@
|
|
|
23192
23194
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
23193
23195
|
function step(op) {
|
|
23194
23196
|
if (f) throw new TypeError("Generator is already executing.");
|
|
23195
|
-
while (_) try {
|
|
23197
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
23196
23198
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
23197
23199
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23198
23200
|
switch (op[0]) {
|
|
@@ -23706,7 +23708,7 @@
|
|
|
23706
23708
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
23707
23709
|
function step(op) {
|
|
23708
23710
|
if (f) throw new TypeError("Generator is already executing.");
|
|
23709
|
-
while (_) try {
|
|
23711
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
23710
23712
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
23711
23713
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23712
23714
|
switch (op[0]) {
|
|
@@ -23820,7 +23822,7 @@
|
|
|
23820
23822
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
23821
23823
|
function step(op) {
|
|
23822
23824
|
if (f) throw new TypeError("Generator is already executing.");
|
|
23823
|
-
while (_) try {
|
|
23825
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
23824
23826
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
23825
23827
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
23826
23828
|
switch (op[0]) {
|
|
@@ -24305,41 +24307,44 @@
|
|
|
24305
24307
|
var address = this.address.bind(this);
|
|
24306
24308
|
var bigNumber = this.bigNumber.bind(this);
|
|
24307
24309
|
var bigNumberArray = this.bigNumberArray.bind(this);
|
|
24310
|
+
var numberArray = this.numberArray.bind(this);
|
|
24308
24311
|
var blockTag = this.blockTag.bind(this);
|
|
24309
24312
|
var data = this.data.bind(this);
|
|
24310
24313
|
var hash = this.hash.bind(this);
|
|
24311
24314
|
var hashArray = this.hashArray.bind(this);
|
|
24315
|
+
var hashArrayAnyLength = this.hashArrayAnyLength.bind(this);
|
|
24312
24316
|
var hex = this.hex.bind(this);
|
|
24313
24317
|
var number = this.number.bind(this);
|
|
24314
|
-
var
|
|
24318
|
+
var etxs = this.etxs.bind(this);
|
|
24315
24319
|
var strictData = function (v) { return _this.data(v, true); };
|
|
24316
24320
|
formats.transaction = {
|
|
24317
24321
|
hash: hash,
|
|
24318
|
-
type:
|
|
24322
|
+
type: hex,
|
|
24319
24323
|
accessList: Formatter.allowNull(this.accessList.bind(this), null),
|
|
24320
24324
|
blockHash: Formatter.allowNull(hash, null),
|
|
24321
24325
|
blockNumber: Formatter.allowNull(number, null),
|
|
24322
24326
|
transactionIndex: Formatter.allowNull(number, null),
|
|
24323
|
-
confirmations: Formatter.allowNull(number, null),
|
|
24324
24327
|
from: address,
|
|
24325
24328
|
// either (gasPrice) or (maxPriorityFeePerGas + maxFeePerGas)
|
|
24326
24329
|
// must be set
|
|
24327
24330
|
gasPrice: Formatter.allowNull(bigNumber),
|
|
24328
24331
|
maxPriorityFeePerGas: Formatter.allowNull(bigNumber),
|
|
24329
24332
|
maxFeePerGas: Formatter.allowNull(bigNumber),
|
|
24330
|
-
gasLimit: bigNumber,
|
|
24331
24333
|
to: Formatter.allowNull(address, null),
|
|
24332
24334
|
value: bigNumber,
|
|
24333
24335
|
nonce: number,
|
|
24334
|
-
data: data,
|
|
24335
|
-
r: Formatter.allowNull(
|
|
24336
|
-
s: Formatter.allowNull(
|
|
24337
|
-
v: Formatter.allowNull(
|
|
24338
|
-
creates: Formatter.allowNull(address, null),
|
|
24336
|
+
data: Formatter.allowNull(data),
|
|
24337
|
+
r: Formatter.allowNull(hex),
|
|
24338
|
+
s: Formatter.allowNull(hex),
|
|
24339
|
+
v: Formatter.allowNull(hex),
|
|
24339
24340
|
raw: Formatter.allowNull(data),
|
|
24340
24341
|
gas: Formatter.allowNull(bigNumber),
|
|
24341
|
-
|
|
24342
|
-
|
|
24342
|
+
//EXT TRANSACTIONS
|
|
24343
|
+
etxGasLimit: Formatter.allowNull(bigNumber),
|
|
24344
|
+
etxGasPrice: Formatter.allowNull(bigNumber),
|
|
24345
|
+
etxGasTip: Formatter.allowNull(bigNumber),
|
|
24346
|
+
etxData: Formatter.allowNull(data),
|
|
24347
|
+
etxAccessList: Formatter.allowNull(this.accessList.bind(this), null),
|
|
24343
24348
|
};
|
|
24344
24349
|
formats.transactionRequest = {
|
|
24345
24350
|
from: Formatter.allowNull(address),
|
|
@@ -24376,31 +24381,48 @@
|
|
|
24376
24381
|
// should be allowNull(hash), but broken-EIP-658 support is handled in receipt
|
|
24377
24382
|
root: Formatter.allowNull(hex),
|
|
24378
24383
|
gasUsed: bigNumber,
|
|
24379
|
-
logsBloom: Formatter.allowNull(
|
|
24384
|
+
logsBloom: Formatter.allowNull(hex),
|
|
24380
24385
|
blockHash: hash,
|
|
24381
24386
|
transactionHash: hash,
|
|
24382
|
-
|
|
24387
|
+
etxs: Formatter.allowNull(etxs, null),
|
|
24383
24388
|
logs: Formatter.arrayOf(this.receiptLog.bind(this)),
|
|
24384
24389
|
blockNumber: number,
|
|
24385
24390
|
confirmations: Formatter.allowNull(number, null),
|
|
24386
24391
|
cumulativeGasUsed: bigNumber,
|
|
24387
24392
|
effectiveGasPrice: Formatter.allowNull(bigNumber),
|
|
24388
|
-
status:
|
|
24389
|
-
type:
|
|
24393
|
+
status: hex,
|
|
24394
|
+
type: hex,
|
|
24390
24395
|
};
|
|
24391
24396
|
formats.block = {
|
|
24392
24397
|
hash: Formatter.allowNull(hash),
|
|
24393
24398
|
parentHash: hashArray,
|
|
24394
|
-
|
|
24399
|
+
parentEntropy: bigNumberArray,
|
|
24400
|
+
number: numberArray,
|
|
24395
24401
|
timestamp: number,
|
|
24396
24402
|
nonce: Formatter.allowNull(hex),
|
|
24397
24403
|
difficulty: bigNumber,
|
|
24398
24404
|
gasLimit: bigNumber,
|
|
24399
24405
|
gasUsed: bigNumber,
|
|
24406
|
+
baseFeePerGas: Formatter.allowNull(bigNumber),
|
|
24400
24407
|
miner: Formatter.allowNull(address),
|
|
24401
24408
|
extraData: data,
|
|
24402
24409
|
transactions: Formatter.allowNull(Formatter.arrayOf(hash)),
|
|
24403
|
-
|
|
24410
|
+
transactionsRoot: hash,
|
|
24411
|
+
extTransactions: Formatter.allowNull(Formatter.arrayOf(hash)),
|
|
24412
|
+
extRollupRoot: Formatter.allowNull(hash),
|
|
24413
|
+
extTransactionsRoot: Formatter.allowNull(hash),
|
|
24414
|
+
location: Formatter.allowNull(hex),
|
|
24415
|
+
manifestHash: hashArrayAnyLength,
|
|
24416
|
+
mixHash: hash,
|
|
24417
|
+
order: Number,
|
|
24418
|
+
parentDeltaS: bigNumberArray,
|
|
24419
|
+
receiptsRoot: hash,
|
|
24420
|
+
sha3Uncles: hash,
|
|
24421
|
+
size: bigNumber,
|
|
24422
|
+
stateRoot: hash,
|
|
24423
|
+
uncles: Formatter.allowNull(Formatter.arrayOf(hash)),
|
|
24424
|
+
subManifest: Formatter.allowNull(Formatter.arrayOf(hash)),
|
|
24425
|
+
totalEntropy: bigNumber,
|
|
24404
24426
|
};
|
|
24405
24427
|
formats.blockWithTransactions = (0, lib$3.shallowCopy)(formats.block);
|
|
24406
24428
|
formats.blockWithTransactions.transactions = Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this)));
|
|
@@ -24415,7 +24437,6 @@
|
|
|
24415
24437
|
blockNumber: Formatter.allowNull(number),
|
|
24416
24438
|
blockHash: Formatter.allowNull(hash),
|
|
24417
24439
|
transactionIndex: number,
|
|
24418
|
-
removed: Formatter.allowNull(this.boolean.bind(this)),
|
|
24419
24440
|
address: address,
|
|
24420
24441
|
data: Formatter.allowFalsish(data, "0x"),
|
|
24421
24442
|
topics: Formatter.arrayOf(hash),
|
|
@@ -24435,19 +24456,16 @@
|
|
|
24435
24456
|
}
|
|
24436
24457
|
return lib$2.BigNumber.from(number).toNumber();
|
|
24437
24458
|
};
|
|
24438
|
-
Formatter.prototype.type = function (number) {
|
|
24439
|
-
if (number === "0x" || number == null) {
|
|
24440
|
-
return 0;
|
|
24441
|
-
}
|
|
24442
|
-
return lib$2.BigNumber.from(number).toNumber();
|
|
24443
|
-
};
|
|
24444
24459
|
// Strict! Used on input.
|
|
24445
24460
|
Formatter.prototype.bigNumber = function (value) {
|
|
24446
24461
|
return lib$2.BigNumber.from(value);
|
|
24447
24462
|
};
|
|
24463
|
+
Formatter.prototype.numberArray = function (value) {
|
|
24464
|
+
return Array.from(value, function (item) { return (Number(item)); });
|
|
24465
|
+
};
|
|
24448
24466
|
// Strict! Used on input.
|
|
24449
24467
|
Formatter.prototype.bigNumberArray = function (value) {
|
|
24450
|
-
return Array.from(value);
|
|
24468
|
+
return Array.from(value, function (item) { return (lib$2.BigNumber.from(item)); });
|
|
24451
24469
|
};
|
|
24452
24470
|
// Requires a boolean, "true" or "false"; returns a boolean
|
|
24453
24471
|
Formatter.prototype.boolean = function (value) {
|
|
@@ -24488,8 +24506,30 @@
|
|
|
24488
24506
|
Formatter.prototype.address = function (value) {
|
|
24489
24507
|
return (0, lib$6.getAddress)(value);
|
|
24490
24508
|
};
|
|
24491
|
-
Formatter.prototype.
|
|
24492
|
-
|
|
24509
|
+
Formatter.prototype.etxs = function (value) {
|
|
24510
|
+
if (!Array.isArray(value)) {
|
|
24511
|
+
throw new Error("Value must be an array.");
|
|
24512
|
+
}
|
|
24513
|
+
var formattedEtxs = [];
|
|
24514
|
+
for (var i = 0; i < value.length; i++) {
|
|
24515
|
+
var etx = value[i];
|
|
24516
|
+
formattedEtxs.push({
|
|
24517
|
+
type: etx.type,
|
|
24518
|
+
nonce: Number(etx.nonce),
|
|
24519
|
+
gasPrice: Formatter.allowNull(this.bigNumber, null)(etx.gasPrice),
|
|
24520
|
+
maxPriorityFeePerGas: this.bigNumber(etx.maxPriorityFeePerGas),
|
|
24521
|
+
maxFeePerGas: this.bigNumber(etx.maxFeePerGas),
|
|
24522
|
+
gas: this.bigNumber(etx.gas),
|
|
24523
|
+
value: this.bigNumber(etx.value),
|
|
24524
|
+
data: this.data(etx.input),
|
|
24525
|
+
to: this.address(etx.to),
|
|
24526
|
+
accessList: Formatter.allowNull(this.accessList, null)(etx.accessList),
|
|
24527
|
+
chainId: Number(etx.chainId),
|
|
24528
|
+
from: this.address(etx.sender),
|
|
24529
|
+
hash: this.hash(etx.hash)
|
|
24530
|
+
});
|
|
24531
|
+
}
|
|
24532
|
+
return formattedEtxs;
|
|
24493
24533
|
};
|
|
24494
24534
|
Formatter.prototype.callAddress = function (value) {
|
|
24495
24535
|
if (!(0, lib$1.isHexString)(value, 32)) {
|
|
@@ -24546,6 +24586,18 @@
|
|
|
24546
24586
|
}
|
|
24547
24587
|
return results;
|
|
24548
24588
|
};
|
|
24589
|
+
Formatter.prototype.hashArrayAnyLength = function (value, strict) {
|
|
24590
|
+
if (value.length != HIERARCHY_DEPTH) {
|
|
24591
|
+
return logger.throwArgumentError("invalid hash array", "value", value);
|
|
24592
|
+
}
|
|
24593
|
+
var results = [];
|
|
24594
|
+
for (var _i = 0, value_2 = value; _i < value_2.length; _i++) {
|
|
24595
|
+
var hash = value_2[_i];
|
|
24596
|
+
var result = this.hex(hash, strict);
|
|
24597
|
+
results.push(result);
|
|
24598
|
+
}
|
|
24599
|
+
return results;
|
|
24600
|
+
};
|
|
24549
24601
|
// Returns the difficulty as a number, or if too large (i.e. PoA network) null
|
|
24550
24602
|
Formatter.prototype.difficulty = function (value) {
|
|
24551
24603
|
if (value == null) {
|
|
@@ -24564,7 +24616,7 @@
|
|
|
24564
24616
|
}
|
|
24565
24617
|
return (0, lib$1.hexZeroPad)(value, 32);
|
|
24566
24618
|
};
|
|
24567
|
-
Formatter.prototype._block = function (value, format, context) {
|
|
24619
|
+
Formatter.prototype._block = function (value, format, context, simplify) {
|
|
24568
24620
|
if (value.author != null && value.miner == null) {
|
|
24569
24621
|
value.miner = value.author;
|
|
24570
24622
|
}
|
|
@@ -24573,33 +24625,48 @@
|
|
|
24573
24625
|
var result = Formatter.check(format, value);
|
|
24574
24626
|
result._difficulty = ((difficulty == null) ? null : difficulty);
|
|
24575
24627
|
if (context) {
|
|
24576
|
-
return this.contextBlock(result, context);
|
|
24628
|
+
return this.contextBlock(result, context, simplify);
|
|
24577
24629
|
}
|
|
24578
24630
|
return result;
|
|
24579
24631
|
};
|
|
24580
|
-
Formatter.prototype.block = function (value, context) {
|
|
24581
|
-
return this._block(value, this.formats.block, context);
|
|
24632
|
+
Formatter.prototype.block = function (value, context, simplify) {
|
|
24633
|
+
return this._block(value, this.formats.block, context, simplify);
|
|
24582
24634
|
};
|
|
24583
24635
|
Formatter.prototype.blockWithTransactions = function (value) {
|
|
24584
24636
|
return this._block(value, this.formats.blockWithTransactions);
|
|
24585
24637
|
};
|
|
24586
|
-
Formatter.prototype.contextBlock = function (value, context) {
|
|
24638
|
+
Formatter.prototype.contextBlock = function (value, context, simplify) {
|
|
24639
|
+
if (simplify === void 0) { simplify = false; }
|
|
24587
24640
|
var contextBlock = {
|
|
24588
|
-
number: value.number[
|
|
24641
|
+
number: simplify ? value.number[2] : value.number,
|
|
24589
24642
|
transactions: value.transactions,
|
|
24590
24643
|
hash: value.hash,
|
|
24591
|
-
parentHash: value.parentHash[
|
|
24644
|
+
parentHash: simplify ? value.parentHash[2] : value.parentHash,
|
|
24645
|
+
parentEntropy: simplify ? value.parentEntropy[2] : value.parentEntropy,
|
|
24646
|
+
extTransactions: value.extTransactions,
|
|
24592
24647
|
timestamp: value.timestamp,
|
|
24593
24648
|
nonce: value.nonce,
|
|
24594
24649
|
difficulty: value.difficulty,
|
|
24595
|
-
_difficulty: value._difficulty,
|
|
24596
24650
|
gasLimit: value.gasLimit,
|
|
24597
24651
|
gasUsed: value.gasUsed,
|
|
24598
24652
|
miner: value.miner,
|
|
24599
|
-
extraData: value.
|
|
24653
|
+
extraData: value.extraData,
|
|
24600
24654
|
transactionsRoot: value.transactionsRoot,
|
|
24601
24655
|
stateRoot: value.stateRoot,
|
|
24602
|
-
receiptsRoot: value.receiptsRoot
|
|
24656
|
+
receiptsRoot: value.receiptsRoot,
|
|
24657
|
+
baseFeePerGas: value.baseFeePerGas,
|
|
24658
|
+
extRollupRoot: value.extRollupRoot,
|
|
24659
|
+
extTransactionsRoot: value.extTransactionsRoot,
|
|
24660
|
+
location: value.location,
|
|
24661
|
+
manifestHash: simplify ? value.manifestHash[2] : value.manifestHash,
|
|
24662
|
+
mixHash: value.mixHash,
|
|
24663
|
+
order: value.order,
|
|
24664
|
+
parentDeltaS: simplify ? value.parentDeltaS[2] : value.parentDeltaS,
|
|
24665
|
+
sha3Uncles: value.sha3Uncles,
|
|
24666
|
+
size: value.size,
|
|
24667
|
+
uncles: value.uncles,
|
|
24668
|
+
subManifest: value.subManifest,
|
|
24669
|
+
totalEntropy: value.totalEntropy,
|
|
24603
24670
|
};
|
|
24604
24671
|
return contextBlock;
|
|
24605
24672
|
};
|
|
@@ -24610,7 +24677,7 @@
|
|
|
24610
24677
|
Formatter.prototype.transactionResponse = function (transaction) {
|
|
24611
24678
|
// Rename gas to gasLimit
|
|
24612
24679
|
if (transaction.gas != null && transaction.gasLimit == null) {
|
|
24613
|
-
transaction.
|
|
24680
|
+
transaction.gas = transaction.gas;
|
|
24614
24681
|
}
|
|
24615
24682
|
// Some clients (TestRPC) do strange things like return 0x0 for the
|
|
24616
24683
|
// 0 address; correct this to be a real address
|
|
@@ -24621,11 +24688,11 @@
|
|
|
24621
24688
|
if (transaction.input != null && transaction.data == null) {
|
|
24622
24689
|
transaction.data = transaction.input;
|
|
24623
24690
|
}
|
|
24624
|
-
|
|
24625
|
-
|
|
24626
|
-
transaction.
|
|
24691
|
+
if (transaction.type == '0x1') {
|
|
24692
|
+
transaction.from = transaction.sender;
|
|
24693
|
+
delete transaction.sender;
|
|
24627
24694
|
}
|
|
24628
|
-
if ((transaction.type ===
|
|
24695
|
+
if ((transaction.type === '0x1' || transaction.type === '0x2') && transaction.accessList == null) {
|
|
24629
24696
|
transaction.accessList = [];
|
|
24630
24697
|
}
|
|
24631
24698
|
var result = Formatter.check(this.formats.transaction, transaction);
|
|
@@ -24675,13 +24742,13 @@
|
|
|
24675
24742
|
if (result.root != null) {
|
|
24676
24743
|
if (result.root.length <= 4) {
|
|
24677
24744
|
// Could be 0x00, 0x0, 0x01 or 0x1
|
|
24678
|
-
var
|
|
24679
|
-
if (
|
|
24745
|
+
var value_3 = lib$2.BigNumber.from(result.root).toNumber();
|
|
24746
|
+
if (value_3 === 0 || value_3 === 1) {
|
|
24680
24747
|
// Make sure if both are specified, they match
|
|
24681
|
-
if (result.status != null && (result.status !==
|
|
24748
|
+
if (result.status != null && (result.status !== value_3)) {
|
|
24682
24749
|
logger.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
|
24683
24750
|
}
|
|
24684
|
-
result.status =
|
|
24751
|
+
result.status = value_3;
|
|
24685
24752
|
delete result.root;
|
|
24686
24753
|
}
|
|
24687
24754
|
else {
|
|
@@ -24693,9 +24760,6 @@
|
|
|
24693
24760
|
logger.throwArgumentError("invalid root hash", "value.root", result.root);
|
|
24694
24761
|
}
|
|
24695
24762
|
}
|
|
24696
|
-
if (result.status != null) {
|
|
24697
|
-
result.byzantium = true;
|
|
24698
|
-
}
|
|
24699
24763
|
return result;
|
|
24700
24764
|
};
|
|
24701
24765
|
Formatter.prototype.topics = function (value) {
|
|
@@ -24831,7 +24895,7 @@
|
|
|
24831
24895
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
24832
24896
|
function step(op) {
|
|
24833
24897
|
if (f) throw new TypeError("Generator is already executing.");
|
|
24834
|
-
while (_) try {
|
|
24898
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
24835
24899
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
24836
24900
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
24837
24901
|
switch (op[0]) {
|
|
@@ -25081,7 +25145,7 @@
|
|
|
25081
25145
|
else {
|
|
25082
25146
|
logger.throwArgumentError("unsupported IPFS format", "link", link);
|
|
25083
25147
|
}
|
|
25084
|
-
return "https://gateway.ipfs.io/ipfs/"
|
|
25148
|
+
return "https://gateway.ipfs.io/ipfs/".concat(link);
|
|
25085
25149
|
}
|
|
25086
25150
|
function numPad(value) {
|
|
25087
25151
|
var result = (0, lib$1.arrayify)(value);
|
|
@@ -25212,8 +25276,8 @@
|
|
|
25212
25276
|
Resolver.prototype._getAddress = function (coinType, hexBytes) {
|
|
25213
25277
|
var coinInfo = coinInfos[String(coinType)];
|
|
25214
25278
|
if (coinInfo == null) {
|
|
25215
|
-
logger.throwError("unsupported coin type: "
|
|
25216
|
-
operation: "getAddress("
|
|
25279
|
+
logger.throwError("unsupported coin type: ".concat(coinType), lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
25280
|
+
operation: "getAddress(".concat(coinType, ")")
|
|
25217
25281
|
});
|
|
25218
25282
|
}
|
|
25219
25283
|
if (coinInfo.ilk === "eth") {
|
|
@@ -25293,7 +25357,7 @@
|
|
|
25293
25357
|
address = this._getAddress(coinType, hexBytes);
|
|
25294
25358
|
if (address == null) {
|
|
25295
25359
|
logger.throwError("invalid or unsupported coin data", lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
25296
|
-
operation: "getAddress("
|
|
25360
|
+
operation: "getAddress(".concat(coinType, ")"),
|
|
25297
25361
|
coinType: coinType,
|
|
25298
25362
|
data: hexBytes
|
|
25299
25363
|
});
|
|
@@ -25573,7 +25637,7 @@
|
|
|
25573
25637
|
_this._maxInternalBlockNumber = -1024;
|
|
25574
25638
|
_this._lastBlockNumber = -2;
|
|
25575
25639
|
_this._maxFilterBlockRange = 10;
|
|
25576
|
-
_this._pollingInterval =
|
|
25640
|
+
_this._pollingInterval = 40000;
|
|
25577
25641
|
_this._fastQueryDate = 0;
|
|
25578
25642
|
return _this;
|
|
25579
25643
|
}
|
|
@@ -25687,7 +25751,7 @@
|
|
|
25687
25751
|
errorMessage = (result.message || "unknown error");
|
|
25688
25752
|
// 4xx indicates the result is not present; stop
|
|
25689
25753
|
if (result.status >= 400 && result.status < 500) {
|
|
25690
|
-
return [2 /*return*/, logger.throwError("response not found during CCIP fetch: "
|
|
25754
|
+
return [2 /*return*/, logger.throwError("response not found during CCIP fetch: ".concat(errorMessage), lib.Logger.errors.SERVER_ERROR, { url: url, errorMessage: errorMessage })];
|
|
25691
25755
|
}
|
|
25692
25756
|
// 5xx indicates server issue; try the next url
|
|
25693
25757
|
errorMessages.push(errorMessage);
|
|
@@ -25695,7 +25759,7 @@
|
|
|
25695
25759
|
case 3:
|
|
25696
25760
|
i++;
|
|
25697
25761
|
return [3 /*break*/, 1];
|
|
25698
|
-
case 4: return [2 /*return*/, logger.throwError("error encountered during CCIP fetch: "
|
|
25762
|
+
case 4: return [2 /*return*/, logger.throwError("error encountered during CCIP fetch: ".concat(errorMessages.map(function (m) { return JSON.stringify(m); }).join(", ")), lib.Logger.errors.SERVER_ERROR, {
|
|
25699
25763
|
urls: urls,
|
|
25700
25764
|
errorMessages: errorMessages
|
|
25701
25765
|
})];
|
|
@@ -25784,11 +25848,9 @@
|
|
|
25784
25848
|
var _this = this;
|
|
25785
25849
|
return __generator(this, function (_a) {
|
|
25786
25850
|
switch (_a.label) {
|
|
25787
|
-
case 0:
|
|
25788
|
-
|
|
25789
|
-
|
|
25790
|
-
blockNumber = null;
|
|
25791
|
-
_a.label = 1;
|
|
25851
|
+
case 0:
|
|
25852
|
+
// Polling is now disabled
|
|
25853
|
+
return [2 /*return*/];
|
|
25792
25854
|
case 1:
|
|
25793
25855
|
_a.trys.push([1, 3, , 4]);
|
|
25794
25856
|
return [4 /*yield*/, this._getInternalBlockNumber(100 + this.pollingInterval / 2)];
|
|
@@ -25813,7 +25875,7 @@
|
|
|
25813
25875
|
this._emitted.block = blockNumber - 1;
|
|
25814
25876
|
}
|
|
25815
25877
|
if (Math.abs((this._emitted.block) - blockNumber) > 1000) {
|
|
25816
|
-
logger.warn("network block skew detected; skipping block events (emitted="
|
|
25878
|
+
logger.warn("network block skew detected; skipping block events (emitted=".concat(this._emitted.block, " blockNumber").concat(blockNumber, ")"));
|
|
25817
25879
|
this.emit("error", logger.makeError("network block skew detected", lib.Logger.errors.NETWORK_ERROR, {
|
|
25818
25880
|
blockNumber: blockNumber,
|
|
25819
25881
|
event: "blockSkew",
|
|
@@ -26797,7 +26859,7 @@
|
|
|
26797
26859
|
address = _a.sent();
|
|
26798
26860
|
if (address == null) {
|
|
26799
26861
|
logger.throwError("ENS name not configured", lib.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
26800
|
-
operation: "resolveName("
|
|
26862
|
+
operation: "resolveName(".concat(JSON.stringify(addressOrName), ")")
|
|
26801
26863
|
});
|
|
26802
26864
|
}
|
|
26803
26865
|
return [2 /*return*/, address];
|
|
@@ -26805,7 +26867,7 @@
|
|
|
26805
26867
|
});
|
|
26806
26868
|
});
|
|
26807
26869
|
};
|
|
26808
|
-
BaseProvider.prototype._getBlock = function (blockHashOrBlockTag, includeTransactions) {
|
|
26870
|
+
BaseProvider.prototype._getBlock = function (blockHashOrBlockTag, includeTransactions, simplify) {
|
|
26809
26871
|
return __awaiter(this, void 0, void 0, function () {
|
|
26810
26872
|
var blockNumber, params, _a, error_9;
|
|
26811
26873
|
var _this = this;
|
|
@@ -26819,7 +26881,8 @@
|
|
|
26819
26881
|
blockHashOrBlockTag = _b.sent();
|
|
26820
26882
|
blockNumber = -128;
|
|
26821
26883
|
params = {
|
|
26822
|
-
includeTransactions: !!includeTransactions
|
|
26884
|
+
includeTransactions: !!includeTransactions,
|
|
26885
|
+
simplify: !!simplify
|
|
26823
26886
|
};
|
|
26824
26887
|
if (!(0, lib$1.isHexString)(blockHashOrBlockTag, 32)) return [3 /*break*/, 3];
|
|
26825
26888
|
params.blockHash = blockHashOrBlockTag;
|
|
@@ -26858,7 +26921,7 @@
|
|
|
26858
26921
|
}
|
|
26859
26922
|
// For block tags, if we are asking for a future block, we return null
|
|
26860
26923
|
if (params.blockTag != null) {
|
|
26861
|
-
if (blockNumber > this._emitted.block) {
|
|
26924
|
+
if (blockNumber > Number(this._emitted.block)) {
|
|
26862
26925
|
return [2 /*return*/, null];
|
|
26863
26926
|
}
|
|
26864
26927
|
}
|
|
@@ -26896,7 +26959,7 @@
|
|
|
26896
26959
|
blockWithTxs = this.formatter.blockWithTransactions(block);
|
|
26897
26960
|
blockWithTxs.transactions = blockWithTxs.transactions.map(function (tx) { return _this._wrapTransaction(tx); });
|
|
26898
26961
|
return [2 /*return*/, blockWithTxs];
|
|
26899
|
-
case 8: return [2 /*return*/, this.formatter.block(block, this._context)];
|
|
26962
|
+
case 8: return [2 /*return*/, this.formatter.block(block, this._context, simplify)];
|
|
26900
26963
|
}
|
|
26901
26964
|
});
|
|
26902
26965
|
}); }, { oncePoll: this })];
|
|
@@ -26904,11 +26967,13 @@
|
|
|
26904
26967
|
});
|
|
26905
26968
|
});
|
|
26906
26969
|
};
|
|
26907
|
-
BaseProvider.prototype.getBlock = function (blockHashOrBlockTag) {
|
|
26908
|
-
|
|
26970
|
+
BaseProvider.prototype.getBlock = function (blockHashOrBlockTag, simplify) {
|
|
26971
|
+
if (simplify === void 0) { simplify = false; }
|
|
26972
|
+
return (this._getBlock(blockHashOrBlockTag, false, simplify));
|
|
26909
26973
|
};
|
|
26910
|
-
BaseProvider.prototype.getBlockWithTransactions = function (blockHashOrBlockTag) {
|
|
26911
|
-
|
|
26974
|
+
BaseProvider.prototype.getBlockWithTransactions = function (blockHashOrBlockTag, simplify) {
|
|
26975
|
+
if (simplify === void 0) { simplify = false; }
|
|
26976
|
+
return (this._getBlock(blockHashOrBlockTag, true, simplify));
|
|
26912
26977
|
};
|
|
26913
26978
|
BaseProvider.prototype.getTransaction = function (transactionHash) {
|
|
26914
26979
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -27438,7 +27503,7 @@
|
|
|
27438
27503
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
27439
27504
|
function step(op) {
|
|
27440
27505
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27441
|
-
while (_) try {
|
|
27506
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
27442
27507
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
27443
27508
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
27444
27509
|
switch (op[0]) {
|
|
@@ -28368,7 +28433,7 @@
|
|
|
28368
28433
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28369
28434
|
function step(op) {
|
|
28370
28435
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28371
|
-
while (_) try {
|
|
28436
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28372
28437
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
28373
28438
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
28374
28439
|
switch (op[0]) {
|
|
@@ -28757,7 +28822,7 @@
|
|
|
28757
28822
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
28758
28823
|
function step(op) {
|
|
28759
28824
|
if (f) throw new TypeError("Generator is already executing.");
|
|
28760
|
-
while (_) try {
|
|
28825
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28761
28826
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
28762
28827
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
28763
28828
|
switch (op[0]) {
|
|
@@ -28833,8 +28898,8 @@
|
|
|
28833
28898
|
var UrlJsonRpcProvider = /** @class */ (function (_super) {
|
|
28834
28899
|
__extends(UrlJsonRpcProvider, _super);
|
|
28835
28900
|
function UrlJsonRpcProvider(network, apiKey) {
|
|
28836
|
-
var _newTarget = this.constructor;
|
|
28837
28901
|
var _this = this;
|
|
28902
|
+
var _newTarget = this.constructor;
|
|
28838
28903
|
logger.checkAbstract(_newTarget, UrlJsonRpcProvider);
|
|
28839
28904
|
// Normalize the Network and API Key
|
|
28840
28905
|
network = (0, lib$3.getStatic)(_newTarget, "getNetwork")(network);
|
|
@@ -29116,7 +29181,7 @@
|
|
|
29116
29181
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29117
29182
|
function step(op) {
|
|
29118
29183
|
if (f) throw new TypeError("Generator is already executing.");
|
|
29119
|
-
while (_) try {
|
|
29184
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29120
29185
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29121
29186
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
29122
29187
|
switch (op[0]) {
|
|
@@ -29221,7 +29286,7 @@
|
|
|
29221
29286
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29222
29287
|
function step(op) {
|
|
29223
29288
|
if (f) throw new TypeError("Generator is already executing.");
|
|
29224
|
-
while (_) try {
|
|
29289
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29225
29290
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29226
29291
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
29227
29292
|
switch (op[0]) {
|
|
@@ -29270,7 +29335,7 @@
|
|
|
29270
29335
|
}
|
|
29271
29336
|
else if (key === "accessList") {
|
|
29272
29337
|
value = "[" + (0, lib$h.accessListify)(value).map(function (set) {
|
|
29273
|
-
return "{address:\""
|
|
29338
|
+
return "{address:\"".concat(set.address, "\",storageKeys:[\"").concat(set.storageKeys.join('","'), "\"]}");
|
|
29274
29339
|
}).join(",") + "]";
|
|
29275
29340
|
}
|
|
29276
29341
|
else {
|
|
@@ -29436,15 +29501,15 @@
|
|
|
29436
29501
|
var query = Object.keys(params).reduce(function (accum, key) {
|
|
29437
29502
|
var value = params[key];
|
|
29438
29503
|
if (value != null) {
|
|
29439
|
-
accum += "&"
|
|
29504
|
+
accum += "&".concat(key, "=").concat(value);
|
|
29440
29505
|
}
|
|
29441
29506
|
return accum;
|
|
29442
29507
|
}, "");
|
|
29443
|
-
var apiKey = ((this.apiKey) ? "&apikey="
|
|
29444
|
-
return this.baseUrl
|
|
29508
|
+
var apiKey = ((this.apiKey) ? "&apikey=".concat(this.apiKey) : "");
|
|
29509
|
+
return "".concat(this.baseUrl, "/api?module=").concat(module).concat(query).concat(apiKey);
|
|
29445
29510
|
};
|
|
29446
29511
|
EtherscanProvider.prototype.getPostUrl = function () {
|
|
29447
|
-
return this.baseUrl
|
|
29512
|
+
return "".concat(this.baseUrl, "/api");
|
|
29448
29513
|
};
|
|
29449
29514
|
EtherscanProvider.prototype.getPostData = function (module, params) {
|
|
29450
29515
|
params.module = module;
|
|
@@ -29480,7 +29545,7 @@
|
|
|
29480
29545
|
if (payload) {
|
|
29481
29546
|
connection.headers = { "content-type": "application/x-www-form-urlencoded; charset=UTF-8" };
|
|
29482
29547
|
payloadStr = Object.keys(payload).map(function (key) {
|
|
29483
|
-
return key
|
|
29548
|
+
return "".concat(key, "=").concat(payload[key]);
|
|
29484
29549
|
}).join("&");
|
|
29485
29550
|
}
|
|
29486
29551
|
return [4 /*yield*/, (0, lib$s.fetchJson)(connection, payloadStr, procFunc || getJsonResult)];
|
|
@@ -29754,7 +29819,7 @@
|
|
|
29754
29819
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29755
29820
|
function step(op) {
|
|
29756
29821
|
if (f) throw new TypeError("Generator is already executing.");
|
|
29757
|
-
while (_) try {
|
|
29822
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29758
29823
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29759
29824
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
29760
29825
|
switch (op[0]) {
|
|
@@ -30171,7 +30236,7 @@
|
|
|
30171
30236
|
}
|
|
30172
30237
|
var weight = config.weight;
|
|
30173
30238
|
if (weight % 1 || weight > 512 || weight < 1) {
|
|
30174
|
-
logger.throwArgumentError("invalid weight; must be integer in [1, 512]", "providers["
|
|
30239
|
+
logger.throwArgumentError("invalid weight; must be integer in [1, 512]", "providers[".concat(index, "].weight"), weight);
|
|
30175
30240
|
}
|
|
30176
30241
|
return Object.freeze(config);
|
|
30177
30242
|
});
|
|
@@ -30840,7 +30905,7 @@
|
|
|
30840
30905
|
value: network
|
|
30841
30906
|
});
|
|
30842
30907
|
}
|
|
30843
|
-
var url = "https://"
|
|
30908
|
+
var url = "https://".concat(host, "/v1/lb/").concat(apiKey.applicationId);
|
|
30844
30909
|
var connection = { headers: {}, url: url };
|
|
30845
30910
|
if (apiKey.applicationSecretKey != null) {
|
|
30846
30911
|
connection.user = "";
|
|
@@ -31185,7 +31250,7 @@
|
|
|
31185
31250
|
logger.throwArgumentError("invalid bytes type", "type", type);
|
|
31186
31251
|
}
|
|
31187
31252
|
if ((0, lib$1.arrayify)(value).byteLength !== size) {
|
|
31188
|
-
logger.throwArgumentError("invalid value for "
|
|
31253
|
+
logger.throwArgumentError("invalid value for ".concat(type), "value", value);
|
|
31189
31254
|
}
|
|
31190
31255
|
if (isArray) {
|
|
31191
31256
|
return (0, lib$1.arrayify)((value + Zeros).substring(0, 66));
|
|
@@ -31197,7 +31262,7 @@
|
|
|
31197
31262
|
var baseType_1 = match[1];
|
|
31198
31263
|
var count = parseInt(match[2] || String(value.length));
|
|
31199
31264
|
if (count != value.length) {
|
|
31200
|
-
logger.throwArgumentError("invalid array length for "
|
|
31265
|
+
logger.throwArgumentError("invalid array length for ".concat(type), "value", value);
|
|
31201
31266
|
}
|
|
31202
31267
|
var result_1 = [];
|
|
31203
31268
|
value.forEach(function (value) {
|
|
@@ -31342,7 +31407,11 @@
|
|
|
31342
31407
|
"use strict";
|
|
31343
31408
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
31344
31409
|
if (k2 === undefined) k2 = k;
|
|
31345
|
-
Object.
|
|
31410
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31411
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31412
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
31413
|
+
}
|
|
31414
|
+
Object.defineProperty(o, k2, desc);
|
|
31346
31415
|
}) : (function(o, m, k, k2) {
|
|
31347
31416
|
if (k2 === undefined) k2 = k;
|
|
31348
31417
|
o[k2] = m[k];
|
|
@@ -31509,7 +31578,11 @@
|
|
|
31509
31578
|
"use strict";
|
|
31510
31579
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
31511
31580
|
if (k2 === undefined) k2 = k;
|
|
31512
|
-
Object.
|
|
31581
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31582
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31583
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
31584
|
+
}
|
|
31585
|
+
Object.defineProperty(o, k2, desc);
|
|
31513
31586
|
}) : (function(o, m, k, k2) {
|
|
31514
31587
|
if (k2 === undefined) k2 = k;
|
|
31515
31588
|
o[k2] = m[k];
|
|
@@ -31569,7 +31642,11 @@
|
|
|
31569
31642
|
"use strict";
|
|
31570
31643
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
31571
31644
|
if (k2 === undefined) k2 = k;
|
|
31572
|
-
Object.
|
|
31645
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31646
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31647
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
31648
|
+
}
|
|
31649
|
+
Object.defineProperty(o, k2, desc);
|
|
31573
31650
|
}) : (function(o, m, k, k2) {
|
|
31574
31651
|
if (k2 === undefined) k2 = k;
|
|
31575
31652
|
o[k2] = m[k];
|