damm-sdk 1.1.31-alpha.18 → 1.1.31-alpha.19
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/index.cjs +422 -543
- package/dist/index.cjs.map +4 -6
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/src/integrations/lagoonV1/lagoon.v1.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14489,7 +14489,7 @@ var require_utils2 = __commonJS((exports2) => {
|
|
|
14489
14489
|
var exports_process = {};
|
|
14490
14490
|
__export(exports_process, {
|
|
14491
14491
|
versions: () => versions,
|
|
14492
|
-
version: () =>
|
|
14492
|
+
version: () => version6,
|
|
14493
14493
|
umask: () => umask,
|
|
14494
14494
|
title: () => title,
|
|
14495
14495
|
removeListener: () => removeListener,
|
|
@@ -14546,7 +14546,7 @@ function nextTick(fun) {
|
|
|
14546
14546
|
setTimeout(drainQueue, 0);
|
|
14547
14547
|
}
|
|
14548
14548
|
function noop() {}
|
|
14549
|
-
var queue, draining = false, currentQueue, queueIndex = -1, title = "browser", browser = true, env, argv,
|
|
14549
|
+
var queue, draining = false, currentQueue, queueIndex = -1, title = "browser", browser = true, env, argv, version6 = "", versions, on, addListener, once, off, removeListener, removeAllListeners, emit, prependListener, prependOnceListener, listeners = function(name) {
|
|
14550
14550
|
return [];
|
|
14551
14551
|
}, binding = function(name) {
|
|
14552
14552
|
throw new Error("process.binding is not supported in browser polyfill");
|
|
@@ -35378,7 +35378,7 @@ var require_lib14 = __commonJS((exports2) => {
|
|
|
35378
35378
|
var properties_1 = require_lib4();
|
|
35379
35379
|
var logger_1 = require_lib();
|
|
35380
35380
|
var _version_1 = require__version10();
|
|
35381
|
-
var
|
|
35381
|
+
var logger5 = new logger_1.Logger(_version_1.version);
|
|
35382
35382
|
var _curve = null;
|
|
35383
35383
|
function getCurve() {
|
|
35384
35384
|
if (!_curve) {
|
|
@@ -35391,7 +35391,7 @@ var require_lib14 = __commonJS((exports2) => {
|
|
|
35391
35391
|
(0, properties_1.defineReadOnly)(this, "curve", "secp256k1");
|
|
35392
35392
|
(0, properties_1.defineReadOnly)(this, "privateKey", (0, bytes_1.hexlify)(privateKey));
|
|
35393
35393
|
if ((0, bytes_1.hexDataLength)(this.privateKey) !== 32) {
|
|
35394
|
-
|
|
35394
|
+
logger5.throwArgumentError("invalid private key", "privateKey", "[[ REDACTED ]]");
|
|
35395
35395
|
}
|
|
35396
35396
|
var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));
|
|
35397
35397
|
(0, properties_1.defineReadOnly)(this, "publicKey", "0x" + keyPair.getPublic(false, "hex"));
|
|
@@ -35407,7 +35407,7 @@ var require_lib14 = __commonJS((exports2) => {
|
|
|
35407
35407
|
var keyPair = getCurve().keyFromPrivate((0, bytes_1.arrayify)(this.privateKey));
|
|
35408
35408
|
var digestBytes = (0, bytes_1.arrayify)(digest);
|
|
35409
35409
|
if (digestBytes.length !== 32) {
|
|
35410
|
-
|
|
35410
|
+
logger5.throwArgumentError("bad digest length", "digest", digest);
|
|
35411
35411
|
}
|
|
35412
35412
|
var signature = keyPair.sign(digestBytes, { canonical: true });
|
|
35413
35413
|
return (0, bytes_1.splitSignature)({
|
|
@@ -35452,7 +35452,7 @@ var require_lib14 = __commonJS((exports2) => {
|
|
|
35452
35452
|
}
|
|
35453
35453
|
return "0x" + getCurve().keyFromPublic(bytes).getPublic(true, "hex");
|
|
35454
35454
|
}
|
|
35455
|
-
return
|
|
35455
|
+
return logger5.throwArgumentError("invalid public or private key", "key", "[REDACTED]");
|
|
35456
35456
|
}
|
|
35457
35457
|
exports2.computePublicKey = computePublicKey;
|
|
35458
35458
|
});
|
|
@@ -35506,7 +35506,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35506
35506
|
var signing_key_1 = require_lib14();
|
|
35507
35507
|
var logger_1 = require_lib();
|
|
35508
35508
|
var _version_1 = require__version11();
|
|
35509
|
-
var
|
|
35509
|
+
var logger5 = new logger_1.Logger(_version_1.version);
|
|
35510
35510
|
var TransactionTypes;
|
|
35511
35511
|
(function(TransactionTypes2) {
|
|
35512
35512
|
TransactionTypes2[TransactionTypes2["legacy"] = 0] = "legacy";
|
|
@@ -35555,7 +35555,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35555
35555
|
function formatNumber(value, name) {
|
|
35556
35556
|
var result = (0, bytes_1.stripZeros)(bignumber_1.BigNumber.from(value).toHexString());
|
|
35557
35557
|
if (result.length > 32) {
|
|
35558
|
-
|
|
35558
|
+
logger5.throwArgumentError("invalid length for " + name, "transaction:" + name, value);
|
|
35559
35559
|
}
|
|
35560
35560
|
return result;
|
|
35561
35561
|
}
|
|
@@ -35564,7 +35564,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35564
35564
|
address: (0, address_1.getAddress)(addr),
|
|
35565
35565
|
storageKeys: (storageKeys || []).map(function(storageKey, index) {
|
|
35566
35566
|
if ((0, bytes_1.hexDataLength)(storageKey) !== 32) {
|
|
35567
|
-
|
|
35567
|
+
logger5.throwArgumentError("invalid access list storageKey", "accessList[" + addr + ":" + index + "]", storageKey);
|
|
35568
35568
|
}
|
|
35569
35569
|
return storageKey.toLowerCase();
|
|
35570
35570
|
})
|
|
@@ -35575,7 +35575,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35575
35575
|
return value.map(function(set, index) {
|
|
35576
35576
|
if (Array.isArray(set)) {
|
|
35577
35577
|
if (set.length > 2) {
|
|
35578
|
-
|
|
35578
|
+
logger5.throwArgumentError("access list expected to be [ address, storageKeys[] ]", "value[" + index + "]", set);
|
|
35579
35579
|
}
|
|
35580
35580
|
return accessSetify(set[0], set[1]);
|
|
35581
35581
|
}
|
|
@@ -35605,7 +35605,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35605
35605
|
var gasPrice = bignumber_1.BigNumber.from(transaction.gasPrice);
|
|
35606
35606
|
var maxFeePerGas = bignumber_1.BigNumber.from(transaction.maxFeePerGas || 0);
|
|
35607
35607
|
if (!gasPrice.eq(maxFeePerGas)) {
|
|
35608
|
-
|
|
35608
|
+
logger5.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas", "tx", {
|
|
35609
35609
|
gasPrice,
|
|
35610
35610
|
maxFeePerGas
|
|
35611
35611
|
});
|
|
@@ -35660,12 +35660,12 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35660
35660
|
}
|
|
35661
35661
|
value = (0, bytes_1.arrayify)((0, bytes_1.hexlify)(value, options));
|
|
35662
35662
|
if (fieldInfo.length && value.length !== fieldInfo.length && value.length > 0) {
|
|
35663
|
-
|
|
35663
|
+
logger5.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value);
|
|
35664
35664
|
}
|
|
35665
35665
|
if (fieldInfo.maxLength) {
|
|
35666
35666
|
value = (0, bytes_1.stripZeros)(value);
|
|
35667
35667
|
if (value.length > fieldInfo.maxLength) {
|
|
35668
|
-
|
|
35668
|
+
logger5.throwArgumentError("invalid length for " + fieldInfo.name, "transaction:" + fieldInfo.name, value);
|
|
35669
35669
|
}
|
|
35670
35670
|
}
|
|
35671
35671
|
raw.push((0, bytes_1.hexlify)(value));
|
|
@@ -35674,7 +35674,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35674
35674
|
if (transaction.chainId != null) {
|
|
35675
35675
|
chainId = transaction.chainId;
|
|
35676
35676
|
if (typeof chainId !== "number") {
|
|
35677
|
-
|
|
35677
|
+
logger5.throwArgumentError("invalid transaction.chainId", "transaction", transaction);
|
|
35678
35678
|
}
|
|
35679
35679
|
} else if (signature && !(0, bytes_1.isBytesLike)(signature) && signature.v > 28) {
|
|
35680
35680
|
chainId = Math.floor((signature.v - 35) / 2);
|
|
@@ -35695,10 +35695,10 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35695
35695
|
raw.pop();
|
|
35696
35696
|
v += chainId * 2 + 8;
|
|
35697
35697
|
if (sig.v > 28 && sig.v !== v) {
|
|
35698
|
-
|
|
35698
|
+
logger5.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature);
|
|
35699
35699
|
}
|
|
35700
35700
|
} else if (sig.v !== v) {
|
|
35701
|
-
|
|
35701
|
+
logger5.throwArgumentError("transaction.chainId/signature.v mismatch", "signature", signature);
|
|
35702
35702
|
}
|
|
35703
35703
|
raw.push((0, bytes_1.hexlify)(v));
|
|
35704
35704
|
raw.push((0, bytes_1.stripZeros)((0, bytes_1.arrayify)(sig.r)));
|
|
@@ -35708,7 +35708,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35708
35708
|
function serialize(transaction, signature) {
|
|
35709
35709
|
if (transaction.type == null || transaction.type === 0) {
|
|
35710
35710
|
if (transaction.accessList != null) {
|
|
35711
|
-
|
|
35711
|
+
logger5.throwArgumentError("untyped transactions do not support accessList; include type: 1", "transaction", transaction);
|
|
35712
35712
|
}
|
|
35713
35713
|
return _serialize(transaction, signature);
|
|
35714
35714
|
}
|
|
@@ -35720,7 +35720,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35720
35720
|
default:
|
|
35721
35721
|
break;
|
|
35722
35722
|
}
|
|
35723
|
-
return
|
|
35723
|
+
return logger5.throwError("unsupported transaction type: " + transaction.type, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
35724
35724
|
operation: "serializeTransaction",
|
|
35725
35725
|
transactionType: transaction.type
|
|
35726
35726
|
});
|
|
@@ -35734,7 +35734,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35734
35734
|
}
|
|
35735
35735
|
tx.v = recid;
|
|
35736
35736
|
} catch (error) {
|
|
35737
|
-
|
|
35737
|
+
logger5.throwArgumentError("invalid v for transaction type: 1", "v", fields[0]);
|
|
35738
35738
|
}
|
|
35739
35739
|
tx.r = (0, bytes_1.hexZeroPad)(fields[1], 32);
|
|
35740
35740
|
tx.s = (0, bytes_1.hexZeroPad)(fields[2], 32);
|
|
@@ -35746,7 +35746,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35746
35746
|
function _parseEip1559(payload) {
|
|
35747
35747
|
var transaction = RLP.decode(payload.slice(1));
|
|
35748
35748
|
if (transaction.length !== 9 && transaction.length !== 12) {
|
|
35749
|
-
|
|
35749
|
+
logger5.throwArgumentError("invalid component count for transaction type: 2", "payload", (0, bytes_1.hexlify)(payload));
|
|
35750
35750
|
}
|
|
35751
35751
|
var maxPriorityFeePerGas = handleNumber(transaction[2]);
|
|
35752
35752
|
var maxFeePerGas = handleNumber(transaction[3]);
|
|
@@ -35773,7 +35773,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35773
35773
|
function _parseEip2930(payload) {
|
|
35774
35774
|
var transaction = RLP.decode(payload.slice(1));
|
|
35775
35775
|
if (transaction.length !== 8 && transaction.length !== 11) {
|
|
35776
|
-
|
|
35776
|
+
logger5.throwArgumentError("invalid component count for transaction type: 1", "payload", (0, bytes_1.hexlify)(payload));
|
|
35777
35777
|
}
|
|
35778
35778
|
var tx = {
|
|
35779
35779
|
type: 1,
|
|
@@ -35796,7 +35796,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35796
35796
|
function _parse(rawTransaction) {
|
|
35797
35797
|
var transaction = RLP.decode(rawTransaction);
|
|
35798
35798
|
if (transaction.length !== 9 && transaction.length !== 6) {
|
|
35799
|
-
|
|
35799
|
+
logger5.throwArgumentError("invalid raw transaction", "rawTransaction", rawTransaction);
|
|
35800
35800
|
}
|
|
35801
35801
|
var tx = {
|
|
35802
35802
|
nonce: handleNumber(transaction[0]).toNumber(),
|
|
@@ -35855,7 +35855,7 @@ var require_lib15 = __commonJS((exports2) => {
|
|
|
35855
35855
|
default:
|
|
35856
35856
|
break;
|
|
35857
35857
|
}
|
|
35858
|
-
return
|
|
35858
|
+
return logger5.throwError("unsupported transaction type: " + payload[0], logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
35859
35859
|
operation: "parseTransaction",
|
|
35860
35860
|
transactionType: payload[0]
|
|
35861
35861
|
});
|
|
@@ -35975,7 +35975,7 @@ var require_browser_sha2 = __commonJS((exports2) => {
|
|
|
35975
35975
|
var types_1 = require_types();
|
|
35976
35976
|
var logger_1 = require_lib();
|
|
35977
35977
|
var _version_1 = require__version12();
|
|
35978
|
-
var
|
|
35978
|
+
var logger6 = new logger_1.Logger(_version_1.version);
|
|
35979
35979
|
function ripemd160(data) {
|
|
35980
35980
|
return "0x" + hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest("hex");
|
|
35981
35981
|
}
|
|
@@ -35990,7 +35990,7 @@ var require_browser_sha2 = __commonJS((exports2) => {
|
|
|
35990
35990
|
exports2.sha512 = sha512;
|
|
35991
35991
|
function computeHmac(algorithm, key, data) {
|
|
35992
35992
|
if (!types_1.SupportedAlgorithm[algorithm]) {
|
|
35993
|
-
|
|
35993
|
+
logger6.throwError("unsupported algorithm " + algorithm, logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
35994
35994
|
operation: "hmac",
|
|
35995
35995
|
algorithm
|
|
35996
35996
|
});
|
|
@@ -36865,7 +36865,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
36865
36865
|
var wordlists_1 = require_lib19();
|
|
36866
36866
|
var logger_1 = require_lib();
|
|
36867
36867
|
var _version_1 = require__version14();
|
|
36868
|
-
var
|
|
36868
|
+
var logger6 = new logger_1.Logger(_version_1.version);
|
|
36869
36869
|
var N = bignumber_1.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
|
|
36870
36870
|
var MasterSecret = (0, strings_1.toUtf8Bytes)("Bitcoin seed");
|
|
36871
36871
|
var HardenedBit = 2147483648;
|
|
@@ -36888,7 +36888,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
36888
36888
|
if (typeof wordlist === "string") {
|
|
36889
36889
|
var words = wordlists_1.wordlists[wordlist];
|
|
36890
36890
|
if (words == null) {
|
|
36891
|
-
|
|
36891
|
+
logger6.throwArgumentError("unknown locale", "wordlist", wordlist);
|
|
36892
36892
|
}
|
|
36893
36893
|
return words;
|
|
36894
36894
|
}
|
|
@@ -37043,7 +37043,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
37043
37043
|
HDNode2.fromExtendedKey = function(extendedKey) {
|
|
37044
37044
|
var bytes = basex_1.Base58.decode(extendedKey);
|
|
37045
37045
|
if (bytes.length !== 82 || base58check(bytes.slice(0, 78)) !== extendedKey) {
|
|
37046
|
-
|
|
37046
|
+
logger6.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]");
|
|
37047
37047
|
}
|
|
37048
37048
|
var depth = bytes[4];
|
|
37049
37049
|
var parentFingerprint = (0, bytes_1.hexlify)(bytes.slice(5, 9));
|
|
@@ -37061,7 +37061,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
37061
37061
|
}
|
|
37062
37062
|
return new HDNode2(_constructorGuard3, (0, bytes_1.hexlify)(key.slice(1)), null, parentFingerprint, chainCode, index, depth, null);
|
|
37063
37063
|
}
|
|
37064
|
-
return
|
|
37064
|
+
return logger6.throwArgumentError("invalid extended key", "extendedKey", "[REDACTED]");
|
|
37065
37065
|
};
|
|
37066
37066
|
return HDNode2;
|
|
37067
37067
|
}();
|
|
@@ -37076,7 +37076,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
37076
37076
|
exports2.mnemonicToSeed = mnemonicToSeed;
|
|
37077
37077
|
function mnemonicToEntropy(mnemonic, wordlist) {
|
|
37078
37078
|
wordlist = getWordlist(wordlist);
|
|
37079
|
-
|
|
37079
|
+
logger6.checkNormalize();
|
|
37080
37080
|
var words = wordlist.split(mnemonic);
|
|
37081
37081
|
if (words.length % 3 !== 0) {
|
|
37082
37082
|
throw new Error("invalid mnemonic");
|
|
@@ -37144,7 +37144,7 @@ var require_lib20 = __commonJS((exports2) => {
|
|
|
37144
37144
|
exports2.isValidMnemonic = isValidMnemonic;
|
|
37145
37145
|
function getAccountPath(index) {
|
|
37146
37146
|
if (typeof index !== "number" || index < 0 || index >= HardenedBit || index % 1) {
|
|
37147
|
-
|
|
37147
|
+
logger6.throwArgumentError("invalid account index", "index", index);
|
|
37148
37148
|
}
|
|
37149
37149
|
return "m/44'/60'/" + index + "'/0/0";
|
|
37150
37150
|
}
|
|
@@ -37165,7 +37165,7 @@ var require_browser_random = __commonJS((exports2) => {
|
|
|
37165
37165
|
var bytes_1 = require_lib2();
|
|
37166
37166
|
var logger_1 = require_lib();
|
|
37167
37167
|
var _version_1 = require__version15();
|
|
37168
|
-
var
|
|
37168
|
+
var logger6 = new logger_1.Logger(_version_1.version);
|
|
37169
37169
|
function getGlobal() {
|
|
37170
37170
|
if (typeof self !== "undefined") {
|
|
37171
37171
|
return self;
|
|
@@ -37181,10 +37181,10 @@ var require_browser_random = __commonJS((exports2) => {
|
|
|
37181
37181
|
var anyGlobal = getGlobal();
|
|
37182
37182
|
var crypto2 = anyGlobal.crypto || anyGlobal.msCrypto;
|
|
37183
37183
|
if (!crypto2 || !crypto2.getRandomValues) {
|
|
37184
|
-
|
|
37184
|
+
logger6.warn("WARNING: Missing strong random number source");
|
|
37185
37185
|
crypto2 = {
|
|
37186
37186
|
getRandomValues: function(buffer) {
|
|
37187
|
-
return
|
|
37187
|
+
return logger6.throwError("no secure random source avaialble", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
37188
37188
|
operation: "crypto.getRandomValues"
|
|
37189
37189
|
});
|
|
37190
37190
|
}
|
|
@@ -37192,7 +37192,7 @@ var require_browser_random = __commonJS((exports2) => {
|
|
|
37192
37192
|
}
|
|
37193
37193
|
function randomBytes(length) {
|
|
37194
37194
|
if (length <= 0 || length > 1024 || length % 1 || length != length) {
|
|
37195
|
-
|
|
37195
|
+
logger6.throwArgumentError("invalid length", "length", length);
|
|
37196
37196
|
}
|
|
37197
37197
|
var result = new Uint8Array(length);
|
|
37198
37198
|
crypto2.getRandomValues(result);
|
|
@@ -37886,7 +37886,7 @@ var require_crowdsale = __commonJS((exports2) => {
|
|
|
37886
37886
|
var properties_1 = require_lib4();
|
|
37887
37887
|
var logger_1 = require_lib();
|
|
37888
37888
|
var _version_1 = require__version16();
|
|
37889
|
-
var
|
|
37889
|
+
var logger6 = new logger_1.Logger(_version_1.version);
|
|
37890
37890
|
var utils_1 = require_utils5();
|
|
37891
37891
|
var CrowdsaleAccount = function(_super) {
|
|
37892
37892
|
__extends(CrowdsaleAccount2, _super);
|
|
@@ -37905,7 +37905,7 @@ var require_crowdsale = __commonJS((exports2) => {
|
|
|
37905
37905
|
var ethaddr = (0, address_1.getAddress)((0, utils_1.searchPath)(data, "ethaddr"));
|
|
37906
37906
|
var encseed = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "encseed"));
|
|
37907
37907
|
if (!encseed || encseed.length % 16 !== 0) {
|
|
37908
|
-
|
|
37908
|
+
logger6.throwArgumentError("invalid encseed", "json", json);
|
|
37909
37909
|
}
|
|
37910
37910
|
var key = (0, bytes_1.arrayify)((0, pbkdf2_1.pbkdf2)(password, password, 2000, 32, "sha256")).slice(0, 16);
|
|
37911
37911
|
var iv = encseed.slice(0, 16);
|
|
@@ -38587,7 +38587,7 @@ var require_keystore = __commonJS((exports2) => {
|
|
|
38587
38587
|
var utils_1 = require_utils5();
|
|
38588
38588
|
var logger_1 = require_lib();
|
|
38589
38589
|
var _version_1 = require__version16();
|
|
38590
|
-
var
|
|
38590
|
+
var logger6 = new logger_1.Logger(_version_1.version);
|
|
38591
38591
|
function hasMnemonic(value) {
|
|
38592
38592
|
return value != null && value.mnemonic && value.mnemonic.phrase;
|
|
38593
38593
|
}
|
|
@@ -38620,7 +38620,7 @@ var require_keystore = __commonJS((exports2) => {
|
|
|
38620
38620
|
}
|
|
38621
38621
|
var privateKey = _decrypt(data, key.slice(0, 16), ciphertext);
|
|
38622
38622
|
if (!privateKey) {
|
|
38623
|
-
|
|
38623
|
+
logger6.throwError("unsupported cipher", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
38624
38624
|
operation: "decrypt"
|
|
38625
38625
|
});
|
|
38626
38626
|
}
|
|
@@ -38674,7 +38674,7 @@ var require_keystore = __commonJS((exports2) => {
|
|
|
38674
38674
|
var kdf = (0, utils_1.searchPath)(data, "crypto/kdf");
|
|
38675
38675
|
if (kdf && typeof kdf === "string") {
|
|
38676
38676
|
var throwError = function(name, value) {
|
|
38677
|
-
return
|
|
38677
|
+
return logger6.throwArgumentError("invalid key-derivation function parameters", name, value);
|
|
38678
38678
|
};
|
|
38679
38679
|
if (kdf.toLowerCase() === "scrypt") {
|
|
38680
38680
|
var salt = (0, utils_1.looseArrayify)((0, utils_1.searchPath)(data, "crypto/kdfparams/salt"));
|
|
@@ -38711,7 +38711,7 @@ var require_keystore = __commonJS((exports2) => {
|
|
|
38711
38711
|
return pbkdf2Func(passwordBytes, salt, count, dkLen, prfFunc);
|
|
38712
38712
|
}
|
|
38713
38713
|
}
|
|
38714
|
-
return
|
|
38714
|
+
return logger6.throwArgumentError("unsupported key-derivation function", "kdf", kdf);
|
|
38715
38715
|
}
|
|
38716
38716
|
function decryptSync(json, password) {
|
|
38717
38717
|
var data = JSON.parse(json);
|
|
@@ -39215,7 +39215,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39215
39215
|
var strings_1 = require_lib9();
|
|
39216
39216
|
var logger_1 = require_lib();
|
|
39217
39217
|
var _version_1 = require__version17();
|
|
39218
|
-
var
|
|
39218
|
+
var logger8 = new logger_1.Logger(_version_1.version);
|
|
39219
39219
|
var geturl_1 = require_browser_geturl();
|
|
39220
39220
|
function staller(duration) {
|
|
39221
39221
|
return new Promise(function(resolve) {
|
|
@@ -39246,10 +39246,10 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39246
39246
|
}
|
|
39247
39247
|
function _fetchData(connection, body, processFunc) {
|
|
39248
39248
|
var attemptLimit = typeof connection === "object" && connection.throttleLimit != null ? connection.throttleLimit : 12;
|
|
39249
|
-
|
|
39249
|
+
logger8.assertArgument(attemptLimit > 0 && attemptLimit % 1 === 0, "invalid connection throttle limit", "connection.throttleLimit", attemptLimit);
|
|
39250
39250
|
var throttleCallback = typeof connection === "object" ? connection.throttleCallback : null;
|
|
39251
39251
|
var throttleSlotInterval = typeof connection === "object" && typeof connection.throttleSlotInterval === "number" ? connection.throttleSlotInterval : 100;
|
|
39252
|
-
|
|
39252
|
+
logger8.assertArgument(throttleSlotInterval > 0 && throttleSlotInterval % 1 === 0, "invalid connection throttle slot interval", "connection.throttleSlotInterval", throttleSlotInterval);
|
|
39253
39253
|
var errorPassThrough = typeof connection === "object" ? !!connection.errorPassThrough : false;
|
|
39254
39254
|
var headers = {};
|
|
39255
39255
|
var url = null;
|
|
@@ -39262,7 +39262,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39262
39262
|
url = connection;
|
|
39263
39263
|
} else if (typeof connection === "object") {
|
|
39264
39264
|
if (connection == null || connection.url == null) {
|
|
39265
|
-
|
|
39265
|
+
logger8.throwArgumentError("missing URL", "connection.url", connection);
|
|
39266
39266
|
}
|
|
39267
39267
|
url = connection.url;
|
|
39268
39268
|
if (typeof connection.timeout === "number" && connection.timeout > 0) {
|
|
@@ -39279,7 +39279,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39279
39279
|
options.allowGzip = !!connection.allowGzip;
|
|
39280
39280
|
if (connection.user != null && connection.password != null) {
|
|
39281
39281
|
if (url.substring(0, 6) !== "https:" && connection.allowInsecureAuthentication !== true) {
|
|
39282
|
-
|
|
39282
|
+
logger8.throwError("basic authentication requires a secure https url", logger_1.Logger.errors.INVALID_ARGUMENT, { argument: "url", url, user: connection.user, password: "[REDACTED]" });
|
|
39283
39283
|
}
|
|
39284
39284
|
var authorization = connection.user + ":" + connection.password;
|
|
39285
39285
|
headers["authorization"] = {
|
|
@@ -39310,7 +39310,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39310
39310
|
}
|
|
39311
39311
|
return Promise.resolve(result);
|
|
39312
39312
|
} catch (error) {
|
|
39313
|
-
|
|
39313
|
+
logger8.throwError("processing response error", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39314
39314
|
body: bodyify(dataMatch[1], dataMatch[2]),
|
|
39315
39315
|
error,
|
|
39316
39316
|
requestBody: null,
|
|
@@ -39344,7 +39344,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39344
39344
|
return;
|
|
39345
39345
|
}
|
|
39346
39346
|
timer = null;
|
|
39347
|
-
reject(
|
|
39347
|
+
reject(logger8.makeError("timeout", logger_1.Logger.errors.TIMEOUT, {
|
|
39348
39348
|
requestBody: bodyify(options.body, flatHeaders["content-type"]),
|
|
39349
39349
|
requestMethod: options.method,
|
|
39350
39350
|
timeout,
|
|
@@ -39421,7 +39421,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39421
39421
|
response2 = error_1.response;
|
|
39422
39422
|
if (response2 == null) {
|
|
39423
39423
|
runningTimeout.cancel();
|
|
39424
|
-
|
|
39424
|
+
logger8.throwError("missing response", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39425
39425
|
requestBody: bodyify(options.body, flatHeaders["content-type"]),
|
|
39426
39426
|
requestMethod: options.method,
|
|
39427
39427
|
serverError: error_1,
|
|
@@ -39435,7 +39435,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39435
39435
|
body_1 = null;
|
|
39436
39436
|
} else if (!errorPassThrough && (response2.statusCode < 200 || response2.statusCode >= 300)) {
|
|
39437
39437
|
runningTimeout.cancel();
|
|
39438
|
-
|
|
39438
|
+
logger8.throwError("bad response", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39439
39439
|
status: response2.statusCode,
|
|
39440
39440
|
headers: response2.headers,
|
|
39441
39441
|
body: bodyify(body_1, response2.headers ? response2.headers["content-type"] : null),
|
|
@@ -39475,7 +39475,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39475
39475
|
return [3, 19];
|
|
39476
39476
|
case 17:
|
|
39477
39477
|
runningTimeout.cancel();
|
|
39478
|
-
|
|
39478
|
+
logger8.throwError("processing response error", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39479
39479
|
body: bodyify(body_1, response2.headers ? response2.headers["content-type"] : null),
|
|
39480
39480
|
error: error_2,
|
|
39481
39481
|
requestBody: bodyify(options.body, flatHeaders["content-type"]),
|
|
@@ -39490,7 +39490,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39490
39490
|
attempt++;
|
|
39491
39491
|
return [3, 1];
|
|
39492
39492
|
case 20:
|
|
39493
|
-
return [2,
|
|
39493
|
+
return [2, logger8.throwError("failed response", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39494
39494
|
requestBody: bodyify(options.body, flatHeaders["content-type"]),
|
|
39495
39495
|
requestMethod: options.method,
|
|
39496
39496
|
url
|
|
@@ -39509,7 +39509,7 @@ var require_lib23 = __commonJS((exports2) => {
|
|
|
39509
39509
|
try {
|
|
39510
39510
|
result = JSON.parse((0, strings_1.toUtf8String)(value));
|
|
39511
39511
|
} catch (error) {
|
|
39512
|
-
|
|
39512
|
+
logger8.throwError("invalid JSON", logger_1.Logger.errors.SERVER_ERROR, {
|
|
39513
39513
|
body: value,
|
|
39514
39514
|
error
|
|
39515
39515
|
});
|
|
@@ -39647,7 +39647,7 @@ var require_bech32 = __commonJS((exports2, module2) => {
|
|
|
39647
39647
|
}
|
|
39648
39648
|
return chk;
|
|
39649
39649
|
}
|
|
39650
|
-
function
|
|
39650
|
+
function encode(prefix, words, LIMIT) {
|
|
39651
39651
|
LIMIT = LIMIT || 90;
|
|
39652
39652
|
if (prefix.length + 7 + words.length > LIMIT)
|
|
39653
39653
|
throw new TypeError("Exceeds length limit");
|
|
@@ -39772,7 +39772,7 @@ var require_bech32 = __commonJS((exports2, module2) => {
|
|
|
39772
39772
|
module2.exports = {
|
|
39773
39773
|
decodeUnsafe,
|
|
39774
39774
|
decode,
|
|
39775
|
-
encode
|
|
39775
|
+
encode,
|
|
39776
39776
|
toWordsUnsafe,
|
|
39777
39777
|
toWords,
|
|
39778
39778
|
fromWordsUnsafe,
|
|
@@ -39802,7 +39802,7 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39802
39802
|
var Zeros = "0000000000000000000000000000000000000000000000000000000000000000";
|
|
39803
39803
|
var logger_1 = require_lib();
|
|
39804
39804
|
var _version_1 = require__version18();
|
|
39805
|
-
var
|
|
39805
|
+
var logger24 = new logger_1.Logger(_version_1.version);
|
|
39806
39806
|
function _pack(type, value, isArray2) {
|
|
39807
39807
|
switch (type) {
|
|
39808
39808
|
case "address":
|
|
@@ -39825,7 +39825,7 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39825
39825
|
if (match) {
|
|
39826
39826
|
var size2 = parseInt(match[2] || "256");
|
|
39827
39827
|
if (match[2] && String(size2) !== match[2] || size2 % 8 !== 0 || size2 === 0 || size2 > 256) {
|
|
39828
|
-
|
|
39828
|
+
logger24.throwArgumentError("invalid number type", "type", type);
|
|
39829
39829
|
}
|
|
39830
39830
|
if (isArray2) {
|
|
39831
39831
|
size2 = 256;
|
|
@@ -39837,10 +39837,10 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39837
39837
|
if (match) {
|
|
39838
39838
|
var size2 = parseInt(match[1]);
|
|
39839
39839
|
if (String(size2) !== match[1] || size2 === 0 || size2 > 32) {
|
|
39840
|
-
|
|
39840
|
+
logger24.throwArgumentError("invalid bytes type", "type", type);
|
|
39841
39841
|
}
|
|
39842
39842
|
if ((0, bytes_1.arrayify)(value).byteLength !== size2) {
|
|
39843
|
-
|
|
39843
|
+
logger24.throwArgumentError("invalid value for " + type, "value", value);
|
|
39844
39844
|
}
|
|
39845
39845
|
if (isArray2) {
|
|
39846
39846
|
return (0, bytes_1.arrayify)((value + Zeros).substring(0, 66));
|
|
@@ -39852,7 +39852,7 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39852
39852
|
var baseType_1 = match[1];
|
|
39853
39853
|
var count = parseInt(match[2] || String(value.length));
|
|
39854
39854
|
if (count != value.length) {
|
|
39855
|
-
|
|
39855
|
+
logger24.throwArgumentError("invalid array length for " + type, "value", value);
|
|
39856
39856
|
}
|
|
39857
39857
|
var result_1 = [];
|
|
39858
39858
|
value.forEach(function(value2) {
|
|
@@ -39860,11 +39860,11 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39860
39860
|
});
|
|
39861
39861
|
return (0, bytes_1.concat)(result_1);
|
|
39862
39862
|
}
|
|
39863
|
-
return
|
|
39863
|
+
return logger24.throwArgumentError("invalid type", "type", type);
|
|
39864
39864
|
}
|
|
39865
39865
|
function pack(types2, values) {
|
|
39866
39866
|
if (types2.length != values.length) {
|
|
39867
|
-
|
|
39867
|
+
logger24.throwArgumentError("wrong number of values; expected ${ types.length }", "values", values);
|
|
39868
39868
|
}
|
|
39869
39869
|
var tight = [];
|
|
39870
39870
|
types2.forEach(function(type, index) {
|
|
@@ -39873,10 +39873,10 @@ var require_lib24 = __commonJS((exports2) => {
|
|
|
39873
39873
|
return (0, bytes_1.hexlify)((0, bytes_1.concat)(tight));
|
|
39874
39874
|
}
|
|
39875
39875
|
exports2.pack = pack;
|
|
39876
|
-
function
|
|
39876
|
+
function keccak2562(types2, values) {
|
|
39877
39877
|
return (0, keccak256_1.keccak256)(pack(types2, values));
|
|
39878
39878
|
}
|
|
39879
|
-
exports2.keccak256 =
|
|
39879
|
+
exports2.keccak256 = keccak2562;
|
|
39880
39880
|
function sha2562(types2, values) {
|
|
39881
39881
|
return (0, sha2_1.sha256)(pack(types2, values));
|
|
39882
39882
|
}
|
|
@@ -39897,7 +39897,7 @@ var require_lib25 = __commonJS((exports2) => {
|
|
|
39897
39897
|
var bignumber_1 = require_lib3();
|
|
39898
39898
|
var logger_1 = require_lib();
|
|
39899
39899
|
var _version_1 = require__version19();
|
|
39900
|
-
var
|
|
39900
|
+
var logger24 = new logger_1.Logger(_version_1.version);
|
|
39901
39901
|
var names = [
|
|
39902
39902
|
"wei",
|
|
39903
39903
|
"kwei",
|
|
@@ -39910,7 +39910,7 @@ var require_lib25 = __commonJS((exports2) => {
|
|
|
39910
39910
|
function commify(value) {
|
|
39911
39911
|
var comps = String(value).split(".");
|
|
39912
39912
|
if (comps.length > 2 || !comps[0].match(/^-?[0-9]*$/) || comps[1] && !comps[1].match(/^[0-9]*$/) || value === "." || value === "-.") {
|
|
39913
|
-
|
|
39913
|
+
logger24.throwArgumentError("invalid value", "value", value);
|
|
39914
39914
|
}
|
|
39915
39915
|
var whole = comps[0];
|
|
39916
39916
|
var negative = "";
|
|
@@ -39957,7 +39957,7 @@ var require_lib25 = __commonJS((exports2) => {
|
|
|
39957
39957
|
exports2.formatUnits = formatUnits;
|
|
39958
39958
|
function parseUnits(value, unitName) {
|
|
39959
39959
|
if (typeof value !== "string") {
|
|
39960
|
-
|
|
39960
|
+
logger24.throwArgumentError("value must be a string", "value", value);
|
|
39961
39961
|
}
|
|
39962
39962
|
if (typeof unitName === "string") {
|
|
39963
39963
|
var index = names.indexOf(unitName);
|
|
@@ -41216,7 +41216,7 @@ var require_decimal = __commonJS((exports2, module2) => {
|
|
|
41216
41216
|
toExpNeg: -7,
|
|
41217
41217
|
toExpPos: 21,
|
|
41218
41218
|
LN10: "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"
|
|
41219
|
-
}, external = true, decimalError = "[DecimalError] ", invalidArgument = decimalError + "Invalid argument: ", exponentOutOfRange = decimalError + "Exponent out of range: ", mathfloor = Math.floor, mathpow = Math.pow, isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ONE2, BASE = 1e7, LOG_BASE = 7,
|
|
41219
|
+
}, external = true, decimalError = "[DecimalError] ", invalidArgument = decimalError + "Invalid argument: ", exponentOutOfRange = decimalError + "Exponent out of range: ", mathfloor = Math.floor, mathpow = Math.pow, isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ONE2, BASE = 1e7, LOG_BASE = 7, MAX_SAFE_INTEGER = 9007199254740991, MAX_E = mathfloor(MAX_SAFE_INTEGER / LOG_BASE), P = {};
|
|
41220
41220
|
P.absoluteValue = P.abs = function() {
|
|
41221
41221
|
var x = new this.constructor(this);
|
|
41222
41222
|
if (x.s)
|
|
@@ -41506,7 +41506,7 @@ var require_decimal = __commonJS((exports2, module2) => {
|
|
|
41506
41506
|
if (!yIsInt) {
|
|
41507
41507
|
if (sign < 0)
|
|
41508
41508
|
throw Error(decimalError + "NaN");
|
|
41509
|
-
} else if ((k = yn < 0 ? -yn : yn) <=
|
|
41509
|
+
} else if ((k = yn < 0 ? -yn : yn) <= MAX_SAFE_INTEGER) {
|
|
41510
41510
|
r = new Ctor(ONE2);
|
|
41511
41511
|
e = Math.ceil(pr / LOG_BASE + 4);
|
|
41512
41512
|
external = false;
|
|
@@ -42988,7 +42988,7 @@ var require_lib26 = __commonJS((exports2) => {
|
|
|
42988
42988
|
var properties_1 = require_lib4();
|
|
42989
42989
|
var logger_1 = require_lib();
|
|
42990
42990
|
var _version_1 = require__version20();
|
|
42991
|
-
var
|
|
42991
|
+
var logger25 = new logger_1.Logger(_version_1.version);
|
|
42992
42992
|
var ForkEvent2 = function(_super) {
|
|
42993
42993
|
__extends(ForkEvent3, _super);
|
|
42994
42994
|
function ForkEvent3() {
|
|
@@ -43005,7 +43005,7 @@ var require_lib26 = __commonJS((exports2) => {
|
|
|
43005
43005
|
function BlockForkEvent2(blockHash, expiry) {
|
|
43006
43006
|
var _this = this;
|
|
43007
43007
|
if (!(0, bytes_1.isHexString)(blockHash, 32)) {
|
|
43008
|
-
|
|
43008
|
+
logger25.throwArgumentError("invalid blockHash", "blockHash", blockHash);
|
|
43009
43009
|
}
|
|
43010
43010
|
_this = _super.call(this, {
|
|
43011
43011
|
_isForkEvent: true,
|
|
@@ -43023,7 +43023,7 @@ var require_lib26 = __commonJS((exports2) => {
|
|
|
43023
43023
|
function TransactionForkEvent2(hash, expiry) {
|
|
43024
43024
|
var _this = this;
|
|
43025
43025
|
if (!(0, bytes_1.isHexString)(hash, 32)) {
|
|
43026
|
-
|
|
43026
|
+
logger25.throwArgumentError("invalid transaction hash", "hash", hash);
|
|
43027
43027
|
}
|
|
43028
43028
|
_this = _super.call(this, {
|
|
43029
43029
|
_isForkEvent: true,
|
|
@@ -43041,10 +43041,10 @@ var require_lib26 = __commonJS((exports2) => {
|
|
|
43041
43041
|
function TransactionOrderForkEvent2(beforeHash, afterHash, expiry) {
|
|
43042
43042
|
var _this = this;
|
|
43043
43043
|
if (!(0, bytes_1.isHexString)(beforeHash, 32)) {
|
|
43044
|
-
|
|
43044
|
+
logger25.throwArgumentError("invalid transaction hash", "beforeHash", beforeHash);
|
|
43045
43045
|
}
|
|
43046
43046
|
if (!(0, bytes_1.isHexString)(afterHash, 32)) {
|
|
43047
|
-
|
|
43047
|
+
logger25.throwArgumentError("invalid transaction hash", "afterHash", afterHash);
|
|
43048
43048
|
}
|
|
43049
43049
|
_this = _super.call(this, {
|
|
43050
43050
|
_isForkEvent: true,
|
|
@@ -43061,7 +43061,7 @@ var require_lib26 = __commonJS((exports2) => {
|
|
|
43061
43061
|
var Provider2 = function() {
|
|
43062
43062
|
function Provider3() {
|
|
43063
43063
|
var _newTarget = this.constructor;
|
|
43064
|
-
|
|
43064
|
+
logger25.checkAbstract(_newTarget, Provider3);
|
|
43065
43065
|
(0, properties_1.defineReadOnly)(this, "_isProvider", true);
|
|
43066
43066
|
}
|
|
43067
43067
|
Provider3.prototype.getFeeData = function() {
|
|
@@ -43241,7 +43241,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43241
43241
|
var properties_1 = require_lib4();
|
|
43242
43242
|
var logger_1 = require_lib();
|
|
43243
43243
|
var _version_1 = require__version21();
|
|
43244
|
-
var
|
|
43244
|
+
var logger25 = new logger_1.Logger(_version_1.version);
|
|
43245
43245
|
var allowedTransactionKeys4 = [
|
|
43246
43246
|
"accessList",
|
|
43247
43247
|
"ccipReadEnabled",
|
|
@@ -43266,7 +43266,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43266
43266
|
var Signer2 = function() {
|
|
43267
43267
|
function Signer3() {
|
|
43268
43268
|
var _newTarget = this.constructor;
|
|
43269
|
-
|
|
43269
|
+
logger25.checkAbstract(_newTarget, Signer3);
|
|
43270
43270
|
(0, properties_1.defineReadOnly)(this, "_isSigner", true);
|
|
43271
43271
|
}
|
|
43272
43272
|
Signer3.prototype.getBalance = function(blockTag) {
|
|
@@ -43406,7 +43406,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43406
43406
|
Signer3.prototype.checkTransaction = function(transaction) {
|
|
43407
43407
|
for (var key in transaction) {
|
|
43408
43408
|
if (allowedTransactionKeys4.indexOf(key) === -1) {
|
|
43409
|
-
|
|
43409
|
+
logger25.throwArgumentError("invalid transaction key: " + key, "transaction", transaction);
|
|
43410
43410
|
}
|
|
43411
43411
|
}
|
|
43412
43412
|
var tx = (0, properties_1.shallowCopy)(transaction);
|
|
@@ -43418,7 +43418,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43418
43418
|
this.getAddress()
|
|
43419
43419
|
]).then(function(result) {
|
|
43420
43420
|
if (result[0].toLowerCase() !== result[1].toLowerCase()) {
|
|
43421
|
-
|
|
43421
|
+
logger25.throwArgumentError("from address mismatch", "transaction", transaction);
|
|
43422
43422
|
}
|
|
43423
43423
|
return result[0];
|
|
43424
43424
|
});
|
|
@@ -43449,7 +43449,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43449
43449
|
case 1:
|
|
43450
43450
|
address = _a2.sent();
|
|
43451
43451
|
if (address == null) {
|
|
43452
|
-
|
|
43452
|
+
logger25.throwArgumentError("provided ENS name resolves to null", "tx.to", to);
|
|
43453
43453
|
}
|
|
43454
43454
|
return [2, address];
|
|
43455
43455
|
}
|
|
@@ -43460,9 +43460,9 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43460
43460
|
}
|
|
43461
43461
|
hasEip1559 = tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null;
|
|
43462
43462
|
if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) {
|
|
43463
|
-
|
|
43463
|
+
logger25.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction);
|
|
43464
43464
|
} else if ((tx.type === 0 || tx.type === 1) && hasEip1559) {
|
|
43465
|
-
|
|
43465
|
+
logger25.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas", "transaction", transaction);
|
|
43466
43466
|
}
|
|
43467
43467
|
if (!((tx.type === 2 || tx.type == null) && (tx.maxFeePerGas != null && tx.maxPriorityFeePerGas != null)))
|
|
43468
43468
|
return [3, 2];
|
|
@@ -43497,7 +43497,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43497
43497
|
}
|
|
43498
43498
|
} else if (feeData.gasPrice != null) {
|
|
43499
43499
|
if (hasEip1559) {
|
|
43500
|
-
|
|
43500
|
+
logger25.throwError("network does not support EIP-1559", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
43501
43501
|
operation: "populateTransaction"
|
|
43502
43502
|
});
|
|
43503
43503
|
}
|
|
@@ -43506,7 +43506,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43506
43506
|
}
|
|
43507
43507
|
tx.type = 0;
|
|
43508
43508
|
} else {
|
|
43509
|
-
|
|
43509
|
+
logger25.throwError("failed to get consistent fee data", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
43510
43510
|
operation: "signer.getFeeData"
|
|
43511
43511
|
});
|
|
43512
43512
|
}
|
|
@@ -43528,7 +43528,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43528
43528
|
if (forwardErrors2.indexOf(error.code) >= 0) {
|
|
43529
43529
|
throw error;
|
|
43530
43530
|
}
|
|
43531
|
-
return
|
|
43531
|
+
return logger25.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", logger_1.Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
43532
43532
|
error,
|
|
43533
43533
|
tx
|
|
43534
43534
|
});
|
|
@@ -43542,7 +43542,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43542
43542
|
this.getChainId()
|
|
43543
43543
|
]).then(function(results) {
|
|
43544
43544
|
if (results[1] !== 0 && results[0] !== results[1]) {
|
|
43545
|
-
|
|
43545
|
+
logger25.throwArgumentError("chainId address mismatch", "transaction", transaction);
|
|
43546
43546
|
}
|
|
43547
43547
|
return results[0];
|
|
43548
43548
|
});
|
|
@@ -43556,7 +43556,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43556
43556
|
};
|
|
43557
43557
|
Signer3.prototype._checkProvider = function(operation) {
|
|
43558
43558
|
if (!this.provider) {
|
|
43559
|
-
|
|
43559
|
+
logger25.throwError("missing provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
43560
43560
|
operation: operation || "_checkProvider"
|
|
43561
43561
|
});
|
|
43562
43562
|
}
|
|
@@ -43580,7 +43580,7 @@ var require_lib27 = __commonJS((exports2) => {
|
|
|
43580
43580
|
};
|
|
43581
43581
|
VoidSigner3.prototype._fail = function(message, operation) {
|
|
43582
43582
|
return Promise.resolve().then(function() {
|
|
43583
|
-
|
|
43583
|
+
logger25.throwError(message, logger_1.Logger.errors.UNSUPPORTED_OPERATION, { operation });
|
|
43584
43584
|
});
|
|
43585
43585
|
};
|
|
43586
43586
|
VoidSigner3.prototype.signMessage = function(message) {
|
|
@@ -43749,7 +43749,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43749
43749
|
var transactions_1 = require_lib15();
|
|
43750
43750
|
var logger_1 = require_lib();
|
|
43751
43751
|
var _version_1 = require__version22();
|
|
43752
|
-
var
|
|
43752
|
+
var logger25 = new logger_1.Logger(_version_1.version);
|
|
43753
43753
|
function isAccount2(value) {
|
|
43754
43754
|
return value != null && (0, bytes_1.isHexString)(value.privateKey, 32) && value.address != null;
|
|
43755
43755
|
}
|
|
@@ -43768,7 +43768,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43768
43768
|
});
|
|
43769
43769
|
(0, properties_1.defineReadOnly)(_this, "address", (0, transactions_1.computeAddress)(_this.publicKey));
|
|
43770
43770
|
if (_this.address !== (0, address_1.getAddress)(privateKey.address)) {
|
|
43771
|
-
|
|
43771
|
+
logger25.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]");
|
|
43772
43772
|
}
|
|
43773
43773
|
if (hasMnemonic2(privateKey)) {
|
|
43774
43774
|
var srcMnemonic_1 = privateKey.mnemonic;
|
|
@@ -43782,7 +43782,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43782
43782
|
var mnemonic = _this.mnemonic;
|
|
43783
43783
|
var node = hdnode_1.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);
|
|
43784
43784
|
if ((0, transactions_1.computeAddress)(node.privateKey) !== _this.address) {
|
|
43785
|
-
|
|
43785
|
+
logger25.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]");
|
|
43786
43786
|
}
|
|
43787
43787
|
} else {
|
|
43788
43788
|
(0, properties_1.defineReadOnly)(_this, "_mnemonic", function() {
|
|
@@ -43792,7 +43792,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43792
43792
|
} else {
|
|
43793
43793
|
if (signing_key_1.SigningKey.isSigningKey(privateKey)) {
|
|
43794
43794
|
if (privateKey.curve !== "secp256k1") {
|
|
43795
|
-
|
|
43795
|
+
logger25.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]");
|
|
43796
43796
|
}
|
|
43797
43797
|
(0, properties_1.defineReadOnly)(_this, "_signingKey", function() {
|
|
43798
43798
|
return privateKey;
|
|
@@ -43814,7 +43814,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43814
43814
|
(0, properties_1.defineReadOnly)(_this, "address", (0, transactions_1.computeAddress)(_this.publicKey));
|
|
43815
43815
|
}
|
|
43816
43816
|
if (provider && !abstract_provider_1.Provider.isProvider(provider)) {
|
|
43817
|
-
|
|
43817
|
+
logger25.throwArgumentError("invalid provider", "provider", provider);
|
|
43818
43818
|
}
|
|
43819
43819
|
(0, properties_1.defineReadOnly)(_this, "provider", provider || null);
|
|
43820
43820
|
return _this;
|
|
@@ -43851,7 +43851,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43851
43851
|
return (0, properties_1.resolveProperties)(transaction).then(function(tx) {
|
|
43852
43852
|
if (tx.from != null) {
|
|
43853
43853
|
if ((0, address_1.getAddress)(tx.from) !== _this.address) {
|
|
43854
|
-
|
|
43854
|
+
logger25.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from);
|
|
43855
43855
|
}
|
|
43856
43856
|
delete tx.from;
|
|
43857
43857
|
}
|
|
@@ -43875,7 +43875,7 @@ var require_lib28 = __commonJS((exports2) => {
|
|
|
43875
43875
|
case 0:
|
|
43876
43876
|
return [4, hash_1._TypedDataEncoder.resolveNames(domain, types3, value, function(name) {
|
|
43877
43877
|
if (_this.provider == null) {
|
|
43878
|
-
|
|
43878
|
+
logger25.throwError("cannot resolve ENS names without a provider", logger_1.Logger.errors.UNSUPPORTED_OPERATION, {
|
|
43879
43879
|
operation: "resolveName",
|
|
43880
43880
|
value: name
|
|
43881
43881
|
});
|
|
@@ -44914,10 +44914,10 @@ var createCall = (call) => {
|
|
|
44914
44914
|
var exports_ethers = {};
|
|
44915
44915
|
__export(exports_ethers, {
|
|
44916
44916
|
wordlists: () => wordlists,
|
|
44917
|
-
version: () =>
|
|
44917
|
+
version: () => version12,
|
|
44918
44918
|
utils: () => exports_utils,
|
|
44919
44919
|
providers: () => exports_lib2,
|
|
44920
|
-
logger: () =>
|
|
44920
|
+
logger: () => logger24,
|
|
44921
44921
|
getDefaultProvider: () => getDefaultProvider,
|
|
44922
44922
|
errors: () => ErrorCode,
|
|
44923
44923
|
constants: () => exports_lib,
|
|
@@ -45492,12 +45492,6 @@ function throwFault(fault, operation, value) {
|
|
|
45492
45492
|
}
|
|
45493
45493
|
return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);
|
|
45494
45494
|
}
|
|
45495
|
-
function _base36To16(value) {
|
|
45496
|
-
return new BN(value, 36).toString(16);
|
|
45497
|
-
}
|
|
45498
|
-
function _base16To36(value) {
|
|
45499
|
-
return new BN(value, 16).toString(36);
|
|
45500
|
-
}
|
|
45501
45495
|
// node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js
|
|
45502
45496
|
var import_bytes2 = __toESM(require_lib2());
|
|
45503
45497
|
var logger2 = new Logger(version3);
|
|
@@ -46195,136 +46189,14 @@ class VoidSigner extends Signer {
|
|
|
46195
46189
|
}
|
|
46196
46190
|
}
|
|
46197
46191
|
|
|
46198
|
-
// node_modules/@ethersproject/address/lib.esm/index.js
|
|
46199
|
-
var import_bytes3 = __toESM(require_lib2());
|
|
46200
|
-
var import_keccak256 = __toESM(require_lib5());
|
|
46201
|
-
var import_rlp = __toESM(require_lib6());
|
|
46202
|
-
|
|
46203
|
-
// node_modules/@ethersproject/address/lib.esm/_version.js
|
|
46204
|
-
var version6 = "address/5.7.0";
|
|
46205
|
-
|
|
46206
|
-
// node_modules/@ethersproject/address/lib.esm/index.js
|
|
46207
|
-
var logger5 = new Logger(version6);
|
|
46208
|
-
function getChecksumAddress(address) {
|
|
46209
|
-
if (!import_bytes3.isHexString(address, 20)) {
|
|
46210
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46211
|
-
}
|
|
46212
|
-
address = address.toLowerCase();
|
|
46213
|
-
const chars = address.substring(2).split("");
|
|
46214
|
-
const expanded = new Uint8Array(40);
|
|
46215
|
-
for (let i2 = 0;i2 < 40; i2++) {
|
|
46216
|
-
expanded[i2] = chars[i2].charCodeAt(0);
|
|
46217
|
-
}
|
|
46218
|
-
const hashed = import_bytes3.arrayify(import_keccak256.keccak256(expanded));
|
|
46219
|
-
for (let i2 = 0;i2 < 40; i2 += 2) {
|
|
46220
|
-
if (hashed[i2 >> 1] >> 4 >= 8) {
|
|
46221
|
-
chars[i2] = chars[i2].toUpperCase();
|
|
46222
|
-
}
|
|
46223
|
-
if ((hashed[i2 >> 1] & 15) >= 8) {
|
|
46224
|
-
chars[i2 + 1] = chars[i2 + 1].toUpperCase();
|
|
46225
|
-
}
|
|
46226
|
-
}
|
|
46227
|
-
return "0x" + chars.join("");
|
|
46228
|
-
}
|
|
46229
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
46230
|
-
function log10(x) {
|
|
46231
|
-
if (Math.log10) {
|
|
46232
|
-
return Math.log10(x);
|
|
46233
|
-
}
|
|
46234
|
-
return Math.log(x) / Math.LN10;
|
|
46235
|
-
}
|
|
46236
|
-
var ibanLookup = {};
|
|
46237
|
-
for (let i2 = 0;i2 < 10; i2++) {
|
|
46238
|
-
ibanLookup[String(i2)] = String(i2);
|
|
46239
|
-
}
|
|
46240
|
-
for (let i2 = 0;i2 < 26; i2++) {
|
|
46241
|
-
ibanLookup[String.fromCharCode(65 + i2)] = String(10 + i2);
|
|
46242
|
-
}
|
|
46243
|
-
var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));
|
|
46244
|
-
function ibanChecksum(address) {
|
|
46245
|
-
address = address.toUpperCase();
|
|
46246
|
-
address = address.substring(4) + address.substring(0, 2) + "00";
|
|
46247
|
-
let expanded = address.split("").map((c) => {
|
|
46248
|
-
return ibanLookup[c];
|
|
46249
|
-
}).join("");
|
|
46250
|
-
while (expanded.length >= safeDigits) {
|
|
46251
|
-
let block = expanded.substring(0, safeDigits);
|
|
46252
|
-
expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
|
|
46253
|
-
}
|
|
46254
|
-
let checksum = String(98 - parseInt(expanded, 10) % 97);
|
|
46255
|
-
while (checksum.length < 2) {
|
|
46256
|
-
checksum = "0" + checksum;
|
|
46257
|
-
}
|
|
46258
|
-
return checksum;
|
|
46259
|
-
}
|
|
46260
|
-
function getAddress(address) {
|
|
46261
|
-
let result = null;
|
|
46262
|
-
if (typeof address !== "string") {
|
|
46263
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46264
|
-
}
|
|
46265
|
-
if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
|
|
46266
|
-
if (address.substring(0, 2) !== "0x") {
|
|
46267
|
-
address = "0x" + address;
|
|
46268
|
-
}
|
|
46269
|
-
result = getChecksumAddress(address);
|
|
46270
|
-
if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
|
|
46271
|
-
logger5.throwArgumentError("bad address checksum", "address", address);
|
|
46272
|
-
}
|
|
46273
|
-
} else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
|
|
46274
|
-
if (address.substring(2, 4) !== ibanChecksum(address)) {
|
|
46275
|
-
logger5.throwArgumentError("bad icap checksum", "address", address);
|
|
46276
|
-
}
|
|
46277
|
-
result = _base36To16(address.substring(4));
|
|
46278
|
-
while (result.length < 40) {
|
|
46279
|
-
result = "0" + result;
|
|
46280
|
-
}
|
|
46281
|
-
result = getChecksumAddress("0x" + result);
|
|
46282
|
-
} else {
|
|
46283
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46284
|
-
}
|
|
46285
|
-
return result;
|
|
46286
|
-
}
|
|
46287
|
-
function isAddress(address) {
|
|
46288
|
-
try {
|
|
46289
|
-
getAddress(address);
|
|
46290
|
-
return true;
|
|
46291
|
-
} catch (error) {}
|
|
46292
|
-
return false;
|
|
46293
|
-
}
|
|
46294
|
-
function getIcapAddress(address) {
|
|
46295
|
-
let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();
|
|
46296
|
-
while (base36.length < 30) {
|
|
46297
|
-
base36 = "0" + base36;
|
|
46298
|
-
}
|
|
46299
|
-
return "XE" + ibanChecksum("XE00" + base36) + base36;
|
|
46300
|
-
}
|
|
46301
|
-
function getContractAddress(transaction) {
|
|
46302
|
-
let from2 = null;
|
|
46303
|
-
try {
|
|
46304
|
-
from2 = getAddress(transaction.from);
|
|
46305
|
-
} catch (error) {
|
|
46306
|
-
logger5.throwArgumentError("missing from address", "transaction", transaction);
|
|
46307
|
-
}
|
|
46308
|
-
const nonce = import_bytes3.stripZeros(import_bytes3.arrayify(BigNumber.from(transaction.nonce).toHexString()));
|
|
46309
|
-
return getAddress(import_bytes3.hexDataSlice(import_keccak256.keccak256(import_rlp.encode([from2, nonce])), 12));
|
|
46310
|
-
}
|
|
46311
|
-
function getCreate2Address(from2, salt, initCodeHash) {
|
|
46312
|
-
if (import_bytes3.hexDataLength(salt) !== 32) {
|
|
46313
|
-
logger5.throwArgumentError("salt must be 32 bytes", "salt", salt);
|
|
46314
|
-
}
|
|
46315
|
-
if (import_bytes3.hexDataLength(initCodeHash) !== 32) {
|
|
46316
|
-
logger5.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash);
|
|
46317
|
-
}
|
|
46318
|
-
return getAddress(import_bytes3.hexDataSlice(import_keccak256.keccak256(import_bytes3.concat(["0xff", getAddress(from2), salt, initCodeHash])), 12));
|
|
46319
|
-
}
|
|
46320
|
-
|
|
46321
46192
|
// node_modules/@ethersproject/contracts/lib.esm/index.js
|
|
46322
|
-
var
|
|
46193
|
+
var import_address2 = __toESM(require_lib7());
|
|
46194
|
+
var import_bytes3 = __toESM(require_lib2());
|
|
46323
46195
|
var import_properties3 = __toESM(require_lib4());
|
|
46324
46196
|
var import_transactions = __toESM(require_lib15());
|
|
46325
46197
|
|
|
46326
46198
|
// node_modules/@ethersproject/contracts/lib.esm/_version.js
|
|
46327
|
-
var
|
|
46199
|
+
var version7 = "contracts/5.7.0";
|
|
46328
46200
|
|
|
46329
46201
|
// node_modules/@ethersproject/contracts/lib.esm/index.js
|
|
46330
46202
|
var __awaiter3 = function(thisArg, _arguments, P, generator) {
|
|
@@ -46354,7 +46226,7 @@ var __awaiter3 = function(thisArg, _arguments, P, generator) {
|
|
|
46354
46226
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46355
46227
|
});
|
|
46356
46228
|
};
|
|
46357
|
-
var
|
|
46229
|
+
var logger5 = new Logger(version7);
|
|
46358
46230
|
var allowedTransactionKeys2 = {
|
|
46359
46231
|
chainId: true,
|
|
46360
46232
|
data: true,
|
|
@@ -46375,19 +46247,19 @@ function resolveName(resolver, nameOrPromise) {
|
|
|
46375
46247
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46376
46248
|
const name = yield nameOrPromise;
|
|
46377
46249
|
if (typeof name !== "string") {
|
|
46378
|
-
|
|
46250
|
+
logger5.throwArgumentError("invalid address or ENS name", "name", name);
|
|
46379
46251
|
}
|
|
46380
46252
|
try {
|
|
46381
|
-
return getAddress(name);
|
|
46253
|
+
return import_address2.getAddress(name);
|
|
46382
46254
|
} catch (error) {}
|
|
46383
46255
|
if (!resolver) {
|
|
46384
|
-
|
|
46256
|
+
logger5.throwError("a provider or signer is needed to resolve ENS names", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46385
46257
|
operation: "resolveName"
|
|
46386
46258
|
});
|
|
46387
46259
|
}
|
|
46388
46260
|
const address = yield resolver.resolveName(name);
|
|
46389
46261
|
if (address == null) {
|
|
46390
|
-
|
|
46262
|
+
logger5.throwArgumentError("resolver or addr is not configured for ENS name", "name", name);
|
|
46391
46263
|
}
|
|
46392
46264
|
return address;
|
|
46393
46265
|
});
|
|
@@ -46407,7 +46279,7 @@ function resolveAddresses(resolver, value, paramType) {
|
|
|
46407
46279
|
}
|
|
46408
46280
|
if (paramType.baseType === "array") {
|
|
46409
46281
|
if (!Array.isArray(value)) {
|
|
46410
|
-
return Promise.reject(
|
|
46282
|
+
return Promise.reject(logger5.makeError("invalid value for array", Logger.errors.INVALID_ARGUMENT, {
|
|
46411
46283
|
argument: "value",
|
|
46412
46284
|
value
|
|
46413
46285
|
}));
|
|
@@ -46423,15 +46295,15 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46423
46295
|
if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === "object") {
|
|
46424
46296
|
overrides = import_properties3.shallowCopy(args.pop());
|
|
46425
46297
|
}
|
|
46426
|
-
|
|
46298
|
+
logger5.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract");
|
|
46427
46299
|
if (contract.signer) {
|
|
46428
46300
|
if (overrides.from) {
|
|
46429
46301
|
overrides.from = import_properties3.resolveProperties({
|
|
46430
46302
|
override: resolveName(contract.signer, overrides.from),
|
|
46431
46303
|
signer: contract.signer.getAddress()
|
|
46432
46304
|
}).then((check) => __awaiter3(this, undefined, undefined, function* () {
|
|
46433
|
-
if (getAddress(check.signer) !== check.override) {
|
|
46434
|
-
|
|
46305
|
+
if (import_address2.getAddress(check.signer) !== check.override) {
|
|
46306
|
+
logger5.throwError("Contract with a Signer cannot override from", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46435
46307
|
operation: "overrides.from"
|
|
46436
46308
|
});
|
|
46437
46309
|
}
|
|
@@ -46480,7 +46352,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46480
46352
|
}
|
|
46481
46353
|
if (tx.gasLimit == null && fragment.gas != null) {
|
|
46482
46354
|
let intrinsic = 21000;
|
|
46483
|
-
const bytes =
|
|
46355
|
+
const bytes = import_bytes3.arrayify(data);
|
|
46484
46356
|
for (let i2 = 0;i2 < bytes.length; i2++) {
|
|
46485
46357
|
intrinsic += 4;
|
|
46486
46358
|
if (bytes[i2]) {
|
|
@@ -46492,7 +46364,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46492
46364
|
if (ro.value) {
|
|
46493
46365
|
const roValue = BigNumber.from(ro.value);
|
|
46494
46366
|
if (!roValue.isZero() && !fragment.payable) {
|
|
46495
|
-
|
|
46367
|
+
logger5.throwError("non-payable method cannot override value", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46496
46368
|
operation: "overrides.value",
|
|
46497
46369
|
value: overrides.value
|
|
46498
46370
|
});
|
|
@@ -46518,7 +46390,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46518
46390
|
delete overrides.ccipReadEnabled;
|
|
46519
46391
|
const leftovers = Object.keys(overrides).filter((key) => overrides[key] != null);
|
|
46520
46392
|
if (leftovers.length) {
|
|
46521
|
-
|
|
46393
|
+
logger5.throwError(`cannot override ${leftovers.map((l) => JSON.stringify(l)).join(",")}`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46522
46394
|
operation: "overrides",
|
|
46523
46395
|
overrides: leftovers
|
|
46524
46396
|
});
|
|
@@ -46536,7 +46408,7 @@ function buildEstimate(contract, fragment) {
|
|
|
46536
46408
|
return function(...args) {
|
|
46537
46409
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46538
46410
|
if (!signerOrProvider) {
|
|
46539
|
-
|
|
46411
|
+
logger5.throwError("estimate require a provider or signer", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46540
46412
|
operation: "estimateGas"
|
|
46541
46413
|
});
|
|
46542
46414
|
}
|
|
@@ -46620,7 +46492,7 @@ function buildSend(contract, fragment) {
|
|
|
46620
46492
|
return function(...args) {
|
|
46621
46493
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46622
46494
|
if (!contract.signer) {
|
|
46623
|
-
|
|
46495
|
+
logger5.throwError("sending a transaction requires a signer", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46624
46496
|
operation: "sendTransaction"
|
|
46625
46497
|
});
|
|
46626
46498
|
}
|
|
@@ -46711,7 +46583,7 @@ class FragmentRunningEvent extends RunningEvent {
|
|
|
46711
46583
|
let topic = contractInterface.getEventTopic(fragment);
|
|
46712
46584
|
if (topics) {
|
|
46713
46585
|
if (topic !== topics[0]) {
|
|
46714
|
-
|
|
46586
|
+
logger5.throwArgumentError("topic mismatch", "topics", topics);
|
|
46715
46587
|
}
|
|
46716
46588
|
filter.topics = topics.slice();
|
|
46717
46589
|
} else {
|
|
@@ -46780,7 +46652,7 @@ class BaseContract {
|
|
|
46780
46652
|
import_properties3.defineReadOnly(this, "provider", signerOrProvider);
|
|
46781
46653
|
import_properties3.defineReadOnly(this, "signer", null);
|
|
46782
46654
|
} else {
|
|
46783
|
-
|
|
46655
|
+
logger5.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider);
|
|
46784
46656
|
}
|
|
46785
46657
|
import_properties3.defineReadOnly(this, "callStatic", {});
|
|
46786
46658
|
import_properties3.defineReadOnly(this, "estimateGas", {});
|
|
@@ -46807,23 +46679,23 @@ class BaseContract {
|
|
|
46807
46679
|
if (filters.length === 1) {
|
|
46808
46680
|
import_properties3.defineReadOnly(this.filters, name, this.filters[filters[0]]);
|
|
46809
46681
|
} else {
|
|
46810
|
-
|
|
46682
|
+
logger5.warn(`Duplicate definition of ${name} (${filters.join(", ")})`);
|
|
46811
46683
|
}
|
|
46812
46684
|
});
|
|
46813
46685
|
}
|
|
46814
46686
|
import_properties3.defineReadOnly(this, "_runningEvents", {});
|
|
46815
46687
|
import_properties3.defineReadOnly(this, "_wrappedEmits", {});
|
|
46816
46688
|
if (addressOrName == null) {
|
|
46817
|
-
|
|
46689
|
+
logger5.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName);
|
|
46818
46690
|
}
|
|
46819
46691
|
import_properties3.defineReadOnly(this, "address", addressOrName);
|
|
46820
46692
|
if (this.provider) {
|
|
46821
46693
|
import_properties3.defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName));
|
|
46822
46694
|
} else {
|
|
46823
46695
|
try {
|
|
46824
|
-
import_properties3.defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName)));
|
|
46696
|
+
import_properties3.defineReadOnly(this, "resolvedAddress", Promise.resolve(import_address2.getAddress(addressOrName)));
|
|
46825
46697
|
} catch (error) {
|
|
46826
|
-
|
|
46698
|
+
logger5.throwError("provider is required to use ENS name as contract address", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46827
46699
|
operation: "new Contract"
|
|
46828
46700
|
});
|
|
46829
46701
|
}
|
|
@@ -46834,7 +46706,7 @@ class BaseContract {
|
|
|
46834
46706
|
Object.keys(this.interface.functions).forEach((signature) => {
|
|
46835
46707
|
const fragment = this.interface.functions[signature];
|
|
46836
46708
|
if (uniqueSignatures[signature]) {
|
|
46837
|
-
|
|
46709
|
+
logger5.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`);
|
|
46838
46710
|
return;
|
|
46839
46711
|
}
|
|
46840
46712
|
uniqueSignatures[signature] = true;
|
|
@@ -46888,7 +46760,7 @@ class BaseContract {
|
|
|
46888
46760
|
});
|
|
46889
46761
|
}
|
|
46890
46762
|
static getContractAddress(transaction) {
|
|
46891
|
-
return getContractAddress(transaction);
|
|
46763
|
+
return import_address2.getContractAddress(transaction);
|
|
46892
46764
|
}
|
|
46893
46765
|
static getInterface(contractInterface) {
|
|
46894
46766
|
if (import_abi.Interface.isInterface(contractInterface)) {
|
|
@@ -46908,7 +46780,7 @@ class BaseContract {
|
|
|
46908
46780
|
} else {
|
|
46909
46781
|
this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code2) => {
|
|
46910
46782
|
if (code2 === "0x") {
|
|
46911
|
-
|
|
46783
|
+
logger5.throwError("contract not deployed", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46912
46784
|
contractAddress: this.address,
|
|
46913
46785
|
operation: "getDeployed"
|
|
46914
46786
|
});
|
|
@@ -46921,14 +46793,14 @@ class BaseContract {
|
|
|
46921
46793
|
}
|
|
46922
46794
|
fallback(overrides) {
|
|
46923
46795
|
if (!this.signer) {
|
|
46924
|
-
|
|
46796
|
+
logger5.throwError("sending a transactions require a signer", Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" });
|
|
46925
46797
|
}
|
|
46926
46798
|
const tx = import_properties3.shallowCopy(overrides || {});
|
|
46927
46799
|
["from", "to"].forEach(function(key) {
|
|
46928
46800
|
if (tx[key] == null) {
|
|
46929
46801
|
return;
|
|
46930
46802
|
}
|
|
46931
|
-
|
|
46803
|
+
logger5.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });
|
|
46932
46804
|
});
|
|
46933
46805
|
tx.to = this.resolvedAddress;
|
|
46934
46806
|
return this.deployed().then(() => {
|
|
@@ -47021,7 +46893,7 @@ class BaseContract {
|
|
|
47021
46893
|
}
|
|
47022
46894
|
_addEventListener(runningEvent, listener, once3) {
|
|
47023
46895
|
if (!this.provider) {
|
|
47024
|
-
|
|
46896
|
+
logger5.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" });
|
|
47025
46897
|
}
|
|
47026
46898
|
runningEvent.addListener(listener, once3);
|
|
47027
46899
|
this._runningEvents[runningEvent.tag] = runningEvent;
|
|
@@ -47052,9 +46924,9 @@ class BaseContract {
|
|
|
47052
46924
|
queryFilter(event, fromBlockOrBlockhash, toBlock) {
|
|
47053
46925
|
const runningEvent = this._getRunningEvent(event);
|
|
47054
46926
|
const filter = import_properties3.shallowCopy(runningEvent.filter);
|
|
47055
|
-
if (typeof fromBlockOrBlockhash === "string" &&
|
|
46927
|
+
if (typeof fromBlockOrBlockhash === "string" && import_bytes3.isHexString(fromBlockOrBlockhash, 32)) {
|
|
47056
46928
|
if (toBlock != null) {
|
|
47057
|
-
|
|
46929
|
+
logger5.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock);
|
|
47058
46930
|
}
|
|
47059
46931
|
filter.blockHash = fromBlockOrBlockhash;
|
|
47060
46932
|
} else {
|
|
@@ -47147,8 +47019,8 @@ class ContractFactory {
|
|
|
47147
47019
|
let bytecodeHex = null;
|
|
47148
47020
|
if (typeof bytecode === "string") {
|
|
47149
47021
|
bytecodeHex = bytecode;
|
|
47150
|
-
} else if (
|
|
47151
|
-
bytecodeHex =
|
|
47022
|
+
} else if (import_bytes3.isBytes(bytecode)) {
|
|
47023
|
+
bytecodeHex = import_bytes3.hexlify(bytecode);
|
|
47152
47024
|
} else if (bytecode && typeof bytecode.object === "string") {
|
|
47153
47025
|
bytecodeHex = bytecode.object;
|
|
47154
47026
|
} else {
|
|
@@ -47157,11 +47029,11 @@ class ContractFactory {
|
|
|
47157
47029
|
if (bytecodeHex.substring(0, 2) !== "0x") {
|
|
47158
47030
|
bytecodeHex = "0x" + bytecodeHex;
|
|
47159
47031
|
}
|
|
47160
|
-
if (!
|
|
47161
|
-
|
|
47032
|
+
if (!import_bytes3.isHexString(bytecodeHex) || bytecodeHex.length % 2) {
|
|
47033
|
+
logger5.throwArgumentError("invalid bytecode", "bytecode", bytecode);
|
|
47162
47034
|
}
|
|
47163
47035
|
if (signer && !Signer.isSigner(signer)) {
|
|
47164
|
-
|
|
47036
|
+
logger5.throwArgumentError("invalid signer", "signer", signer);
|
|
47165
47037
|
}
|
|
47166
47038
|
import_properties3.defineReadOnly(this, "bytecode", bytecodeHex);
|
|
47167
47039
|
import_properties3.defineReadOnly(this, "interface", import_properties3.getStatic(new.target, "getInterface")(contractInterface));
|
|
@@ -47181,19 +47053,19 @@ class ContractFactory {
|
|
|
47181
47053
|
if (tx[key] == null) {
|
|
47182
47054
|
return;
|
|
47183
47055
|
}
|
|
47184
|
-
|
|
47056
|
+
logger5.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });
|
|
47185
47057
|
});
|
|
47186
47058
|
if (tx.value) {
|
|
47187
47059
|
const value = BigNumber.from(tx.value);
|
|
47188
47060
|
if (!value.isZero() && !this.interface.deploy.payable) {
|
|
47189
|
-
|
|
47061
|
+
logger5.throwError("non-payable constructor cannot override value", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
47190
47062
|
operation: "overrides.value",
|
|
47191
47063
|
value: tx.value
|
|
47192
47064
|
});
|
|
47193
47065
|
}
|
|
47194
47066
|
}
|
|
47195
|
-
|
|
47196
|
-
tx.data =
|
|
47067
|
+
logger5.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor");
|
|
47068
|
+
tx.data = import_bytes3.hexlify(import_bytes3.concat([
|
|
47197
47069
|
this.bytecode,
|
|
47198
47070
|
this.interface.encodeDeploy(args)
|
|
47199
47071
|
]));
|
|
@@ -47205,7 +47077,7 @@ class ContractFactory {
|
|
|
47205
47077
|
if (args.length === this.interface.deploy.inputs.length + 1) {
|
|
47206
47078
|
overrides = args.pop();
|
|
47207
47079
|
}
|
|
47208
|
-
|
|
47080
|
+
logger5.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor");
|
|
47209
47081
|
const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs);
|
|
47210
47082
|
params.push(overrides);
|
|
47211
47083
|
const unsignedTx = this.getDeployTransaction(...params);
|
|
@@ -47225,7 +47097,7 @@ class ContractFactory {
|
|
|
47225
47097
|
}
|
|
47226
47098
|
static fromSolidity(compilerOutput, signer) {
|
|
47227
47099
|
if (compilerOutput == null) {
|
|
47228
|
-
|
|
47100
|
+
logger5.throwError("missing compiler output", Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" });
|
|
47229
47101
|
}
|
|
47230
47102
|
if (typeof compilerOutput === "string") {
|
|
47231
47103
|
compilerOutput = JSON.parse(compilerOutput);
|
|
@@ -47243,7 +47115,7 @@ class ContractFactory {
|
|
|
47243
47115
|
return Contract.getInterface(contractInterface);
|
|
47244
47116
|
}
|
|
47245
47117
|
static getContractAddress(tx) {
|
|
47246
|
-
return getContractAddress(tx);
|
|
47118
|
+
return import_address2.getContractAddress(tx);
|
|
47247
47119
|
}
|
|
47248
47120
|
static getContract(address, contractInterface, signer) {
|
|
47249
47121
|
return new Contract(address, contractInterface, signer);
|
|
@@ -47251,10 +47123,11 @@ class ContractFactory {
|
|
|
47251
47123
|
}
|
|
47252
47124
|
|
|
47253
47125
|
// node_modules/@ethersproject/wallet/lib.esm/index.js
|
|
47254
|
-
var
|
|
47126
|
+
var import_address3 = __toESM(require_lib7());
|
|
47127
|
+
var import_bytes4 = __toESM(require_lib2());
|
|
47255
47128
|
var import_hash = __toESM(require_lib12());
|
|
47256
47129
|
var import_hdnode = __toESM(require_lib20());
|
|
47257
|
-
var
|
|
47130
|
+
var import_keccak256 = __toESM(require_lib5());
|
|
47258
47131
|
var import_properties4 = __toESM(require_lib4());
|
|
47259
47132
|
var import_random = __toESM(require_lib21());
|
|
47260
47133
|
var import_signing_key = __toESM(require_lib14());
|
|
@@ -47262,7 +47135,7 @@ var import_json_wallets = __toESM(require_lib22());
|
|
|
47262
47135
|
var import_transactions2 = __toESM(require_lib15());
|
|
47263
47136
|
|
|
47264
47137
|
// node_modules/@ethersproject/wallet/lib.esm/_version.js
|
|
47265
|
-
var
|
|
47138
|
+
var version8 = "wallet/5.7.0";
|
|
47266
47139
|
|
|
47267
47140
|
// node_modules/@ethersproject/wallet/lib.esm/index.js
|
|
47268
47141
|
var __awaiter4 = function(thisArg, _arguments, P, generator) {
|
|
@@ -47292,9 +47165,9 @@ var __awaiter4 = function(thisArg, _arguments, P, generator) {
|
|
|
47292
47165
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47293
47166
|
});
|
|
47294
47167
|
};
|
|
47295
|
-
var
|
|
47168
|
+
var logger6 = new Logger(version8);
|
|
47296
47169
|
function isAccount(value) {
|
|
47297
|
-
return value != null &&
|
|
47170
|
+
return value != null && import_bytes4.isHexString(value.privateKey, 32) && value.address != null;
|
|
47298
47171
|
}
|
|
47299
47172
|
function hasMnemonic(value) {
|
|
47300
47173
|
const mnemonic = value.mnemonic;
|
|
@@ -47308,8 +47181,8 @@ class Wallet extends Signer {
|
|
|
47308
47181
|
const signingKey = new import_signing_key.SigningKey(privateKey.privateKey);
|
|
47309
47182
|
import_properties4.defineReadOnly(this, "_signingKey", () => signingKey);
|
|
47310
47183
|
import_properties4.defineReadOnly(this, "address", import_transactions2.computeAddress(this.publicKey));
|
|
47311
|
-
if (this.address !== getAddress(privateKey.address)) {
|
|
47312
|
-
|
|
47184
|
+
if (this.address !== import_address3.getAddress(privateKey.address)) {
|
|
47185
|
+
logger6.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]");
|
|
47313
47186
|
}
|
|
47314
47187
|
if (hasMnemonic(privateKey)) {
|
|
47315
47188
|
const srcMnemonic = privateKey.mnemonic;
|
|
@@ -47321,7 +47194,7 @@ class Wallet extends Signer {
|
|
|
47321
47194
|
const mnemonic = this.mnemonic;
|
|
47322
47195
|
const node = import_hdnode.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);
|
|
47323
47196
|
if (import_transactions2.computeAddress(node.privateKey) !== this.address) {
|
|
47324
|
-
|
|
47197
|
+
logger6.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]");
|
|
47325
47198
|
}
|
|
47326
47199
|
} else {
|
|
47327
47200
|
import_properties4.defineReadOnly(this, "_mnemonic", () => null);
|
|
@@ -47329,7 +47202,7 @@ class Wallet extends Signer {
|
|
|
47329
47202
|
} else {
|
|
47330
47203
|
if (import_signing_key.SigningKey.isSigningKey(privateKey)) {
|
|
47331
47204
|
if (privateKey.curve !== "secp256k1") {
|
|
47332
|
-
|
|
47205
|
+
logger6.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]");
|
|
47333
47206
|
}
|
|
47334
47207
|
import_properties4.defineReadOnly(this, "_signingKey", () => privateKey);
|
|
47335
47208
|
} else {
|
|
@@ -47345,7 +47218,7 @@ class Wallet extends Signer {
|
|
|
47345
47218
|
import_properties4.defineReadOnly(this, "address", import_transactions2.computeAddress(this.publicKey));
|
|
47346
47219
|
}
|
|
47347
47220
|
if (provider && !Provider.isProvider(provider)) {
|
|
47348
|
-
|
|
47221
|
+
logger6.throwArgumentError("invalid provider", "provider", provider);
|
|
47349
47222
|
}
|
|
47350
47223
|
import_properties4.defineReadOnly(this, "provider", provider || null);
|
|
47351
47224
|
}
|
|
@@ -47367,32 +47240,32 @@ class Wallet extends Signer {
|
|
|
47367
47240
|
signTransaction(transaction) {
|
|
47368
47241
|
return import_properties4.resolveProperties(transaction).then((tx) => {
|
|
47369
47242
|
if (tx.from != null) {
|
|
47370
|
-
if (getAddress(tx.from) !== this.address) {
|
|
47371
|
-
|
|
47243
|
+
if (import_address3.getAddress(tx.from) !== this.address) {
|
|
47244
|
+
logger6.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from);
|
|
47372
47245
|
}
|
|
47373
47246
|
delete tx.from;
|
|
47374
47247
|
}
|
|
47375
|
-
const signature = this._signingKey().signDigest(
|
|
47248
|
+
const signature = this._signingKey().signDigest(import_keccak256.keccak256(import_transactions2.serialize(tx)));
|
|
47376
47249
|
return import_transactions2.serialize(tx, signature);
|
|
47377
47250
|
});
|
|
47378
47251
|
}
|
|
47379
47252
|
signMessage(message) {
|
|
47380
47253
|
return __awaiter4(this, undefined, undefined, function* () {
|
|
47381
|
-
return
|
|
47254
|
+
return import_bytes4.joinSignature(this._signingKey().signDigest(import_hash.hashMessage(message)));
|
|
47382
47255
|
});
|
|
47383
47256
|
}
|
|
47384
47257
|
_signTypedData(domain, types2, value) {
|
|
47385
47258
|
return __awaiter4(this, undefined, undefined, function* () {
|
|
47386
47259
|
const populated = yield import_hash._TypedDataEncoder.resolveNames(domain, types2, value, (name) => {
|
|
47387
47260
|
if (this.provider == null) {
|
|
47388
|
-
|
|
47261
|
+
logger6.throwError("cannot resolve ENS names without a provider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
47389
47262
|
operation: "resolveName",
|
|
47390
47263
|
value: name
|
|
47391
47264
|
});
|
|
47392
47265
|
}
|
|
47393
47266
|
return this.provider.resolveName(name);
|
|
47394
47267
|
});
|
|
47395
|
-
return
|
|
47268
|
+
return import_bytes4.joinSignature(this._signingKey().signDigest(import_hash._TypedDataEncoder.hash(populated.domain, types2, populated.value)));
|
|
47396
47269
|
});
|
|
47397
47270
|
}
|
|
47398
47271
|
encrypt(password, options, progressCallback) {
|
|
@@ -47414,7 +47287,7 @@ class Wallet extends Signer {
|
|
|
47414
47287
|
options = {};
|
|
47415
47288
|
}
|
|
47416
47289
|
if (options.extraEntropy) {
|
|
47417
|
-
entropy =
|
|
47290
|
+
entropy = import_bytes4.arrayify(import_bytes4.hexDataSlice(import_keccak256.keccak256(import_bytes4.concat([entropy, options.extraEntropy])), 0, 16));
|
|
47418
47291
|
}
|
|
47419
47292
|
const mnemonic = import_hdnode.entropyToMnemonic(entropy, options.locale);
|
|
47420
47293
|
return Wallet.fromMnemonic(mnemonic, options.path, options.locale);
|
|
@@ -47505,10 +47378,10 @@ __export(exports_lib2, {
|
|
|
47505
47378
|
});
|
|
47506
47379
|
|
|
47507
47380
|
// node_modules/@ethersproject/networks/lib.esm/_version.js
|
|
47508
|
-
var
|
|
47381
|
+
var version9 = "networks/5.7.1";
|
|
47509
47382
|
|
|
47510
47383
|
// node_modules/@ethersproject/networks/lib.esm/index.js
|
|
47511
|
-
var
|
|
47384
|
+
var logger7 = new Logger(version9);
|
|
47512
47385
|
function isRenetworkable(value) {
|
|
47513
47386
|
return value && typeof value.renetwork === "function";
|
|
47514
47387
|
}
|
|
@@ -47703,12 +47576,12 @@ function getNetwork(network) {
|
|
|
47703
47576
|
const standard = networks[network.name];
|
|
47704
47577
|
if (!standard) {
|
|
47705
47578
|
if (typeof network.chainId !== "number") {
|
|
47706
|
-
|
|
47579
|
+
logger7.throwArgumentError("invalid network chainId", "network", network);
|
|
47707
47580
|
}
|
|
47708
47581
|
return network;
|
|
47709
47582
|
}
|
|
47710
47583
|
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
|
|
47711
|
-
|
|
47584
|
+
logger7.throwArgumentError("network chainId mismatch", "network", network);
|
|
47712
47585
|
}
|
|
47713
47586
|
let defaultProvider = network._defaultProvider || null;
|
|
47714
47587
|
if (defaultProvider == null && standard._defaultProvider) {
|
|
@@ -47729,7 +47602,7 @@ function getNetwork(network) {
|
|
|
47729
47602
|
// node_modules/@ethersproject/providers/lib.esm/base-provider.js
|
|
47730
47603
|
var import_base64 = __toESM(require_lib10());
|
|
47731
47604
|
var import_basex = __toESM(require_lib16());
|
|
47732
|
-
var
|
|
47605
|
+
var import_bytes6 = __toESM(require_lib2());
|
|
47733
47606
|
var import_hash2 = __toESM(require_lib12());
|
|
47734
47607
|
var import_properties6 = __toESM(require_lib4());
|
|
47735
47608
|
var import_sha2 = __toESM(require_lib17());
|
|
@@ -47738,13 +47611,14 @@ var import_web = __toESM(require_lib23());
|
|
|
47738
47611
|
var import_bech32 = __toESM(require_bech32());
|
|
47739
47612
|
|
|
47740
47613
|
// node_modules/@ethersproject/providers/lib.esm/_version.js
|
|
47741
|
-
var
|
|
47614
|
+
var version10 = "providers/5.7.2";
|
|
47742
47615
|
|
|
47743
47616
|
// node_modules/@ethersproject/providers/lib.esm/formatter.js
|
|
47744
|
-
var
|
|
47617
|
+
var import_address4 = __toESM(require_lib7());
|
|
47618
|
+
var import_bytes5 = __toESM(require_lib2());
|
|
47745
47619
|
var import_properties5 = __toESM(require_lib4());
|
|
47746
47620
|
var import_transactions3 = __toESM(require_lib15());
|
|
47747
|
-
var
|
|
47621
|
+
var logger8 = new Logger(version10);
|
|
47748
47622
|
|
|
47749
47623
|
class Formatter {
|
|
47750
47624
|
constructor() {
|
|
@@ -47901,11 +47775,11 @@ class Formatter {
|
|
|
47901
47775
|
if (!strict && value.substring(0, 2) !== "0x") {
|
|
47902
47776
|
value = "0x" + value;
|
|
47903
47777
|
}
|
|
47904
|
-
if (
|
|
47778
|
+
if (import_bytes5.isHexString(value)) {
|
|
47905
47779
|
return value.toLowerCase();
|
|
47906
47780
|
}
|
|
47907
47781
|
}
|
|
47908
|
-
return
|
|
47782
|
+
return logger8.throwArgumentError("invalid hash", "value", value);
|
|
47909
47783
|
}
|
|
47910
47784
|
data(value, strict) {
|
|
47911
47785
|
const result = this.hex(value, strict);
|
|
@@ -47915,17 +47789,17 @@ class Formatter {
|
|
|
47915
47789
|
return result;
|
|
47916
47790
|
}
|
|
47917
47791
|
address(value) {
|
|
47918
|
-
return getAddress(value);
|
|
47792
|
+
return import_address4.getAddress(value);
|
|
47919
47793
|
}
|
|
47920
47794
|
callAddress(value) {
|
|
47921
|
-
if (!
|
|
47795
|
+
if (!import_bytes5.isHexString(value, 32)) {
|
|
47922
47796
|
return null;
|
|
47923
47797
|
}
|
|
47924
|
-
const address = getAddress(
|
|
47798
|
+
const address = import_address4.getAddress(import_bytes5.hexDataSlice(value, 12));
|
|
47925
47799
|
return address === AddressZero ? null : address;
|
|
47926
47800
|
}
|
|
47927
47801
|
contractAddress(value) {
|
|
47928
|
-
return getContractAddress(value);
|
|
47802
|
+
return import_address4.getContractAddress(value);
|
|
47929
47803
|
}
|
|
47930
47804
|
blockTag(blockTag) {
|
|
47931
47805
|
if (blockTag == null) {
|
|
@@ -47943,15 +47817,15 @@ class Formatter {
|
|
|
47943
47817
|
case "finalized":
|
|
47944
47818
|
return blockTag;
|
|
47945
47819
|
}
|
|
47946
|
-
if (typeof blockTag === "number" ||
|
|
47947
|
-
return
|
|
47820
|
+
if (typeof blockTag === "number" || import_bytes5.isHexString(blockTag)) {
|
|
47821
|
+
return import_bytes5.hexValue(blockTag);
|
|
47948
47822
|
}
|
|
47949
47823
|
throw new Error("invalid blockTag");
|
|
47950
47824
|
}
|
|
47951
47825
|
hash(value, strict) {
|
|
47952
47826
|
const result = this.hex(value, strict);
|
|
47953
|
-
if (
|
|
47954
|
-
return
|
|
47827
|
+
if (import_bytes5.hexDataLength(result) !== 32) {
|
|
47828
|
+
return logger8.throwArgumentError("invalid hash", "value", value);
|
|
47955
47829
|
}
|
|
47956
47830
|
return result;
|
|
47957
47831
|
}
|
|
@@ -47966,10 +47840,10 @@ class Formatter {
|
|
|
47966
47840
|
return null;
|
|
47967
47841
|
}
|
|
47968
47842
|
uint256(value) {
|
|
47969
|
-
if (!
|
|
47843
|
+
if (!import_bytes5.isHexString(value)) {
|
|
47970
47844
|
throw new Error("invalid uint256");
|
|
47971
47845
|
}
|
|
47972
|
-
return
|
|
47846
|
+
return import_bytes5.hexZeroPad(value, 32);
|
|
47973
47847
|
}
|
|
47974
47848
|
_block(value, format2) {
|
|
47975
47849
|
if (value.author != null && value.miner == null) {
|
|
@@ -48008,7 +47882,7 @@ class Formatter {
|
|
|
48008
47882
|
const result = Formatter.check(this.formats.transaction, transaction);
|
|
48009
47883
|
if (transaction.chainId != null) {
|
|
48010
47884
|
let chainId = transaction.chainId;
|
|
48011
|
-
if (
|
|
47885
|
+
if (import_bytes5.isHexString(chainId)) {
|
|
48012
47886
|
chainId = BigNumber.from(chainId).toNumber();
|
|
48013
47887
|
}
|
|
48014
47888
|
result.chainId = chainId;
|
|
@@ -48017,7 +47891,7 @@ class Formatter {
|
|
|
48017
47891
|
if (chainId == null && result.v == null) {
|
|
48018
47892
|
chainId = transaction.chainId;
|
|
48019
47893
|
}
|
|
48020
|
-
if (
|
|
47894
|
+
if (import_bytes5.isHexString(chainId)) {
|
|
48021
47895
|
chainId = BigNumber.from(chainId).toNumber();
|
|
48022
47896
|
}
|
|
48023
47897
|
if (typeof chainId !== "number" && result.v != null) {
|
|
@@ -48050,15 +47924,15 @@ class Formatter {
|
|
|
48050
47924
|
const value2 = BigNumber.from(result.root).toNumber();
|
|
48051
47925
|
if (value2 === 0 || value2 === 1) {
|
|
48052
47926
|
if (result.status != null && result.status !== value2) {
|
|
48053
|
-
|
|
47927
|
+
logger8.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
|
48054
47928
|
}
|
|
48055
47929
|
result.status = value2;
|
|
48056
47930
|
delete result.root;
|
|
48057
47931
|
} else {
|
|
48058
|
-
|
|
47932
|
+
logger8.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
|
48059
47933
|
}
|
|
48060
47934
|
} else if (result.root.length !== 66) {
|
|
48061
|
-
|
|
47935
|
+
logger8.throwArgumentError("invalid root hash", "value.root", result.root);
|
|
48062
47936
|
}
|
|
48063
47937
|
}
|
|
48064
47938
|
if (result.status != null) {
|
|
@@ -48179,14 +48053,14 @@ var __awaiter5 = function(thisArg, _arguments, P, generator) {
|
|
|
48179
48053
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48180
48054
|
});
|
|
48181
48055
|
};
|
|
48182
|
-
var
|
|
48056
|
+
var logger9 = new Logger(version10);
|
|
48183
48057
|
var MAX_CCIP_REDIRECTS = 10;
|
|
48184
48058
|
function checkTopic(topic) {
|
|
48185
48059
|
if (topic == null) {
|
|
48186
48060
|
return "null";
|
|
48187
48061
|
}
|
|
48188
|
-
if (
|
|
48189
|
-
|
|
48062
|
+
if (import_bytes6.hexDataLength(topic) !== 32) {
|
|
48063
|
+
logger9.throwArgumentError("invalid topic", "topic", topic);
|
|
48190
48064
|
}
|
|
48191
48065
|
return topic.toLowerCase();
|
|
48192
48066
|
}
|
|
@@ -48226,7 +48100,7 @@ function deserializeTopics(data) {
|
|
|
48226
48100
|
function getEventTag2(eventName) {
|
|
48227
48101
|
if (typeof eventName === "string") {
|
|
48228
48102
|
eventName = eventName.toLowerCase();
|
|
48229
|
-
if (
|
|
48103
|
+
if (import_bytes6.hexDataLength(eventName) === 32) {
|
|
48230
48104
|
return "tx:" + eventName;
|
|
48231
48105
|
}
|
|
48232
48106
|
if (eventName.indexOf(":") === -1) {
|
|
@@ -48235,7 +48109,7 @@ function getEventTag2(eventName) {
|
|
|
48235
48109
|
} else if (Array.isArray(eventName)) {
|
|
48236
48110
|
return "filter:*:" + serializeTopics(eventName);
|
|
48237
48111
|
} else if (ForkEvent.isForkEvent(eventName)) {
|
|
48238
|
-
|
|
48112
|
+
logger9.warn("not implemented");
|
|
48239
48113
|
throw new Error("not implemented");
|
|
48240
48114
|
} else if (eventName && typeof eventName === "object") {
|
|
48241
48115
|
return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []);
|
|
@@ -48308,10 +48182,10 @@ var coinInfos = {
|
|
|
48308
48182
|
"700": { symbol: "xdai", ilk: "eth" }
|
|
48309
48183
|
};
|
|
48310
48184
|
function bytes32ify(value) {
|
|
48311
|
-
return
|
|
48185
|
+
return import_bytes6.hexZeroPad(BigNumber.from(value).toHexString(), 32);
|
|
48312
48186
|
}
|
|
48313
48187
|
function base58Encode(data) {
|
|
48314
|
-
return import_basex.Base58.encode(
|
|
48188
|
+
return import_basex.Base58.encode(import_bytes6.concat([data, import_bytes6.hexDataSlice(import_sha2.sha256(import_sha2.sha256(data)), 0, 4)]));
|
|
48315
48189
|
}
|
|
48316
48190
|
var matcherIpfs = new RegExp("^(ipfs)://(.*)$", "i");
|
|
48317
48191
|
var matchers = [
|
|
@@ -48330,9 +48204,9 @@ function _parseBytes(result, start) {
|
|
|
48330
48204
|
if (result === "0x") {
|
|
48331
48205
|
return null;
|
|
48332
48206
|
}
|
|
48333
|
-
const offset = BigNumber.from(
|
|
48334
|
-
const length = BigNumber.from(
|
|
48335
|
-
return
|
|
48207
|
+
const offset = BigNumber.from(import_bytes6.hexDataSlice(result, start, start + 32)).toNumber();
|
|
48208
|
+
const length = BigNumber.from(import_bytes6.hexDataSlice(result, offset, offset + 32)).toNumber();
|
|
48209
|
+
return import_bytes6.hexDataSlice(result, offset + 32, offset + 32 + length);
|
|
48336
48210
|
}
|
|
48337
48211
|
function getIpfsLink(link) {
|
|
48338
48212
|
if (link.match(/^ipfs:\/\/ipfs\//i)) {
|
|
@@ -48340,12 +48214,12 @@ function getIpfsLink(link) {
|
|
|
48340
48214
|
} else if (link.match(/^ipfs:\/\//i)) {
|
|
48341
48215
|
link = link.substring(7);
|
|
48342
48216
|
} else {
|
|
48343
|
-
|
|
48217
|
+
logger9.throwArgumentError("unsupported IPFS format", "link", link);
|
|
48344
48218
|
}
|
|
48345
48219
|
return `https://gateway.ipfs.io/ipfs/${link}`;
|
|
48346
48220
|
}
|
|
48347
48221
|
function numPad(value) {
|
|
48348
|
-
const result =
|
|
48222
|
+
const result = import_bytes6.arrayify(value);
|
|
48349
48223
|
if (result.length > 32) {
|
|
48350
48224
|
throw new Error("internal; should not happen");
|
|
48351
48225
|
}
|
|
@@ -48369,13 +48243,13 @@ function encodeBytes(datas) {
|
|
|
48369
48243
|
byteCount += 32;
|
|
48370
48244
|
}
|
|
48371
48245
|
for (let i2 = 0;i2 < datas.length; i2++) {
|
|
48372
|
-
const data =
|
|
48246
|
+
const data = import_bytes6.arrayify(datas[i2]);
|
|
48373
48247
|
result[i2] = numPad(byteCount);
|
|
48374
48248
|
result.push(numPad(data.length));
|
|
48375
48249
|
result.push(bytesPad(data));
|
|
48376
48250
|
byteCount += 32 + Math.ceil(data.length / 32) * 32;
|
|
48377
48251
|
}
|
|
48378
|
-
return
|
|
48252
|
+
return import_bytes6.hexConcat(result);
|
|
48379
48253
|
}
|
|
48380
48254
|
|
|
48381
48255
|
class Resolver {
|
|
@@ -48407,17 +48281,17 @@ class Resolver {
|
|
|
48407
48281
|
const tx = {
|
|
48408
48282
|
to: this.address,
|
|
48409
48283
|
ccipReadEnabled: true,
|
|
48410
|
-
data:
|
|
48284
|
+
data: import_bytes6.hexConcat([selector, import_hash2.namehash(this.name), parameters || "0x"])
|
|
48411
48285
|
};
|
|
48412
48286
|
let parseBytes = false;
|
|
48413
48287
|
if (yield this.supportsWildcard()) {
|
|
48414
48288
|
parseBytes = true;
|
|
48415
|
-
tx.data =
|
|
48289
|
+
tx.data = import_bytes6.hexConcat(["0x9061b923", encodeBytes([import_hash2.dnsEncode(this.name), tx.data])]);
|
|
48416
48290
|
}
|
|
48417
48291
|
try {
|
|
48418
48292
|
let result = yield this.provider.call(tx);
|
|
48419
|
-
if (
|
|
48420
|
-
|
|
48293
|
+
if (import_bytes6.arrayify(result).length % 32 === 4) {
|
|
48294
|
+
logger9.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, {
|
|
48421
48295
|
transaction: tx,
|
|
48422
48296
|
data: result
|
|
48423
48297
|
});
|
|
@@ -48446,20 +48320,20 @@ class Resolver {
|
|
|
48446
48320
|
_getAddress(coinType, hexBytes) {
|
|
48447
48321
|
const coinInfo = coinInfos[String(coinType)];
|
|
48448
48322
|
if (coinInfo == null) {
|
|
48449
|
-
|
|
48323
|
+
logger9.throwError(`unsupported coin type: ${coinType}`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48450
48324
|
operation: `getAddress(${coinType})`
|
|
48451
48325
|
});
|
|
48452
48326
|
}
|
|
48453
48327
|
if (coinInfo.ilk === "eth") {
|
|
48454
48328
|
return this.provider.formatter.address(hexBytes);
|
|
48455
48329
|
}
|
|
48456
|
-
const bytes =
|
|
48330
|
+
const bytes = import_bytes6.arrayify(hexBytes);
|
|
48457
48331
|
if (coinInfo.p2pkh != null) {
|
|
48458
48332
|
const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);
|
|
48459
48333
|
if (p2pkh) {
|
|
48460
48334
|
const length = parseInt(p2pkh[1], 16);
|
|
48461
48335
|
if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {
|
|
48462
|
-
return base58Encode(
|
|
48336
|
+
return base58Encode(import_bytes6.concat([[coinInfo.p2pkh], "0x" + p2pkh[2]]));
|
|
48463
48337
|
}
|
|
48464
48338
|
}
|
|
48465
48339
|
}
|
|
@@ -48468,23 +48342,23 @@ class Resolver {
|
|
|
48468
48342
|
if (p2sh) {
|
|
48469
48343
|
const length = parseInt(p2sh[1], 16);
|
|
48470
48344
|
if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {
|
|
48471
|
-
return base58Encode(
|
|
48345
|
+
return base58Encode(import_bytes6.concat([[coinInfo.p2sh], "0x" + p2sh[2]]));
|
|
48472
48346
|
}
|
|
48473
48347
|
}
|
|
48474
48348
|
}
|
|
48475
48349
|
if (coinInfo.prefix != null) {
|
|
48476
48350
|
const length = bytes[1];
|
|
48477
|
-
let
|
|
48478
|
-
if (
|
|
48351
|
+
let version11 = bytes[0];
|
|
48352
|
+
if (version11 === 0) {
|
|
48479
48353
|
if (length !== 20 && length !== 32) {
|
|
48480
|
-
|
|
48354
|
+
version11 = -1;
|
|
48481
48355
|
}
|
|
48482
48356
|
} else {
|
|
48483
|
-
|
|
48357
|
+
version11 = -1;
|
|
48484
48358
|
}
|
|
48485
|
-
if (
|
|
48359
|
+
if (version11 >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {
|
|
48486
48360
|
const words = import_bech32.default.toWords(bytes.slice(2));
|
|
48487
|
-
words.unshift(
|
|
48361
|
+
words.unshift(version11);
|
|
48488
48362
|
return import_bech32.default.encode(coinInfo.prefix, words);
|
|
48489
48363
|
}
|
|
48490
48364
|
}
|
|
@@ -48515,7 +48389,7 @@ class Resolver {
|
|
|
48515
48389
|
}
|
|
48516
48390
|
const address = this._getAddress(coinType, hexBytes);
|
|
48517
48391
|
if (address == null) {
|
|
48518
|
-
|
|
48392
|
+
logger9.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48519
48393
|
operation: `getAddress(${coinType})`,
|
|
48520
48394
|
coinType,
|
|
48521
48395
|
data: hexBytes
|
|
@@ -48558,11 +48432,11 @@ class Resolver {
|
|
|
48558
48432
|
return null;
|
|
48559
48433
|
}
|
|
48560
48434
|
const addr = yield this.provider.formatter.address(comps[0]);
|
|
48561
|
-
const tokenId =
|
|
48435
|
+
const tokenId = import_bytes6.hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);
|
|
48562
48436
|
if (scheme === "erc721") {
|
|
48563
48437
|
const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({
|
|
48564
48438
|
to: addr,
|
|
48565
|
-
data:
|
|
48439
|
+
data: import_bytes6.hexConcat(["0x6352211e", tokenId])
|
|
48566
48440
|
}));
|
|
48567
48441
|
if (owner !== tokenOwner) {
|
|
48568
48442
|
return null;
|
|
@@ -48571,7 +48445,7 @@ class Resolver {
|
|
|
48571
48445
|
} else if (scheme === "erc1155") {
|
|
48572
48446
|
const balance = BigNumber.from(yield this.provider.call({
|
|
48573
48447
|
to: addr,
|
|
48574
|
-
data:
|
|
48448
|
+
data: import_bytes6.hexConcat(["0x00fdd58e", import_bytes6.hexZeroPad(owner, 32), tokenId])
|
|
48575
48449
|
}));
|
|
48576
48450
|
if (balance.isZero()) {
|
|
48577
48451
|
return null;
|
|
@@ -48580,7 +48454,7 @@ class Resolver {
|
|
|
48580
48454
|
}
|
|
48581
48455
|
const tx = {
|
|
48582
48456
|
to: this.provider.formatter.address(comps[0]),
|
|
48583
|
-
data:
|
|
48457
|
+
data: import_bytes6.hexConcat([selector, tokenId])
|
|
48584
48458
|
};
|
|
48585
48459
|
let metadataUrl = _parseString(yield this.provider.call(tx), 0);
|
|
48586
48460
|
if (metadataUrl == null) {
|
|
@@ -48655,7 +48529,7 @@ class Resolver {
|
|
|
48655
48529
|
return "sia://" + hash;
|
|
48656
48530
|
}
|
|
48657
48531
|
}
|
|
48658
|
-
return
|
|
48532
|
+
return logger9.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48659
48533
|
operation: "getContentHash()",
|
|
48660
48534
|
data: hexBytes
|
|
48661
48535
|
});
|
|
@@ -48664,11 +48538,11 @@ class Resolver {
|
|
|
48664
48538
|
getText(key) {
|
|
48665
48539
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
48666
48540
|
let keyBytes = import_strings2.toUtf8Bytes(key);
|
|
48667
|
-
keyBytes =
|
|
48541
|
+
keyBytes = import_bytes6.concat([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);
|
|
48668
48542
|
if (keyBytes.length % 32 !== 0) {
|
|
48669
|
-
keyBytes =
|
|
48543
|
+
keyBytes = import_bytes6.concat([keyBytes, import_bytes6.hexZeroPad("0x", 32 - key.length % 32)]);
|
|
48670
48544
|
}
|
|
48671
|
-
const hexBytes = yield this._fetchBytes("0x59d1d43c",
|
|
48545
|
+
const hexBytes = yield this._fetchBytes("0x59d1d43c", import_bytes6.hexlify(keyBytes));
|
|
48672
48546
|
if (hexBytes == null || hexBytes === "0x") {
|
|
48673
48547
|
return null;
|
|
48674
48548
|
}
|
|
@@ -48700,7 +48574,7 @@ class BaseProvider extends Provider {
|
|
|
48700
48574
|
import_properties6.defineReadOnly(this, "_network", knownNetwork);
|
|
48701
48575
|
this.emit("network", knownNetwork, null);
|
|
48702
48576
|
} else {
|
|
48703
|
-
|
|
48577
|
+
logger9.throwArgumentError("invalid network", "network", network);
|
|
48704
48578
|
}
|
|
48705
48579
|
}
|
|
48706
48580
|
this._maxInternalBlockNumber = -1024;
|
|
@@ -48722,7 +48596,7 @@ class BaseProvider extends Provider {
|
|
|
48722
48596
|
network = yield this.detectNetwork();
|
|
48723
48597
|
}
|
|
48724
48598
|
if (!network) {
|
|
48725
|
-
|
|
48599
|
+
logger9.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {});
|
|
48726
48600
|
}
|
|
48727
48601
|
if (this._network == null) {
|
|
48728
48602
|
if (this.anyNetwork) {
|
|
@@ -48778,11 +48652,11 @@ class BaseProvider extends Provider {
|
|
|
48778
48652
|
}
|
|
48779
48653
|
const errorMessage = result.message || "unknown error";
|
|
48780
48654
|
if (result.status >= 400 && result.status < 500) {
|
|
48781
|
-
return
|
|
48655
|
+
return logger9.throwError(`response not found during CCIP fetch: ${errorMessage}`, Logger.errors.SERVER_ERROR, { url, errorMessage });
|
|
48782
48656
|
}
|
|
48783
48657
|
errorMessages.push(errorMessage);
|
|
48784
48658
|
}
|
|
48785
|
-
return
|
|
48659
|
+
return logger9.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(", ")}`, Logger.errors.SERVER_ERROR, {
|
|
48786
48660
|
urls,
|
|
48787
48661
|
errorMessages
|
|
48788
48662
|
});
|
|
@@ -48857,8 +48731,8 @@ class BaseProvider extends Provider {
|
|
|
48857
48731
|
this._emitted.block = blockNumber - 1;
|
|
48858
48732
|
}
|
|
48859
48733
|
if (Math.abs(this._emitted.block - blockNumber) > 1000) {
|
|
48860
|
-
|
|
48861
|
-
this.emit("error",
|
|
48734
|
+
logger9.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`);
|
|
48735
|
+
this.emit("error", logger9.makeError("network block skew detected", Logger.errors.NETWORK_ERROR, {
|
|
48862
48736
|
blockNumber,
|
|
48863
48737
|
event: "blockSkew",
|
|
48864
48738
|
previousBlockNumber: this._emitted.block
|
|
@@ -48963,7 +48837,7 @@ class BaseProvider extends Provider {
|
|
|
48963
48837
|
}
|
|
48964
48838
|
detectNetwork() {
|
|
48965
48839
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
48966
|
-
return
|
|
48840
|
+
return logger9.throwError("provider does not support network detection", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48967
48841
|
operation: "provider.detectNetwork"
|
|
48968
48842
|
});
|
|
48969
48843
|
});
|
|
@@ -48986,7 +48860,7 @@ class BaseProvider extends Provider {
|
|
|
48986
48860
|
yield stall(0);
|
|
48987
48861
|
return this._network;
|
|
48988
48862
|
}
|
|
48989
|
-
const error =
|
|
48863
|
+
const error = logger9.makeError("underlying network changed", Logger.errors.NETWORK_ERROR, {
|
|
48990
48864
|
event: "changed",
|
|
48991
48865
|
network,
|
|
48992
48866
|
detectedNetwork: currentNetwork
|
|
@@ -49153,7 +49027,7 @@ class BaseProvider extends Provider {
|
|
|
49153
49027
|
} else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) {
|
|
49154
49028
|
reason = "cancelled";
|
|
49155
49029
|
}
|
|
49156
|
-
reject(
|
|
49030
|
+
reject(logger9.makeError("transaction was replaced", Logger.errors.TRANSACTION_REPLACED, {
|
|
49157
49031
|
cancelled: reason === "replaced" || reason === "cancelled",
|
|
49158
49032
|
reason,
|
|
49159
49033
|
replacement: this._wrapTransaction(tx),
|
|
@@ -49190,7 +49064,7 @@ class BaseProvider extends Provider {
|
|
|
49190
49064
|
if (alreadyDone()) {
|
|
49191
49065
|
return;
|
|
49192
49066
|
}
|
|
49193
|
-
reject(
|
|
49067
|
+
reject(logger9.makeError("timeout exceeded", Logger.errors.TIMEOUT, { timeout }));
|
|
49194
49068
|
}, timeout);
|
|
49195
49069
|
if (timer.unref) {
|
|
49196
49070
|
timer.unref();
|
|
@@ -49214,7 +49088,7 @@ class BaseProvider extends Provider {
|
|
|
49214
49088
|
try {
|
|
49215
49089
|
return BigNumber.from(result);
|
|
49216
49090
|
} catch (error) {
|
|
49217
|
-
return
|
|
49091
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49218
49092
|
method: "getGasPrice",
|
|
49219
49093
|
result,
|
|
49220
49094
|
error
|
|
@@ -49233,7 +49107,7 @@ class BaseProvider extends Provider {
|
|
|
49233
49107
|
try {
|
|
49234
49108
|
return BigNumber.from(result);
|
|
49235
49109
|
} catch (error) {
|
|
49236
|
-
return
|
|
49110
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49237
49111
|
method: "getBalance",
|
|
49238
49112
|
params,
|
|
49239
49113
|
result,
|
|
@@ -49253,7 +49127,7 @@ class BaseProvider extends Provider {
|
|
|
49253
49127
|
try {
|
|
49254
49128
|
return BigNumber.from(result).toNumber();
|
|
49255
49129
|
} catch (error) {
|
|
49256
|
-
return
|
|
49130
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49257
49131
|
method: "getTransactionCount",
|
|
49258
49132
|
params,
|
|
49259
49133
|
result,
|
|
@@ -49271,9 +49145,9 @@ class BaseProvider extends Provider {
|
|
|
49271
49145
|
});
|
|
49272
49146
|
const result = yield this.perform("getCode", params);
|
|
49273
49147
|
try {
|
|
49274
|
-
return
|
|
49148
|
+
return import_bytes6.hexlify(result);
|
|
49275
49149
|
} catch (error) {
|
|
49276
|
-
return
|
|
49150
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49277
49151
|
method: "getCode",
|
|
49278
49152
|
params,
|
|
49279
49153
|
result,
|
|
@@ -49288,13 +49162,13 @@ class BaseProvider extends Provider {
|
|
|
49288
49162
|
const params = yield import_properties6.resolveProperties({
|
|
49289
49163
|
address: this._getAddress(addressOrName),
|
|
49290
49164
|
blockTag: this._getBlockTag(blockTag),
|
|
49291
|
-
position: Promise.resolve(position).then((p) =>
|
|
49165
|
+
position: Promise.resolve(position).then((p) => import_bytes6.hexValue(p))
|
|
49292
49166
|
});
|
|
49293
49167
|
const result = yield this.perform("getStorageAt", params);
|
|
49294
49168
|
try {
|
|
49295
|
-
return
|
|
49169
|
+
return import_bytes6.hexlify(result);
|
|
49296
49170
|
} catch (error) {
|
|
49297
|
-
return
|
|
49171
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49298
49172
|
method: "getStorageAt",
|
|
49299
49173
|
params,
|
|
49300
49174
|
result,
|
|
@@ -49304,12 +49178,12 @@ class BaseProvider extends Provider {
|
|
|
49304
49178
|
});
|
|
49305
49179
|
}
|
|
49306
49180
|
_wrapTransaction(tx, hash, startBlock) {
|
|
49307
|
-
if (hash != null &&
|
|
49181
|
+
if (hash != null && import_bytes6.hexDataLength(hash) !== 32) {
|
|
49308
49182
|
throw new Error("invalid response - sendTransaction");
|
|
49309
49183
|
}
|
|
49310
49184
|
const result = tx;
|
|
49311
49185
|
if (hash != null && tx.hash !== hash) {
|
|
49312
|
-
|
|
49186
|
+
logger9.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });
|
|
49313
49187
|
}
|
|
49314
49188
|
result.wait = (confirms, timeout) => __awaiter5(this, undefined, undefined, function* () {
|
|
49315
49189
|
if (confirms == null) {
|
|
@@ -49335,7 +49209,7 @@ class BaseProvider extends Provider {
|
|
|
49335
49209
|
}
|
|
49336
49210
|
this._emitted["t:" + tx.hash] = receipt.blockNumber;
|
|
49337
49211
|
if (receipt.status === 0) {
|
|
49338
|
-
|
|
49212
|
+
logger9.throwError("transaction failed", Logger.errors.CALL_EXCEPTION, {
|
|
49339
49213
|
transactionHash: tx.hash,
|
|
49340
49214
|
transaction: tx,
|
|
49341
49215
|
receipt
|
|
@@ -49348,7 +49222,7 @@ class BaseProvider extends Provider {
|
|
|
49348
49222
|
sendTransaction(signedTransaction) {
|
|
49349
49223
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49350
49224
|
yield this.getNetwork();
|
|
49351
|
-
const hexTx = yield Promise.resolve(signedTransaction).then((t) =>
|
|
49225
|
+
const hexTx = yield Promise.resolve(signedTransaction).then((t) => import_bytes6.hexlify(t));
|
|
49352
49226
|
const tx = this.formatter.transaction(signedTransaction);
|
|
49353
49227
|
if (tx.confirmations == null) {
|
|
49354
49228
|
tx.confirmations = 0;
|
|
@@ -49393,7 +49267,7 @@ class BaseProvider extends Provider {
|
|
|
49393
49267
|
if (values[key] == null) {
|
|
49394
49268
|
return;
|
|
49395
49269
|
}
|
|
49396
|
-
tx[key] = Promise.resolve(values[key]).then((v) => v ?
|
|
49270
|
+
tx[key] = Promise.resolve(values[key]).then((v) => v ? import_bytes6.hexlify(v) : null);
|
|
49397
49271
|
});
|
|
49398
49272
|
return this.formatter.transactionRequest(yield import_properties6.resolveProperties(tx));
|
|
49399
49273
|
});
|
|
@@ -49423,19 +49297,19 @@ class BaseProvider extends Provider {
|
|
|
49423
49297
|
_call(transaction, blockTag, attempt) {
|
|
49424
49298
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49425
49299
|
if (attempt >= MAX_CCIP_REDIRECTS) {
|
|
49426
|
-
|
|
49300
|
+
logger9.throwError("CCIP read exceeded maximum redirections", Logger.errors.SERVER_ERROR, {
|
|
49427
49301
|
redirects: attempt,
|
|
49428
49302
|
transaction
|
|
49429
49303
|
});
|
|
49430
49304
|
}
|
|
49431
49305
|
const txSender = transaction.to;
|
|
49432
49306
|
const result = yield this.perform("call", { transaction, blockTag });
|
|
49433
|
-
if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" &&
|
|
49307
|
+
if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && import_bytes6.hexDataLength(result) % 32 === 4) {
|
|
49434
49308
|
try {
|
|
49435
|
-
const data =
|
|
49436
|
-
const sender =
|
|
49309
|
+
const data = import_bytes6.hexDataSlice(result, 4);
|
|
49310
|
+
const sender = import_bytes6.hexDataSlice(data, 0, 32);
|
|
49437
49311
|
if (!BigNumber.from(sender).eq(txSender)) {
|
|
49438
|
-
|
|
49312
|
+
logger9.throwError("CCIP Read sender did not match", Logger.errors.CALL_EXCEPTION, {
|
|
49439
49313
|
name: "OffchainLookup",
|
|
49440
49314
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49441
49315
|
transaction,
|
|
@@ -49443,13 +49317,13 @@ class BaseProvider extends Provider {
|
|
|
49443
49317
|
});
|
|
49444
49318
|
}
|
|
49445
49319
|
const urls = [];
|
|
49446
|
-
const urlsOffset = BigNumber.from(
|
|
49447
|
-
const urlsLength = BigNumber.from(
|
|
49448
|
-
const urlsData =
|
|
49320
|
+
const urlsOffset = BigNumber.from(import_bytes6.hexDataSlice(data, 32, 64)).toNumber();
|
|
49321
|
+
const urlsLength = BigNumber.from(import_bytes6.hexDataSlice(data, urlsOffset, urlsOffset + 32)).toNumber();
|
|
49322
|
+
const urlsData = import_bytes6.hexDataSlice(data, urlsOffset + 32);
|
|
49449
49323
|
for (let u = 0;u < urlsLength; u++) {
|
|
49450
49324
|
const url = _parseString(urlsData, u * 32);
|
|
49451
49325
|
if (url == null) {
|
|
49452
|
-
|
|
49326
|
+
logger9.throwError("CCIP Read contained corrupt URL string", Logger.errors.CALL_EXCEPTION, {
|
|
49453
49327
|
name: "OffchainLookup",
|
|
49454
49328
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49455
49329
|
transaction,
|
|
@@ -49459,19 +49333,19 @@ class BaseProvider extends Provider {
|
|
|
49459
49333
|
urls.push(url);
|
|
49460
49334
|
}
|
|
49461
49335
|
const calldata = _parseBytes(data, 64);
|
|
49462
|
-
if (!BigNumber.from(
|
|
49463
|
-
|
|
49336
|
+
if (!BigNumber.from(import_bytes6.hexDataSlice(data, 100, 128)).isZero()) {
|
|
49337
|
+
logger9.throwError("CCIP Read callback selector included junk", Logger.errors.CALL_EXCEPTION, {
|
|
49464
49338
|
name: "OffchainLookup",
|
|
49465
49339
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49466
49340
|
transaction,
|
|
49467
49341
|
data: result
|
|
49468
49342
|
});
|
|
49469
49343
|
}
|
|
49470
|
-
const callbackSelector =
|
|
49344
|
+
const callbackSelector = import_bytes6.hexDataSlice(data, 96, 100);
|
|
49471
49345
|
const extraData = _parseBytes(data, 128);
|
|
49472
49346
|
const ccipResult = yield this.ccipReadFetch(transaction, calldata, urls);
|
|
49473
49347
|
if (ccipResult == null) {
|
|
49474
|
-
|
|
49348
|
+
logger9.throwError("CCIP Read disabled or provided no URLs", Logger.errors.CALL_EXCEPTION, {
|
|
49475
49349
|
name: "OffchainLookup",
|
|
49476
49350
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49477
49351
|
transaction,
|
|
@@ -49480,7 +49354,7 @@ class BaseProvider extends Provider {
|
|
|
49480
49354
|
}
|
|
49481
49355
|
const tx = {
|
|
49482
49356
|
to: txSender,
|
|
49483
|
-
data:
|
|
49357
|
+
data: import_bytes6.hexConcat([callbackSelector, encodeBytes([ccipResult, extraData])])
|
|
49484
49358
|
};
|
|
49485
49359
|
return this._call(tx, blockTag, attempt + 1);
|
|
49486
49360
|
} catch (error) {
|
|
@@ -49490,9 +49364,9 @@ class BaseProvider extends Provider {
|
|
|
49490
49364
|
}
|
|
49491
49365
|
}
|
|
49492
49366
|
try {
|
|
49493
|
-
return
|
|
49367
|
+
return import_bytes6.hexlify(result);
|
|
49494
49368
|
} catch (error) {
|
|
49495
|
-
return
|
|
49369
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49496
49370
|
method: "call",
|
|
49497
49371
|
params: { transaction, blockTag },
|
|
49498
49372
|
result,
|
|
@@ -49522,7 +49396,7 @@ class BaseProvider extends Provider {
|
|
|
49522
49396
|
try {
|
|
49523
49397
|
return BigNumber.from(result);
|
|
49524
49398
|
} catch (error) {
|
|
49525
|
-
return
|
|
49399
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49526
49400
|
method: "estimateGas",
|
|
49527
49401
|
params,
|
|
49528
49402
|
result,
|
|
@@ -49535,11 +49409,11 @@ class BaseProvider extends Provider {
|
|
|
49535
49409
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49536
49410
|
addressOrName = yield addressOrName;
|
|
49537
49411
|
if (typeof addressOrName !== "string") {
|
|
49538
|
-
|
|
49412
|
+
logger9.throwArgumentError("invalid address or ENS name", "name", addressOrName);
|
|
49539
49413
|
}
|
|
49540
49414
|
const address = yield this.resolveName(addressOrName);
|
|
49541
49415
|
if (address == null) {
|
|
49542
|
-
|
|
49416
|
+
logger9.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
49543
49417
|
operation: `resolveName(${JSON.stringify(addressOrName)})`
|
|
49544
49418
|
});
|
|
49545
49419
|
}
|
|
@@ -49554,16 +49428,16 @@ class BaseProvider extends Provider {
|
|
|
49554
49428
|
const params = {
|
|
49555
49429
|
includeTransactions: !!includeTransactions
|
|
49556
49430
|
};
|
|
49557
|
-
if (
|
|
49431
|
+
if (import_bytes6.isHexString(blockHashOrBlockTag, 32)) {
|
|
49558
49432
|
params.blockHash = blockHashOrBlockTag;
|
|
49559
49433
|
} else {
|
|
49560
49434
|
try {
|
|
49561
49435
|
params.blockTag = yield this._getBlockTag(blockHashOrBlockTag);
|
|
49562
|
-
if (
|
|
49436
|
+
if (import_bytes6.isHexString(params.blockTag)) {
|
|
49563
49437
|
blockNumber = parseInt(params.blockTag.substring(2), 16);
|
|
49564
49438
|
}
|
|
49565
49439
|
} catch (error) {
|
|
49566
|
-
|
|
49440
|
+
logger9.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag);
|
|
49567
49441
|
}
|
|
49568
49442
|
}
|
|
49569
49443
|
return import_web.poll(() => __awaiter5(this, undefined, undefined, function* () {
|
|
@@ -49695,7 +49569,7 @@ class BaseProvider extends Provider {
|
|
|
49695
49569
|
blockTag = yield blockTag;
|
|
49696
49570
|
if (typeof blockTag === "number" && blockTag < 0) {
|
|
49697
49571
|
if (blockTag % 1) {
|
|
49698
|
-
|
|
49572
|
+
logger9.throwArgumentError("invalid BlockTag", "blockTag", blockTag);
|
|
49699
49573
|
}
|
|
49700
49574
|
let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);
|
|
49701
49575
|
blockNumber += blockTag;
|
|
@@ -49736,7 +49610,7 @@ class BaseProvider extends Provider {
|
|
|
49736
49610
|
}
|
|
49737
49611
|
const network = yield this.getNetwork();
|
|
49738
49612
|
if (!network.ensAddress) {
|
|
49739
|
-
|
|
49613
|
+
logger9.throwError("network does not support ENS", Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });
|
|
49740
49614
|
}
|
|
49741
49615
|
try {
|
|
49742
49616
|
const addrData = yield this.call({
|
|
@@ -49754,12 +49628,12 @@ class BaseProvider extends Provider {
|
|
|
49754
49628
|
try {
|
|
49755
49629
|
return Promise.resolve(this.formatter.address(name));
|
|
49756
49630
|
} catch (error) {
|
|
49757
|
-
if (
|
|
49631
|
+
if (import_bytes6.isHexString(name)) {
|
|
49758
49632
|
throw error;
|
|
49759
49633
|
}
|
|
49760
49634
|
}
|
|
49761
49635
|
if (typeof name !== "string") {
|
|
49762
|
-
|
|
49636
|
+
logger9.throwArgumentError("invalid ENS name", "name", name);
|
|
49763
49637
|
}
|
|
49764
49638
|
const resolver = yield this.getResolver(name);
|
|
49765
49639
|
if (!resolver) {
|
|
@@ -49791,7 +49665,7 @@ class BaseProvider extends Provider {
|
|
|
49791
49665
|
getAvatar(nameOrAddress) {
|
|
49792
49666
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49793
49667
|
let resolver = null;
|
|
49794
|
-
if (
|
|
49668
|
+
if (import_bytes6.isHexString(nameOrAddress)) {
|
|
49795
49669
|
const address = this.formatter.address(nameOrAddress);
|
|
49796
49670
|
const node = address.substring(2).toLowerCase() + ".addr.reverse";
|
|
49797
49671
|
const resolverAddress = yield this._getResolver(node, "getAvatar");
|
|
@@ -49835,7 +49709,7 @@ class BaseProvider extends Provider {
|
|
|
49835
49709
|
});
|
|
49836
49710
|
}
|
|
49837
49711
|
perform(method, params) {
|
|
49838
|
-
return
|
|
49712
|
+
return logger9.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method });
|
|
49839
49713
|
}
|
|
49840
49714
|
_startEvent(event) {
|
|
49841
49715
|
this.polling = this._events.filter((e) => e.pollable()).length > 0;
|
|
@@ -49946,7 +49820,7 @@ var import_properties10 = __toESM(require_lib4());
|
|
|
49946
49820
|
var import_properties8 = __toESM(require_lib4());
|
|
49947
49821
|
|
|
49948
49822
|
// node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js
|
|
49949
|
-
var
|
|
49823
|
+
var import_bytes7 = __toESM(require_lib2());
|
|
49950
49824
|
var import_hash3 = __toESM(require_lib12());
|
|
49951
49825
|
var import_properties7 = __toESM(require_lib4());
|
|
49952
49826
|
var import_strings3 = __toESM(require_lib9());
|
|
@@ -49979,14 +49853,14 @@ var __awaiter6 = function(thisArg, _arguments, P, generator) {
|
|
|
49979
49853
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49980
49854
|
});
|
|
49981
49855
|
};
|
|
49982
|
-
var
|
|
49856
|
+
var logger10 = new Logger(version10);
|
|
49983
49857
|
var errorGas = ["call", "estimateGas"];
|
|
49984
49858
|
function spelunk(value, requireData) {
|
|
49985
49859
|
if (value == null) {
|
|
49986
49860
|
return null;
|
|
49987
49861
|
}
|
|
49988
49862
|
if (typeof value.message === "string" && value.message.match("reverted")) {
|
|
49989
|
-
const data =
|
|
49863
|
+
const data = import_bytes7.isHexString(value.data) ? value.data : null;
|
|
49990
49864
|
if (!requireData || data) {
|
|
49991
49865
|
return { message: value.message, data };
|
|
49992
49866
|
}
|
|
@@ -50014,7 +49888,7 @@ function checkError(method, error, params) {
|
|
|
50014
49888
|
if (result) {
|
|
50015
49889
|
return result.data;
|
|
50016
49890
|
}
|
|
50017
|
-
|
|
49891
|
+
logger10.throwError("missing revert data in call exception; Transaction reverted without a reason string", Logger.errors.CALL_EXCEPTION, {
|
|
50018
49892
|
data: "0x",
|
|
50019
49893
|
transaction,
|
|
50020
49894
|
error
|
|
@@ -50026,7 +49900,7 @@ function checkError(method, error, params) {
|
|
|
50026
49900
|
result = spelunk(error, false);
|
|
50027
49901
|
}
|
|
50028
49902
|
if (result) {
|
|
50029
|
-
|
|
49903
|
+
logger10.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
50030
49904
|
reason: result.message,
|
|
50031
49905
|
method,
|
|
50032
49906
|
transaction,
|
|
@@ -50044,35 +49918,35 @@ function checkError(method, error, params) {
|
|
|
50044
49918
|
}
|
|
50045
49919
|
message = (message || "").toLowerCase();
|
|
50046
49920
|
if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {
|
|
50047
|
-
|
|
49921
|
+
logger10.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
|
50048
49922
|
error,
|
|
50049
49923
|
method,
|
|
50050
49924
|
transaction
|
|
50051
49925
|
});
|
|
50052
49926
|
}
|
|
50053
49927
|
if (message.match(/nonce (is )?too low/i)) {
|
|
50054
|
-
|
|
49928
|
+
logger10.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
|
50055
49929
|
error,
|
|
50056
49930
|
method,
|
|
50057
49931
|
transaction
|
|
50058
49932
|
});
|
|
50059
49933
|
}
|
|
50060
49934
|
if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {
|
|
50061
|
-
|
|
49935
|
+
logger10.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
|
50062
49936
|
error,
|
|
50063
49937
|
method,
|
|
50064
49938
|
transaction
|
|
50065
49939
|
});
|
|
50066
49940
|
}
|
|
50067
49941
|
if (message.match(/only replay-protected/i)) {
|
|
50068
|
-
|
|
49942
|
+
logger10.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50069
49943
|
error,
|
|
50070
49944
|
method,
|
|
50071
49945
|
transaction
|
|
50072
49946
|
});
|
|
50073
49947
|
}
|
|
50074
49948
|
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {
|
|
50075
|
-
|
|
49949
|
+
logger10.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
50076
49950
|
error,
|
|
50077
49951
|
method,
|
|
50078
49952
|
transaction
|
|
@@ -50119,11 +49993,11 @@ class JsonRpcSigner extends Signer {
|
|
|
50119
49993
|
import_properties7.defineReadOnly(this, "_index", addressOrIndex);
|
|
50120
49994
|
import_properties7.defineReadOnly(this, "_address", null);
|
|
50121
49995
|
} else {
|
|
50122
|
-
|
|
49996
|
+
logger10.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex);
|
|
50123
49997
|
}
|
|
50124
49998
|
}
|
|
50125
49999
|
connect(provider) {
|
|
50126
|
-
return
|
|
50000
|
+
return logger10.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50127
50001
|
operation: "connect"
|
|
50128
50002
|
});
|
|
50129
50003
|
}
|
|
@@ -50136,7 +50010,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50136
50010
|
}
|
|
50137
50011
|
return this.provider.send("eth_accounts", []).then((accounts) => {
|
|
50138
50012
|
if (accounts.length <= this._index) {
|
|
50139
|
-
|
|
50013
|
+
logger10.throwError("unknown account #" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50140
50014
|
operation: "getAddress"
|
|
50141
50015
|
});
|
|
50142
50016
|
}
|
|
@@ -50163,7 +50037,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50163
50037
|
}
|
|
50164
50038
|
const address = yield this.provider.resolveName(to);
|
|
50165
50039
|
if (address == null) {
|
|
50166
|
-
|
|
50040
|
+
logger10.throwArgumentError("provided ENS name resolves to null", "tx.to", to);
|
|
50167
50041
|
}
|
|
50168
50042
|
return address;
|
|
50169
50043
|
}));
|
|
@@ -50174,7 +50048,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50174
50048
|
}).then(({ tx, sender }) => {
|
|
50175
50049
|
if (tx.from != null) {
|
|
50176
50050
|
if (tx.from.toLowerCase() !== sender) {
|
|
50177
|
-
|
|
50051
|
+
logger10.throwArgumentError("from address mismatch", "transaction", transaction);
|
|
50178
50052
|
}
|
|
50179
50053
|
} else {
|
|
50180
50054
|
tx.from = sender;
|
|
@@ -50184,7 +50058,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50184
50058
|
return hash;
|
|
50185
50059
|
}, (error) => {
|
|
50186
50060
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50187
|
-
|
|
50061
|
+
logger10.throwError("user rejected transaction", Logger.errors.ACTION_REJECTED, {
|
|
50188
50062
|
action: "sendTransaction",
|
|
50189
50063
|
transaction: tx
|
|
50190
50064
|
});
|
|
@@ -50194,7 +50068,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50194
50068
|
});
|
|
50195
50069
|
}
|
|
50196
50070
|
signTransaction(transaction) {
|
|
50197
|
-
return
|
|
50071
|
+
return logger10.throwError("signing transactions is unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50198
50072
|
operation: "signTransaction"
|
|
50199
50073
|
});
|
|
50200
50074
|
}
|
|
@@ -50221,10 +50095,10 @@ class JsonRpcSigner extends Signer {
|
|
|
50221
50095
|
const data = typeof message === "string" ? import_strings3.toUtf8Bytes(message) : message;
|
|
50222
50096
|
const address = yield this.getAddress();
|
|
50223
50097
|
try {
|
|
50224
|
-
return yield this.provider.send("personal_sign", [
|
|
50098
|
+
return yield this.provider.send("personal_sign", [import_bytes7.hexlify(data), address.toLowerCase()]);
|
|
50225
50099
|
} catch (error) {
|
|
50226
50100
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50227
|
-
|
|
50101
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50228
50102
|
action: "signMessage",
|
|
50229
50103
|
from: address,
|
|
50230
50104
|
messageData: message
|
|
@@ -50239,10 +50113,10 @@ class JsonRpcSigner extends Signer {
|
|
|
50239
50113
|
const data = typeof message === "string" ? import_strings3.toUtf8Bytes(message) : message;
|
|
50240
50114
|
const address = yield this.getAddress();
|
|
50241
50115
|
try {
|
|
50242
|
-
return yield this.provider.send("eth_sign", [address.toLowerCase(),
|
|
50116
|
+
return yield this.provider.send("eth_sign", [address.toLowerCase(), import_bytes7.hexlify(data)]);
|
|
50243
50117
|
} catch (error) {
|
|
50244
50118
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50245
|
-
|
|
50119
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50246
50120
|
action: "_legacySignMessage",
|
|
50247
50121
|
from: address,
|
|
50248
50122
|
messageData: message
|
|
@@ -50265,7 +50139,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50265
50139
|
]);
|
|
50266
50140
|
} catch (error) {
|
|
50267
50141
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50268
|
-
|
|
50142
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50269
50143
|
action: "_signTypedData",
|
|
50270
50144
|
from: address,
|
|
50271
50145
|
messageData: { domain: populated.domain, types: types2, value: populated.value }
|
|
@@ -50379,14 +50253,14 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50379
50253
|
try {
|
|
50380
50254
|
return getNetwork2(BigNumber.from(chainId).toNumber());
|
|
50381
50255
|
} catch (error) {
|
|
50382
|
-
return
|
|
50256
|
+
return logger10.throwError("could not detect network", Logger.errors.NETWORK_ERROR, {
|
|
50383
50257
|
chainId,
|
|
50384
50258
|
event: "invalidNetwork",
|
|
50385
50259
|
serverError: error
|
|
50386
50260
|
});
|
|
50387
50261
|
}
|
|
50388
50262
|
}
|
|
50389
|
-
return
|
|
50263
|
+
return logger10.throwError("could not detect network", Logger.errors.NETWORK_ERROR, {
|
|
50390
50264
|
event: "noNetwork"
|
|
50391
50265
|
});
|
|
50392
50266
|
});
|
|
@@ -50456,7 +50330,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50456
50330
|
case "getCode":
|
|
50457
50331
|
return ["eth_getCode", [getLowerCase(params.address), params.blockTag]];
|
|
50458
50332
|
case "getStorageAt":
|
|
50459
|
-
return ["eth_getStorageAt", [getLowerCase(params.address),
|
|
50333
|
+
return ["eth_getStorageAt", [getLowerCase(params.address), import_bytes7.hexZeroPad(params.position, 32), params.blockTag]];
|
|
50460
50334
|
case "sendTransaction":
|
|
50461
50335
|
return ["eth_sendRawTransaction", [params.signedTransaction]];
|
|
50462
50336
|
case "getBlock":
|
|
@@ -50505,7 +50379,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50505
50379
|
}
|
|
50506
50380
|
const args = this.prepareRequest(method, params);
|
|
50507
50381
|
if (args == null) {
|
|
50508
|
-
|
|
50382
|
+
logger10.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method });
|
|
50509
50383
|
}
|
|
50510
50384
|
try {
|
|
50511
50385
|
return yield this.send(args[0], args[1]);
|
|
@@ -50582,7 +50456,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50582
50456
|
if (transaction[key] == null) {
|
|
50583
50457
|
return;
|
|
50584
50458
|
}
|
|
50585
|
-
const value =
|
|
50459
|
+
const value = import_bytes7.hexValue(BigNumber.from(transaction[key]));
|
|
50586
50460
|
if (key === "gasLimit") {
|
|
50587
50461
|
key = "gas";
|
|
50588
50462
|
}
|
|
@@ -50592,7 +50466,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50592
50466
|
if (transaction[key] == null) {
|
|
50593
50467
|
return;
|
|
50594
50468
|
}
|
|
50595
|
-
result[key] =
|
|
50469
|
+
result[key] = import_bytes7.hexlify(transaction[key]);
|
|
50596
50470
|
});
|
|
50597
50471
|
if (transaction.accessList) {
|
|
50598
50472
|
result["accessList"] = import_transactions4.accessListify(transaction.accessList);
|
|
@@ -50609,9 +50483,9 @@ try {
|
|
|
50609
50483
|
throw new Error("inject please");
|
|
50610
50484
|
}
|
|
50611
50485
|
} catch (error) {
|
|
50612
|
-
const
|
|
50486
|
+
const logger11 = new Logger(version10);
|
|
50613
50487
|
WS = function() {
|
|
50614
|
-
|
|
50488
|
+
logger11.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50615
50489
|
operation: "new WebSocket()"
|
|
50616
50490
|
});
|
|
50617
50491
|
};
|
|
@@ -50645,13 +50519,13 @@ var __awaiter7 = function(thisArg, _arguments, P, generator) {
|
|
|
50645
50519
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50646
50520
|
});
|
|
50647
50521
|
};
|
|
50648
|
-
var
|
|
50522
|
+
var logger11 = new Logger(version10);
|
|
50649
50523
|
var NextId = 1;
|
|
50650
50524
|
|
|
50651
50525
|
class WebSocketProvider extends JsonRpcProvider {
|
|
50652
50526
|
constructor(url, network) {
|
|
50653
50527
|
if (network === "any") {
|
|
50654
|
-
|
|
50528
|
+
logger11.throwError("WebSocketProvider does not support 'any' network yet", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50655
50529
|
operation: "network:any"
|
|
50656
50530
|
});
|
|
50657
50531
|
}
|
|
@@ -50735,12 +50609,12 @@ class WebSocketProvider extends JsonRpcProvider {
|
|
|
50735
50609
|
return 0;
|
|
50736
50610
|
}
|
|
50737
50611
|
resetEventsBlock(blockNumber) {
|
|
50738
|
-
|
|
50612
|
+
logger11.throwError("cannot reset events block on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50739
50613
|
operation: "resetEventBlock"
|
|
50740
50614
|
});
|
|
50741
50615
|
}
|
|
50742
50616
|
set pollingInterval(value) {
|
|
50743
|
-
|
|
50617
|
+
logger11.throwError("cannot set polling interval on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50744
50618
|
operation: "setPollingInterval"
|
|
50745
50619
|
});
|
|
50746
50620
|
}
|
|
@@ -50753,7 +50627,7 @@ class WebSocketProvider extends JsonRpcProvider {
|
|
|
50753
50627
|
if (!value) {
|
|
50754
50628
|
return;
|
|
50755
50629
|
}
|
|
50756
|
-
|
|
50630
|
+
logger11.throwError("cannot set polling on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50757
50631
|
operation: "setPolling"
|
|
50758
50632
|
});
|
|
50759
50633
|
}
|
|
@@ -50917,7 +50791,7 @@ var __awaiter8 = function(thisArg, _arguments, P, generator) {
|
|
|
50917
50791
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50918
50792
|
});
|
|
50919
50793
|
};
|
|
50920
|
-
var
|
|
50794
|
+
var logger12 = new Logger(version10);
|
|
50921
50795
|
|
|
50922
50796
|
class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
50923
50797
|
detectNetwork() {
|
|
@@ -50929,7 +50803,7 @@ class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
|
50929
50803
|
if (network == null) {
|
|
50930
50804
|
network = yield _super.detectNetwork.call(this);
|
|
50931
50805
|
if (!network) {
|
|
50932
|
-
|
|
50806
|
+
logger12.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {});
|
|
50933
50807
|
}
|
|
50934
50808
|
if (this._network == null) {
|
|
50935
50809
|
import_properties9.defineReadOnly(this, "_network", network);
|
|
@@ -50943,7 +50817,7 @@ class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
|
50943
50817
|
|
|
50944
50818
|
class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
50945
50819
|
constructor(network, apiKey) {
|
|
50946
|
-
|
|
50820
|
+
logger12.checkAbstract(new.target, UrlJsonRpcProvider);
|
|
50947
50821
|
network = import_properties9.getStatic(new.target, "getNetwork")(network);
|
|
50948
50822
|
apiKey = import_properties9.getStatic(new.target, "getApiKey")(apiKey);
|
|
50949
50823
|
const connection = import_properties9.getStatic(new.target, "getUrl")(network, apiKey);
|
|
@@ -50957,13 +50831,13 @@ class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
|
50957
50831
|
}
|
|
50958
50832
|
}
|
|
50959
50833
|
_startPending() {
|
|
50960
|
-
|
|
50834
|
+
logger12.warn("WARNING: API provider does not support pending filters");
|
|
50961
50835
|
}
|
|
50962
50836
|
isCommunityResource() {
|
|
50963
50837
|
return false;
|
|
50964
50838
|
}
|
|
50965
50839
|
getSigner(address) {
|
|
50966
|
-
return
|
|
50840
|
+
return logger12.throwError("API provider does not support signing", Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" });
|
|
50967
50841
|
}
|
|
50968
50842
|
listAccounts() {
|
|
50969
50843
|
return Promise.resolve([]);
|
|
@@ -50972,14 +50846,14 @@ class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
|
50972
50846
|
return apiKey;
|
|
50973
50847
|
}
|
|
50974
50848
|
static getUrl(network, apiKey) {
|
|
50975
|
-
return
|
|
50849
|
+
return logger12.throwError("not implemented; sub-classes must override getUrl", Logger.errors.NOT_IMPLEMENTED, {
|
|
50976
50850
|
operation: "getUrl"
|
|
50977
50851
|
});
|
|
50978
50852
|
}
|
|
50979
50853
|
}
|
|
50980
50854
|
|
|
50981
50855
|
// node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js
|
|
50982
|
-
var
|
|
50856
|
+
var logger13 = new Logger(version10);
|
|
50983
50857
|
var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
|
50984
50858
|
|
|
50985
50859
|
class AlchemyWebSocketProvider extends WebSocketProvider {
|
|
@@ -51003,7 +50877,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
51003
50877
|
return defaultApiKey;
|
|
51004
50878
|
}
|
|
51005
50879
|
if (apiKey && typeof apiKey !== "string") {
|
|
51006
|
-
|
|
50880
|
+
logger13.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
|
51007
50881
|
}
|
|
51008
50882
|
return apiKey;
|
|
51009
50883
|
}
|
|
@@ -51035,7 +50909,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
51035
50909
|
host = "opt-goerli.g.alchemy.com/v2/";
|
|
51036
50910
|
break;
|
|
51037
50911
|
default:
|
|
51038
|
-
|
|
50912
|
+
logger13.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
51039
50913
|
}
|
|
51040
50914
|
return {
|
|
51041
50915
|
allowGzip: true,
|
|
@@ -51054,7 +50928,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
51054
50928
|
}
|
|
51055
50929
|
|
|
51056
50930
|
// node_modules/@ethersproject/providers/lib.esm/ankr-provider.js
|
|
51057
|
-
var
|
|
50931
|
+
var logger14 = new Logger(version10);
|
|
51058
50932
|
var defaultApiKey2 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
|
51059
50933
|
function getHost(name) {
|
|
51060
50934
|
switch (name) {
|
|
@@ -51071,7 +50945,7 @@ function getHost(name) {
|
|
|
51071
50945
|
case "arbitrum":
|
|
51072
50946
|
return "rpc.ankr.com/arbitrum/";
|
|
51073
50947
|
}
|
|
51074
|
-
return
|
|
50948
|
+
return logger14.throwArgumentError("unsupported network", "name", name);
|
|
51075
50949
|
}
|
|
51076
50950
|
|
|
51077
50951
|
class AnkrProvider extends UrlJsonRpcProvider {
|
|
@@ -51134,12 +51008,12 @@ var __awaiter9 = function(thisArg, _arguments, P, generator) {
|
|
|
51134
51008
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51135
51009
|
});
|
|
51136
51010
|
};
|
|
51137
|
-
var
|
|
51011
|
+
var logger15 = new Logger(version10);
|
|
51138
51012
|
|
|
51139
51013
|
class CloudflareProvider extends UrlJsonRpcProvider {
|
|
51140
51014
|
static getApiKey(apiKey) {
|
|
51141
51015
|
if (apiKey != null) {
|
|
51142
|
-
|
|
51016
|
+
logger15.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey);
|
|
51143
51017
|
}
|
|
51144
51018
|
return null;
|
|
51145
51019
|
}
|
|
@@ -51150,7 +51024,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
|
|
|
51150
51024
|
host = "https://cloudflare-eth.com/";
|
|
51151
51025
|
break;
|
|
51152
51026
|
default:
|
|
51153
|
-
|
|
51027
|
+
logger15.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
51154
51028
|
}
|
|
51155
51029
|
return host;
|
|
51156
51030
|
}
|
|
@@ -51169,7 +51043,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
|
|
|
51169
51043
|
}
|
|
51170
51044
|
|
|
51171
51045
|
// node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js
|
|
51172
|
-
var
|
|
51046
|
+
var import_bytes8 = __toESM(require_lib2());
|
|
51173
51047
|
var import_properties11 = __toESM(require_lib4());
|
|
51174
51048
|
var import_transactions5 = __toESM(require_lib15());
|
|
51175
51049
|
var import_web3 = __toESM(require_lib23());
|
|
@@ -51200,7 +51074,7 @@ var __awaiter10 = function(thisArg, _arguments, P, generator) {
|
|
|
51200
51074
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51201
51075
|
});
|
|
51202
51076
|
};
|
|
51203
|
-
var
|
|
51077
|
+
var logger16 = new Logger(version10);
|
|
51204
51078
|
function getTransactionPostData(transaction) {
|
|
51205
51079
|
const result = {};
|
|
51206
51080
|
for (let key in transaction) {
|
|
@@ -51212,13 +51086,13 @@ function getTransactionPostData(transaction) {
|
|
|
51212
51086
|
continue;
|
|
51213
51087
|
}
|
|
51214
51088
|
if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {
|
|
51215
|
-
value =
|
|
51089
|
+
value = import_bytes8.hexValue(import_bytes8.hexlify(value));
|
|
51216
51090
|
} else if (key === "accessList") {
|
|
51217
51091
|
value = "[" + import_transactions5.accessListify(value).map((set) => {
|
|
51218
51092
|
return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`;
|
|
51219
51093
|
}).join(",") + "]";
|
|
51220
51094
|
} else {
|
|
51221
|
-
value =
|
|
51095
|
+
value = import_bytes8.hexlify(value);
|
|
51222
51096
|
}
|
|
51223
51097
|
result[key] = value;
|
|
51224
51098
|
}
|
|
@@ -51279,10 +51153,10 @@ function checkError2(method, error, transaction) {
|
|
|
51279
51153
|
if (data) {
|
|
51280
51154
|
data = "0x" + data.replace(/^.*0x/i, "");
|
|
51281
51155
|
}
|
|
51282
|
-
if (
|
|
51156
|
+
if (import_bytes8.isHexString(data)) {
|
|
51283
51157
|
return data;
|
|
51284
51158
|
}
|
|
51285
|
-
|
|
51159
|
+
logger16.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {
|
|
51286
51160
|
error,
|
|
51287
51161
|
data: "0x"
|
|
51288
51162
|
});
|
|
@@ -51300,28 +51174,28 @@ function checkError2(method, error, transaction) {
|
|
|
51300
51174
|
}
|
|
51301
51175
|
message = (message || "").toLowerCase();
|
|
51302
51176
|
if (message.match(/insufficient funds/)) {
|
|
51303
|
-
|
|
51177
|
+
logger16.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
|
51304
51178
|
error,
|
|
51305
51179
|
method,
|
|
51306
51180
|
transaction
|
|
51307
51181
|
});
|
|
51308
51182
|
}
|
|
51309
51183
|
if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {
|
|
51310
|
-
|
|
51184
|
+
logger16.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
|
51311
51185
|
error,
|
|
51312
51186
|
method,
|
|
51313
51187
|
transaction
|
|
51314
51188
|
});
|
|
51315
51189
|
}
|
|
51316
51190
|
if (message.match(/another transaction with same nonce/)) {
|
|
51317
|
-
|
|
51191
|
+
logger16.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
|
51318
51192
|
error,
|
|
51319
51193
|
method,
|
|
51320
51194
|
transaction
|
|
51321
51195
|
});
|
|
51322
51196
|
}
|
|
51323
51197
|
if (message.match(/execution failed due to an exception|execution reverted/)) {
|
|
51324
|
-
|
|
51198
|
+
logger16.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
51325
51199
|
error,
|
|
51326
51200
|
method,
|
|
51327
51201
|
transaction
|
|
@@ -51358,7 +51232,7 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51358
51232
|
return "https://api-goerli-optimistic.etherscan.io";
|
|
51359
51233
|
default:
|
|
51360
51234
|
}
|
|
51361
|
-
return
|
|
51235
|
+
return logger16.throwArgumentError("unsupported network", "network", this.network.name);
|
|
51362
51236
|
}
|
|
51363
51237
|
getUrl(module2, params) {
|
|
51364
51238
|
const query = Object.keys(params).reduce((accum, key) => {
|
|
@@ -51518,12 +51392,12 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51518
51392
|
}
|
|
51519
51393
|
if (params.filter.topics && params.filter.topics.length > 0) {
|
|
51520
51394
|
if (params.filter.topics.length > 1) {
|
|
51521
|
-
|
|
51395
|
+
logger16.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });
|
|
51522
51396
|
}
|
|
51523
51397
|
if (params.filter.topics.length === 1) {
|
|
51524
51398
|
const topic0 = params.filter.topics[0];
|
|
51525
51399
|
if (typeof topic0 !== "string" || topic0.length !== 66) {
|
|
51526
|
-
|
|
51400
|
+
logger16.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0 });
|
|
51527
51401
|
}
|
|
51528
51402
|
args.topic0 = topic0;
|
|
51529
51403
|
}
|
|
@@ -51589,7 +51463,7 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51589
51463
|
}
|
|
51590
51464
|
|
|
51591
51465
|
// node_modules/@ethersproject/providers/lib.esm/fallback-provider.js
|
|
51592
|
-
var
|
|
51466
|
+
var import_bytes9 = __toESM(require_lib2());
|
|
51593
51467
|
var import_properties12 = __toESM(require_lib4());
|
|
51594
51468
|
var import_random2 = __toESM(require_lib21());
|
|
51595
51469
|
var import_web4 = __toESM(require_lib23());
|
|
@@ -51620,7 +51494,7 @@ var __awaiter11 = function(thisArg, _arguments, P, generator) {
|
|
|
51620
51494
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51621
51495
|
});
|
|
51622
51496
|
};
|
|
51623
|
-
var
|
|
51497
|
+
var logger17 = new Logger(version10);
|
|
51624
51498
|
function now() {
|
|
51625
51499
|
return new Date().getTime();
|
|
51626
51500
|
}
|
|
@@ -51633,7 +51507,7 @@ function checkNetworks(networks2) {
|
|
|
51633
51507
|
}
|
|
51634
51508
|
if (result) {
|
|
51635
51509
|
if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {
|
|
51636
|
-
|
|
51510
|
+
logger17.throwArgumentError("provider mismatch", "networks", networks2);
|
|
51637
51511
|
}
|
|
51638
51512
|
} else {
|
|
51639
51513
|
result = network;
|
|
@@ -51869,23 +51743,23 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51869
51743
|
case "getBalance":
|
|
51870
51744
|
case "getTransactionCount":
|
|
51871
51745
|
case "getCode":
|
|
51872
|
-
if (params.blockTag &&
|
|
51746
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51873
51747
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51874
51748
|
}
|
|
51875
51749
|
return provider[method](params.address, params.blockTag || "latest");
|
|
51876
51750
|
case "getStorageAt":
|
|
51877
|
-
if (params.blockTag &&
|
|
51751
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51878
51752
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51879
51753
|
}
|
|
51880
51754
|
return provider.getStorageAt(params.address, params.position, params.blockTag || "latest");
|
|
51881
51755
|
case "getBlock":
|
|
51882
|
-
if (params.blockTag &&
|
|
51756
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51883
51757
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51884
51758
|
}
|
|
51885
51759
|
return provider[params.includeTransactions ? "getBlockWithTransactions" : "getBlock"](params.blockTag || params.blockHash);
|
|
51886
51760
|
case "call":
|
|
51887
51761
|
case "estimateGas":
|
|
51888
|
-
if (params.blockTag &&
|
|
51762
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51889
51763
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51890
51764
|
}
|
|
51891
51765
|
if (method === "call" && params.blockTag) {
|
|
@@ -51897,13 +51771,13 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51897
51771
|
return provider[method](params.transactionHash);
|
|
51898
51772
|
case "getLogs": {
|
|
51899
51773
|
let filter = params.filter;
|
|
51900
|
-
if (filter.fromBlock &&
|
|
51774
|
+
if (filter.fromBlock && import_bytes9.isHexString(filter.fromBlock) || filter.toBlock && import_bytes9.isHexString(filter.toBlock)) {
|
|
51901
51775
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51902
51776
|
}
|
|
51903
51777
|
return provider.getLogs(filter);
|
|
51904
51778
|
}
|
|
51905
51779
|
}
|
|
51906
|
-
return
|
|
51780
|
+
return logger17.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, {
|
|
51907
51781
|
method,
|
|
51908
51782
|
params
|
|
51909
51783
|
});
|
|
@@ -51913,7 +51787,7 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51913
51787
|
class FallbackProvider extends BaseProvider {
|
|
51914
51788
|
constructor(providers, quorum) {
|
|
51915
51789
|
if (providers.length === 0) {
|
|
51916
|
-
|
|
51790
|
+
logger17.throwArgumentError("missing providers", "providers", providers);
|
|
51917
51791
|
}
|
|
51918
51792
|
const providerConfigs = providers.map((configOrProvider, index) => {
|
|
51919
51793
|
if (Provider.isProvider(configOrProvider)) {
|
|
@@ -51933,7 +51807,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
51933
51807
|
}
|
|
51934
51808
|
const weight = config.weight;
|
|
51935
51809
|
if (weight % 1 || weight > 512 || weight < 1) {
|
|
51936
|
-
|
|
51810
|
+
logger17.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight);
|
|
51937
51811
|
}
|
|
51938
51812
|
return Object.freeze(config);
|
|
51939
51813
|
});
|
|
@@ -51941,7 +51815,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
51941
51815
|
if (quorum == null) {
|
|
51942
51816
|
quorum = total / 2;
|
|
51943
51817
|
} else if (quorum > total) {
|
|
51944
|
-
|
|
51818
|
+
logger17.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum);
|
|
51945
51819
|
}
|
|
51946
51820
|
let networkOrReady = checkNetworks(providerConfigs.map((c) => c.provider.network));
|
|
51947
51821
|
if (networkOrReady == null) {
|
|
@@ -52098,7 +51972,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
52098
51972
|
}
|
|
52099
51973
|
props[name] = e[name];
|
|
52100
51974
|
});
|
|
52101
|
-
|
|
51975
|
+
logger17.throwError(e.reason || e.message, errorCode, props);
|
|
52102
51976
|
});
|
|
52103
51977
|
if (configs.filter((c) => !c.done).length === 0) {
|
|
52104
51978
|
break;
|
|
@@ -52110,7 +51984,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
52110
51984
|
}
|
|
52111
51985
|
c.cancelled = true;
|
|
52112
51986
|
});
|
|
52113
|
-
return
|
|
51987
|
+
return logger17.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, {
|
|
52114
51988
|
method,
|
|
52115
51989
|
params,
|
|
52116
51990
|
results: configs.map((c) => exposeDebugConfig(c)),
|
|
@@ -52125,7 +51999,7 @@ var IpcProvider = null;
|
|
|
52125
51999
|
|
|
52126
52000
|
// node_modules/@ethersproject/providers/lib.esm/infura-provider.js
|
|
52127
52001
|
var import_properties13 = __toESM(require_lib4());
|
|
52128
|
-
var
|
|
52002
|
+
var logger18 = new Logger(version10);
|
|
52129
52003
|
var defaultProjectId = "84842078b09946638c03157f83405213";
|
|
52130
52004
|
|
|
52131
52005
|
class InfuraWebSocketProvider extends WebSocketProvider {
|
|
@@ -52133,7 +52007,7 @@ class InfuraWebSocketProvider extends WebSocketProvider {
|
|
|
52133
52007
|
const provider = new InfuraProvider(network, apiKey);
|
|
52134
52008
|
const connection = provider.connection;
|
|
52135
52009
|
if (connection.password) {
|
|
52136
|
-
|
|
52010
|
+
logger18.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
52137
52011
|
operation: "InfuraProvider.getWebSocketProvider()"
|
|
52138
52012
|
});
|
|
52139
52013
|
}
|
|
@@ -52164,8 +52038,8 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
|
|
52164
52038
|
if (typeof apiKey === "string") {
|
|
52165
52039
|
apiKeyObj.projectId = apiKey;
|
|
52166
52040
|
} else if (apiKey.projectSecret != null) {
|
|
52167
|
-
|
|
52168
|
-
|
|
52041
|
+
logger18.assertArgument(typeof apiKey.projectId === "string", "projectSecret requires a projectId", "projectId", apiKey.projectId);
|
|
52042
|
+
logger18.assertArgument(typeof apiKey.projectSecret === "string", "invalid projectSecret", "projectSecret", "[REDACTED]");
|
|
52169
52043
|
apiKeyObj.projectId = apiKey.projectId;
|
|
52170
52044
|
apiKeyObj.projectSecret = apiKey.projectSecret;
|
|
52171
52045
|
} else if (apiKey.projectId) {
|
|
@@ -52205,7 +52079,7 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
|
|
52205
52079
|
host = "arbitrum-goerli.infura.io";
|
|
52206
52080
|
break;
|
|
52207
52081
|
default:
|
|
52208
|
-
|
|
52082
|
+
logger18.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
|
52209
52083
|
argument: "network",
|
|
52210
52084
|
value: network
|
|
52211
52085
|
});
|
|
@@ -52298,18 +52172,18 @@ class JsonRpcBatchProvider extends JsonRpcProvider {
|
|
|
52298
52172
|
}
|
|
52299
52173
|
|
|
52300
52174
|
// node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js
|
|
52301
|
-
var
|
|
52175
|
+
var logger19 = new Logger(version10);
|
|
52302
52176
|
var defaultApiKey3 = "ETHERS_JS_SHARED";
|
|
52303
52177
|
|
|
52304
52178
|
class NodesmithProvider extends UrlJsonRpcProvider {
|
|
52305
52179
|
static getApiKey(apiKey) {
|
|
52306
52180
|
if (apiKey && typeof apiKey !== "string") {
|
|
52307
|
-
|
|
52181
|
+
logger19.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
|
52308
52182
|
}
|
|
52309
52183
|
return apiKey || defaultApiKey3;
|
|
52310
52184
|
}
|
|
52311
52185
|
static getUrl(network, apiKey) {
|
|
52312
|
-
|
|
52186
|
+
logger19.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");
|
|
52313
52187
|
let host = null;
|
|
52314
52188
|
switch (network.name) {
|
|
52315
52189
|
case "homestead":
|
|
@@ -52328,14 +52202,14 @@ class NodesmithProvider extends UrlJsonRpcProvider {
|
|
|
52328
52202
|
host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";
|
|
52329
52203
|
break;
|
|
52330
52204
|
default:
|
|
52331
|
-
|
|
52205
|
+
logger19.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
52332
52206
|
}
|
|
52333
52207
|
return host + "?apiKey=" + apiKey;
|
|
52334
52208
|
}
|
|
52335
52209
|
}
|
|
52336
52210
|
|
|
52337
52211
|
// node_modules/@ethersproject/providers/lib.esm/pocket-provider.js
|
|
52338
|
-
var
|
|
52212
|
+
var logger20 = new Logger(version10);
|
|
52339
52213
|
var defaultApplicationId = "62e1ad51b37b8e00394bda3b";
|
|
52340
52214
|
|
|
52341
52215
|
class PocketProvider extends UrlJsonRpcProvider {
|
|
@@ -52355,7 +52229,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52355
52229
|
} else if (apiKey.applicationId) {
|
|
52356
52230
|
apiKeyObj.applicationId = apiKey.applicationId;
|
|
52357
52231
|
} else {
|
|
52358
|
-
|
|
52232
|
+
logger20.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey);
|
|
52359
52233
|
}
|
|
52360
52234
|
return apiKeyObj;
|
|
52361
52235
|
}
|
|
@@ -52384,7 +52258,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52384
52258
|
host = "eth-ropsten.gateway.pokt.network";
|
|
52385
52259
|
break;
|
|
52386
52260
|
default:
|
|
52387
|
-
|
|
52261
|
+
logger20.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
|
52388
52262
|
argument: "network",
|
|
52389
52263
|
value: network
|
|
52390
52264
|
});
|
|
@@ -52404,7 +52278,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52404
52278
|
|
|
52405
52279
|
// node_modules/@ethersproject/providers/lib.esm/web3-provider.js
|
|
52406
52280
|
var import_properties15 = __toESM(require_lib4());
|
|
52407
|
-
var
|
|
52281
|
+
var logger21 = new Logger(version10);
|
|
52408
52282
|
var _nextId = 1;
|
|
52409
52283
|
function buildWeb3LegacyFetcher(provider, sendFunc) {
|
|
52410
52284
|
const fetcher = "Web3LegacyFetcher";
|
|
@@ -52488,7 +52362,7 @@ function buildEip1193Fetcher(provider) {
|
|
|
52488
52362
|
class Web3Provider extends JsonRpcProvider {
|
|
52489
52363
|
constructor(provider, network) {
|
|
52490
52364
|
if (provider == null) {
|
|
52491
|
-
|
|
52365
|
+
logger21.throwArgumentError("missing provider", "provider", provider);
|
|
52492
52366
|
}
|
|
52493
52367
|
let path = null;
|
|
52494
52368
|
let jsonRpcFetchFunc = null;
|
|
@@ -52512,7 +52386,7 @@ class Web3Provider extends JsonRpcProvider {
|
|
|
52512
52386
|
} else if (provider.send) {
|
|
52513
52387
|
jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));
|
|
52514
52388
|
} else {
|
|
52515
|
-
|
|
52389
|
+
logger21.throwArgumentError("unsupported provider", "provider", provider);
|
|
52516
52390
|
}
|
|
52517
52391
|
if (!path) {
|
|
52518
52392
|
path = "unknown:";
|
|
@@ -52528,7 +52402,7 @@ class Web3Provider extends JsonRpcProvider {
|
|
|
52528
52402
|
}
|
|
52529
52403
|
|
|
52530
52404
|
// node_modules/@ethersproject/providers/lib.esm/index.js
|
|
52531
|
-
var
|
|
52405
|
+
var logger22 = new Logger(version10);
|
|
52532
52406
|
function getDefaultProvider(network, options) {
|
|
52533
52407
|
if (network == null) {
|
|
52534
52408
|
network = "homestead";
|
|
@@ -52544,13 +52418,13 @@ function getDefaultProvider(network, options) {
|
|
|
52544
52418
|
case "wss":
|
|
52545
52419
|
return new WebSocketProvider(network);
|
|
52546
52420
|
default:
|
|
52547
|
-
|
|
52421
|
+
logger22.throwArgumentError("unsupported URL scheme", "network", network);
|
|
52548
52422
|
}
|
|
52549
52423
|
}
|
|
52550
52424
|
}
|
|
52551
52425
|
const n = getNetwork(network);
|
|
52552
52426
|
if (!n || !n._defaultProvider) {
|
|
52553
|
-
|
|
52427
|
+
logger22.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, {
|
|
52554
52428
|
operation: "getDefaultProvider",
|
|
52555
52429
|
network
|
|
52556
52430
|
});
|
|
@@ -52575,15 +52449,15 @@ var import_hash4 = __toESM(require_lib12());
|
|
|
52575
52449
|
var import_properties16 = __toESM(require_lib4());
|
|
52576
52450
|
|
|
52577
52451
|
// node_modules/@ethersproject/wordlists/lib.esm/_version.js
|
|
52578
|
-
var
|
|
52452
|
+
var version11 = "wordlists/5.7.0";
|
|
52579
52453
|
|
|
52580
52454
|
// node_modules/@ethersproject/wordlists/lib.esm/wordlist.js
|
|
52581
52455
|
var exportWordlist = false;
|
|
52582
|
-
var
|
|
52456
|
+
var logger23 = new Logger(version11);
|
|
52583
52457
|
|
|
52584
52458
|
class Wordlist {
|
|
52585
52459
|
constructor(locale) {
|
|
52586
|
-
|
|
52460
|
+
logger23.checkAbstract(new.target, Wordlist);
|
|
52587
52461
|
import_properties16.defineReadOnly(this, "locale", locale);
|
|
52588
52462
|
}
|
|
52589
52463
|
split(mnemonic) {
|
|
@@ -52660,14 +52534,14 @@ var wordlists = {
|
|
|
52660
52534
|
// node_modules/ethers/lib.esm/utils.js
|
|
52661
52535
|
var exports_utils = {};
|
|
52662
52536
|
__export(exports_utils, {
|
|
52663
|
-
zeroPad: () =>
|
|
52537
|
+
zeroPad: () => import_bytes10.zeroPad,
|
|
52664
52538
|
verifyTypedData: () => verifyTypedData,
|
|
52665
52539
|
verifyMessage: () => verifyMessage,
|
|
52666
52540
|
toUtf8String: () => import_strings4.toUtf8String,
|
|
52667
52541
|
toUtf8CodePoints: () => import_strings4.toUtf8CodePoints,
|
|
52668
52542
|
toUtf8Bytes: () => import_strings4.toUtf8Bytes,
|
|
52669
|
-
stripZeros: () =>
|
|
52670
|
-
splitSignature: () =>
|
|
52543
|
+
stripZeros: () => import_bytes10.stripZeros,
|
|
52544
|
+
splitSignature: () => import_bytes10.splitSignature,
|
|
52671
52545
|
soliditySha256: () => import_solidity.sha256,
|
|
52672
52546
|
solidityPack: () => import_solidity.pack,
|
|
52673
52547
|
solidityKeccak256: () => import_solidity.keccak256,
|
|
@@ -52690,29 +52564,29 @@ __export(exports_utils, {
|
|
|
52690
52564
|
namehash: () => import_hash5.namehash,
|
|
52691
52565
|
mnemonicToSeed: () => import_hdnode2.mnemonicToSeed,
|
|
52692
52566
|
mnemonicToEntropy: () => import_hdnode2.mnemonicToEntropy,
|
|
52693
|
-
keccak256: () =>
|
|
52694
|
-
joinSignature: () =>
|
|
52567
|
+
keccak256: () => import_keccak2562.keccak256,
|
|
52568
|
+
joinSignature: () => import_bytes10.joinSignature,
|
|
52695
52569
|
isValidName: () => import_hash5.isValidName,
|
|
52696
52570
|
isValidMnemonic: () => import_hdnode2.isValidMnemonic,
|
|
52697
|
-
isHexString: () =>
|
|
52698
|
-
isBytesLike: () =>
|
|
52699
|
-
isBytes: () =>
|
|
52700
|
-
isAddress: () => isAddress,
|
|
52571
|
+
isHexString: () => import_bytes10.isHexString,
|
|
52572
|
+
isBytesLike: () => import_bytes10.isBytesLike,
|
|
52573
|
+
isBytes: () => import_bytes10.isBytes,
|
|
52574
|
+
isAddress: () => import_address5.isAddress,
|
|
52701
52575
|
id: () => import_hash5.id,
|
|
52702
|
-
hexlify: () =>
|
|
52703
|
-
hexZeroPad: () =>
|
|
52704
|
-
hexValue: () =>
|
|
52705
|
-
hexStripZeros: () =>
|
|
52706
|
-
hexDataSlice: () =>
|
|
52707
|
-
hexDataLength: () =>
|
|
52708
|
-
hexConcat: () =>
|
|
52576
|
+
hexlify: () => import_bytes10.hexlify,
|
|
52577
|
+
hexZeroPad: () => import_bytes10.hexZeroPad,
|
|
52578
|
+
hexValue: () => import_bytes10.hexValue,
|
|
52579
|
+
hexStripZeros: () => import_bytes10.hexStripZeros,
|
|
52580
|
+
hexDataSlice: () => import_bytes10.hexDataSlice,
|
|
52581
|
+
hexDataLength: () => import_bytes10.hexDataLength,
|
|
52582
|
+
hexConcat: () => import_bytes10.hexConcat,
|
|
52709
52583
|
hashMessage: () => import_hash5.hashMessage,
|
|
52710
52584
|
getStatic: () => import_properties17.getStatic,
|
|
52711
52585
|
getJsonWalletAddress: () => import_json_wallets2.getJsonWalletAddress,
|
|
52712
|
-
getIcapAddress: () => getIcapAddress,
|
|
52713
|
-
getCreate2Address: () => getCreate2Address,
|
|
52714
|
-
getContractAddress: () => getContractAddress,
|
|
52715
|
-
getAddress: () => getAddress,
|
|
52586
|
+
getIcapAddress: () => import_address5.getIcapAddress,
|
|
52587
|
+
getCreate2Address: () => import_address5.getCreate2Address,
|
|
52588
|
+
getContractAddress: () => import_address5.getContractAddress,
|
|
52589
|
+
getAddress: () => import_address5.getAddress,
|
|
52716
52590
|
getAccountPath: () => import_hdnode2.getAccountPath,
|
|
52717
52591
|
formatUnits: () => import_units.formatUnits,
|
|
52718
52592
|
formatEther: () => import_units.formatEther,
|
|
@@ -52724,7 +52598,7 @@ __export(exports_utils, {
|
|
|
52724
52598
|
defaultPath: () => import_hdnode2.defaultPath,
|
|
52725
52599
|
defaultAbiCoder: () => import_abi2.defaultAbiCoder,
|
|
52726
52600
|
deepCopy: () => import_properties17.deepCopy,
|
|
52727
|
-
concat: () =>
|
|
52601
|
+
concat: () => import_bytes10.concat,
|
|
52728
52602
|
computePublicKey: () => import_signing_key2.computePublicKey,
|
|
52729
52603
|
computeHmac: () => import_sha22.computeHmac,
|
|
52730
52604
|
computeAddress: () => import_transactions6.computeAddress,
|
|
@@ -52733,7 +52607,7 @@ __export(exports_utils, {
|
|
|
52733
52607
|
checkProperties: () => import_properties17.checkProperties,
|
|
52734
52608
|
base64: () => base64,
|
|
52735
52609
|
base58: () => import_basex2.Base58,
|
|
52736
|
-
arrayify: () =>
|
|
52610
|
+
arrayify: () => import_bytes10.arrayify,
|
|
52737
52611
|
accessListify: () => import_transactions6.accessListify,
|
|
52738
52612
|
_toEscapedUtf8String: () => import_strings4._toEscapedUtf8String,
|
|
52739
52613
|
_fetchData: () => import_web6._fetchData,
|
|
@@ -52761,13 +52635,14 @@ __export(exports_utils, {
|
|
|
52761
52635
|
AbiCoder: () => import_abi2.AbiCoder
|
|
52762
52636
|
});
|
|
52763
52637
|
var import_abi2 = __toESM(require_lib13());
|
|
52638
|
+
var import_address5 = __toESM(require_lib7());
|
|
52764
52639
|
var base64 = __toESM(require_lib10());
|
|
52765
52640
|
var import_basex2 = __toESM(require_lib16());
|
|
52766
|
-
var
|
|
52641
|
+
var import_bytes10 = __toESM(require_lib2());
|
|
52767
52642
|
var import_hash5 = __toESM(require_lib12());
|
|
52768
52643
|
var import_hdnode2 = __toESM(require_lib20());
|
|
52769
52644
|
var import_json_wallets2 = __toESM(require_lib22());
|
|
52770
|
-
var
|
|
52645
|
+
var import_keccak2562 = __toESM(require_lib5());
|
|
52771
52646
|
var import_sha22 = __toESM(require_lib17());
|
|
52772
52647
|
var import_solidity = __toESM(require_lib24());
|
|
52773
52648
|
var import_random3 = __toESM(require_lib21());
|
|
@@ -52782,10 +52657,10 @@ var import_sha23 = __toESM(require_lib17());
|
|
|
52782
52657
|
var import_strings5 = __toESM(require_lib9());
|
|
52783
52658
|
|
|
52784
52659
|
// node_modules/ethers/lib.esm/_version.js
|
|
52785
|
-
var
|
|
52660
|
+
var version12 = "ethers/5.7.2";
|
|
52786
52661
|
|
|
52787
52662
|
// node_modules/ethers/lib.esm/ethers.js
|
|
52788
|
-
var
|
|
52663
|
+
var logger24 = new Logger(version12);
|
|
52789
52664
|
|
|
52790
52665
|
// node_modules/ethers/lib.esm/index.js
|
|
52791
52666
|
try {
|
|
@@ -54141,8 +54016,8 @@ class MultisendBuilder {
|
|
|
54141
54016
|
data
|
|
54142
54017
|
});
|
|
54143
54018
|
}
|
|
54144
|
-
static new(chainId,
|
|
54145
|
-
return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${
|
|
54019
|
+
static new(chainId, version13 = "v1_4_1") {
|
|
54020
|
+
return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${version13}.multisend`));
|
|
54146
54021
|
}
|
|
54147
54022
|
}
|
|
54148
54023
|
// src/integrations/gnosis/safe.L2.abi.ts
|
|
@@ -58382,6 +58257,7 @@ function invariant(condition, message) {
|
|
|
58382
58257
|
var import_decimal = __toESM(require_decimal());
|
|
58383
58258
|
var import_big = __toESM(require_big());
|
|
58384
58259
|
var import_toformat = __toESM(require_toFormat());
|
|
58260
|
+
var import_address6 = __toESM(require_lib7());
|
|
58385
58261
|
function _defineProperties(target, props) {
|
|
58386
58262
|
for (var i2 = 0;i2 < props.length; i2++) {
|
|
58387
58263
|
var descriptor = props[i2];
|
|
@@ -58941,7 +58817,7 @@ var NativeCurrency = /* @__PURE__ */ function(_BaseCurrency) {
|
|
|
58941
58817
|
}(BaseCurrency);
|
|
58942
58818
|
function validateAndParseAddress(address) {
|
|
58943
58819
|
try {
|
|
58944
|
-
return getAddress(address);
|
|
58820
|
+
return import_address6.getAddress(address);
|
|
58945
58821
|
} catch (error) {
|
|
58946
58822
|
throw new Error(address + " is not a valid address.");
|
|
58947
58823
|
}
|
|
@@ -59018,13 +58894,13 @@ var Ether = /* @__PURE__ */ function(_NativeCurrency) {
|
|
|
59018
58894
|
return Ether2;
|
|
59019
58895
|
}(NativeCurrency);
|
|
59020
58896
|
Ether._etherCache = {};
|
|
59021
|
-
var
|
|
58897
|
+
var MAX_SAFE_INTEGER = /* @__PURE__ */ import_jsbi.default.BigInt(Number.MAX_SAFE_INTEGER);
|
|
59022
58898
|
var ZERO = /* @__PURE__ */ import_jsbi.default.BigInt(0);
|
|
59023
58899
|
var ONE2 = /* @__PURE__ */ import_jsbi.default.BigInt(1);
|
|
59024
58900
|
var TWO = /* @__PURE__ */ import_jsbi.default.BigInt(2);
|
|
59025
58901
|
function sqrt(value) {
|
|
59026
58902
|
!import_jsbi.default.greaterThanOrEqual(value, ZERO) && invariant(false, "NEGATIVE");
|
|
59027
|
-
if (import_jsbi.default.lessThan(value,
|
|
58903
|
+
if (import_jsbi.default.lessThan(value, MAX_SAFE_INTEGER)) {
|
|
59028
58904
|
return import_jsbi.default.BigInt(Math.floor(Math.sqrt(import_jsbi.default.toNumber(value))));
|
|
59029
58905
|
}
|
|
59030
58906
|
var z;
|
|
@@ -59041,6 +58917,7 @@ function sqrt(value) {
|
|
|
59041
58917
|
// node_modules/@uniswap/v3-sdk/dist/v3-sdk.esm.js
|
|
59042
58918
|
var import_jsbi2 = __toESM(require_jsbi_umd());
|
|
59043
58919
|
var import_abi3 = __toESM(require_lib13());
|
|
58920
|
+
var import_address7 = __toESM(require_lib7());
|
|
59044
58921
|
var import_solidity2 = __toESM(require_lib24());
|
|
59045
58922
|
// node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/IMulticall.sol/IMulticall.json
|
|
59046
58923
|
var IMulticall_default = {
|
|
@@ -62976,7 +62853,7 @@ var Q192 = /* @__PURE__ */ import_jsbi2.default.exponentiate(Q96, /* @__PURE__ *
|
|
|
62976
62853
|
function computePoolAddress(_ref) {
|
|
62977
62854
|
var { factoryAddress, tokenA, tokenB, fee, initCodeHashManualOverride } = _ref;
|
|
62978
62855
|
var _ref2 = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA], token0 = _ref2[0], token1 = _ref2[1];
|
|
62979
|
-
return getCreate2Address(factoryAddress, import_solidity2.keccak256(["bytes"], [import_abi3.defaultAbiCoder.encode(["address", "address", "uint24"], [token0.address, token1.address, fee])]), initCodeHashManualOverride != null ? initCodeHashManualOverride : POOL_INIT_CODE_HASH);
|
|
62856
|
+
return import_address7.getCreate2Address(factoryAddress, import_solidity2.keccak256(["bytes"], [import_abi3.defaultAbiCoder.encode(["address", "address", "uint24"], [token0.address, token1.address, fee])]), initCodeHashManualOverride != null ? initCodeHashManualOverride : POOL_INIT_CODE_HASH);
|
|
62980
62857
|
}
|
|
62981
62858
|
var LiquidityMath = /* @__PURE__ */ function() {
|
|
62982
62859
|
function LiquidityMath2() {}
|
|
@@ -64349,8 +64226,9 @@ var import_jsbi3 = __toESM(require_jsbi_umd());
|
|
|
64349
64226
|
var import_decimal2 = __toESM(require_decimal());
|
|
64350
64227
|
var import_big2 = __toESM(require_big());
|
|
64351
64228
|
var import_toformat2 = __toESM(require_toFormat());
|
|
64352
|
-
var
|
|
64353
|
-
var
|
|
64229
|
+
var import_address8 = __toESM(require_lib7());
|
|
64230
|
+
var import_bytes11 = __toESM(require_lib2());
|
|
64231
|
+
var import_keccak2563 = __toESM(require_lib5());
|
|
64354
64232
|
var import_strings6 = __toESM(require_lib9());
|
|
64355
64233
|
function _defineProperties3(e, r) {
|
|
64356
64234
|
for (var t = 0;t < r.length; t++) {
|
|
@@ -65055,7 +64933,7 @@ var NativeCurrency2 = /* @__PURE__ */ function(_BaseCurrency) {
|
|
|
65055
64933
|
}(BaseCurrency3);
|
|
65056
64934
|
function validateAndParseAddress2(address) {
|
|
65057
64935
|
try {
|
|
65058
|
-
return getAddress(address);
|
|
64936
|
+
return import_address8.getAddress(address);
|
|
65059
64937
|
} catch (error) {
|
|
65060
64938
|
throw new Error(address + " is not a valid address.");
|
|
65061
64939
|
}
|
|
@@ -65159,18 +65037,18 @@ function computeZksyncCreate2Address(sender, bytecodeHash, salt, input) {
|
|
|
65159
65037
|
if (input === undefined) {
|
|
65160
65038
|
input = "0x";
|
|
65161
65039
|
}
|
|
65162
|
-
var prefix2 =
|
|
65163
|
-
var inputHash =
|
|
65164
|
-
var addressBytes =
|
|
65165
|
-
return getAddress(addressBytes);
|
|
65040
|
+
var prefix2 = import_keccak2563.keccak256(import_strings6.toUtf8Bytes("zksyncCreate2"));
|
|
65041
|
+
var inputHash = import_keccak2563.keccak256(input);
|
|
65042
|
+
var addressBytes = import_keccak2563.keccak256(import_bytes11.concat([prefix2, import_bytes11.hexZeroPad(sender, 32), salt, bytecodeHash, inputHash])).slice(26);
|
|
65043
|
+
return import_address8.getAddress(addressBytes);
|
|
65166
65044
|
}
|
|
65167
|
-
var
|
|
65045
|
+
var MAX_SAFE_INTEGER2 = /* @__PURE__ */ import_jsbi3.default.BigInt(Number.MAX_SAFE_INTEGER);
|
|
65168
65046
|
var ZERO3 = /* @__PURE__ */ import_jsbi3.default.BigInt(0);
|
|
65169
65047
|
var ONE4 = /* @__PURE__ */ import_jsbi3.default.BigInt(1);
|
|
65170
65048
|
var TWO3 = /* @__PURE__ */ import_jsbi3.default.BigInt(2);
|
|
65171
65049
|
function sqrt2(value) {
|
|
65172
65050
|
!import_jsbi3.default.greaterThanOrEqual(value, ZERO3) && invariant(false, "NEGATIVE");
|
|
65173
|
-
if (import_jsbi3.default.lessThan(value,
|
|
65051
|
+
if (import_jsbi3.default.lessThan(value, MAX_SAFE_INTEGER2)) {
|
|
65174
65052
|
return import_jsbi3.default.BigInt(Math.floor(Math.sqrt(import_jsbi3.default.toNumber(value))));
|
|
65175
65053
|
}
|
|
65176
65054
|
var z;
|
|
@@ -65187,6 +65065,7 @@ function sqrt2(value) {
|
|
|
65187
65065
|
// node_modules/@uniswap/v4-sdk/node_modules/@uniswap/v3-sdk/dist/v3-sdk.esm.js
|
|
65188
65066
|
var import_jsbi4 = __toESM(require_jsbi_umd());
|
|
65189
65067
|
var import_abi4 = __toESM(require_lib13());
|
|
65068
|
+
var import_address9 = __toESM(require_lib7());
|
|
65190
65069
|
var import_solidity3 = __toESM(require_lib24());
|
|
65191
65070
|
function _arrayLikeToArray2(r, a) {
|
|
65192
65071
|
(a == null || a > r.length) && (a = r.length);
|
|
@@ -65638,7 +65517,7 @@ function computePoolAddress2(_ref) {
|
|
|
65638
65517
|
case ChainId2.ZKSYNC:
|
|
65639
65518
|
return computeZksyncCreate2Address(factoryAddress, initCodeHash, salt);
|
|
65640
65519
|
default:
|
|
65641
|
-
return getCreate2Address(factoryAddress, salt, initCodeHash);
|
|
65520
|
+
return import_address9.getCreate2Address(factoryAddress, salt, initCodeHash);
|
|
65642
65521
|
}
|
|
65643
65522
|
}
|
|
65644
65523
|
var FullMath2 = /* @__PURE__ */ function() {
|
|
@@ -69493,7 +69372,7 @@ var SwapExactInputSingleCalldataV4 = ({
|
|
|
69493
69372
|
hookData = "0x",
|
|
69494
69373
|
recipient
|
|
69495
69374
|
}) => {
|
|
69496
|
-
const
|
|
69375
|
+
const getAddress7 = (currency) => {
|
|
69497
69376
|
return currency.address;
|
|
69498
69377
|
};
|
|
69499
69378
|
const commands = exports_ethers.utils.solidityPack(["uint8"], [16 /* V4_SWAP */]);
|
|
@@ -69501,15 +69380,15 @@ var SwapExactInputSingleCalldataV4 = ({
|
|
|
69501
69380
|
const params = [
|
|
69502
69381
|
exports_ethers.utils.defaultAbiCoder.encode(["tuple(tuple(address,address,uint24,int24,address),bool,uint128,uint128,bytes)"], [
|
|
69503
69382
|
[
|
|
69504
|
-
[
|
|
69383
|
+
[getAddress7(pool.currency0), getAddress7(pool.currency1), pool.fee, pool.tickSpacing, pool.hooks],
|
|
69505
69384
|
zeroForOne,
|
|
69506
69385
|
amountIn,
|
|
69507
69386
|
amountOutMinimum,
|
|
69508
69387
|
hookData
|
|
69509
69388
|
]
|
|
69510
69389
|
]),
|
|
69511
|
-
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ?
|
|
69512
|
-
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ?
|
|
69390
|
+
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ? getAddress7(pool.currency0) : getAddress7(pool.currency1), amountIn]),
|
|
69391
|
+
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ? getAddress7(pool.currency1) : getAddress7(pool.currency0), amountOutMinimum])
|
|
69513
69392
|
];
|
|
69514
69393
|
const actionsList = [];
|
|
69515
69394
|
actionsList.push(Actions2.SWAP_EXACT_IN_SINGLE);
|
|
@@ -76947,7 +76826,7 @@ var calculateDeterministicVaultAddress = ({
|
|
|
76947
76826
|
initStruct.name,
|
|
76948
76827
|
initStruct.symbol,
|
|
76949
76828
|
initStruct.safe,
|
|
76950
|
-
initStruct.whitelistManager,
|
|
76829
|
+
initStruct.enableWhitelist ? initStruct.whitelistManager : ZERO_ADDRESS,
|
|
76951
76830
|
initStruct.valuationManager,
|
|
76952
76831
|
initStruct.admin,
|
|
76953
76832
|
initStruct.feeReceiver,
|
|
@@ -86453,4 +86332,4 @@ var simulateOrThrow = async (env2) => {
|
|
|
86453
86332
|
};
|
|
86454
86333
|
};
|
|
86455
86334
|
|
|
86456
|
-
//# debugId=
|
|
86335
|
+
//# debugId=4A75A7EF8E0DB48564756E2164756E21
|