damm-sdk 1.1.30-alpha.22 → 1.1.30-alpha.24
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 +570 -690
- package/dist/index.cjs.map +5 -7
- package/dist/index.js +150 -149
- package/dist/index.js.map +4 -4
- package/dist/integrations/cctp/message.transmitter.v2.abi.d.ts +225 -309
- package/dist/integrations/cctp/message.transmitter.v2.abi.d.ts.map +1 -1
- package/dist/integrations/permit2/permit2.d.ts +13 -0
- package/dist/integrations/permit2/permit2.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/integrations/cctp/message.transmitter.v2.abi.ts +120 -148
- package/src/integrations/permit2/permit2.ts +40 -0
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
|
});
|
|
@@ -44318,6 +44318,7 @@ __export(exports_src, {
|
|
|
44318
44318
|
uniswapV3CollectFeesTrx: () => uniswapV3CollectFeesTrx,
|
|
44319
44319
|
uniswapV3BurnPositionTrx: () => uniswapV3BurnPositionTrx,
|
|
44320
44320
|
transferNativeEth: () => transferNativeEth,
|
|
44321
|
+
transferFromPermit2Trx: () => transferFromPermit2Trx,
|
|
44321
44322
|
transferFromERC20Trx: () => transferFromERC20Trx,
|
|
44322
44323
|
transferERC20Trx: () => transferERC20Trx,
|
|
44323
44324
|
swapOwner: () => swapOwner,
|
|
@@ -44410,6 +44411,7 @@ __export(exports_src, {
|
|
|
44410
44411
|
USDT_ARB: () => USDT_ARB,
|
|
44411
44412
|
USDCe_ARB: () => USDCe_ARB,
|
|
44412
44413
|
USDC_ARB: () => USDC_ARB,
|
|
44414
|
+
TransferFromPermit2Calldata: () => TransferFromPermit2Calldata,
|
|
44413
44415
|
TransferFromCalldata: () => TransferFromCalldata,
|
|
44414
44416
|
TransferCalldata: () => TransferCalldata,
|
|
44415
44417
|
TransactionWithRoleReturnDataCalldata: () => TransactionWithRoleReturnDataCalldata,
|
|
@@ -44894,10 +44896,10 @@ var createCall = (call) => {
|
|
|
44894
44896
|
var exports_ethers = {};
|
|
44895
44897
|
__export(exports_ethers, {
|
|
44896
44898
|
wordlists: () => wordlists,
|
|
44897
|
-
version: () =>
|
|
44899
|
+
version: () => version12,
|
|
44898
44900
|
utils: () => exports_utils,
|
|
44899
44901
|
providers: () => exports_lib2,
|
|
44900
|
-
logger: () =>
|
|
44902
|
+
logger: () => logger24,
|
|
44901
44903
|
getDefaultProvider: () => getDefaultProvider,
|
|
44902
44904
|
errors: () => ErrorCode,
|
|
44903
44905
|
constants: () => exports_lib,
|
|
@@ -45472,12 +45474,6 @@ function throwFault(fault, operation, value) {
|
|
|
45472
45474
|
}
|
|
45473
45475
|
return logger.throwError(fault, Logger.errors.NUMERIC_FAULT, params);
|
|
45474
45476
|
}
|
|
45475
|
-
function _base36To16(value) {
|
|
45476
|
-
return new BN(value, 36).toString(16);
|
|
45477
|
-
}
|
|
45478
|
-
function _base16To36(value) {
|
|
45479
|
-
return new BN(value, 16).toString(36);
|
|
45480
|
-
}
|
|
45481
45477
|
// node_modules/@ethersproject/bignumber/lib.esm/fixednumber.js
|
|
45482
45478
|
var import_bytes2 = __toESM(require_lib2());
|
|
45483
45479
|
var logger2 = new Logger(version3);
|
|
@@ -46175,136 +46171,14 @@ class VoidSigner extends Signer {
|
|
|
46175
46171
|
}
|
|
46176
46172
|
}
|
|
46177
46173
|
|
|
46178
|
-
// node_modules/@ethersproject/address/lib.esm/index.js
|
|
46179
|
-
var import_bytes3 = __toESM(require_lib2());
|
|
46180
|
-
var import_keccak256 = __toESM(require_lib5());
|
|
46181
|
-
var import_rlp = __toESM(require_lib6());
|
|
46182
|
-
|
|
46183
|
-
// node_modules/@ethersproject/address/lib.esm/_version.js
|
|
46184
|
-
var version6 = "address/5.7.0";
|
|
46185
|
-
|
|
46186
|
-
// node_modules/@ethersproject/address/lib.esm/index.js
|
|
46187
|
-
var logger5 = new Logger(version6);
|
|
46188
|
-
function getChecksumAddress(address) {
|
|
46189
|
-
if (!import_bytes3.isHexString(address, 20)) {
|
|
46190
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46191
|
-
}
|
|
46192
|
-
address = address.toLowerCase();
|
|
46193
|
-
const chars = address.substring(2).split("");
|
|
46194
|
-
const expanded = new Uint8Array(40);
|
|
46195
|
-
for (let i2 = 0;i2 < 40; i2++) {
|
|
46196
|
-
expanded[i2] = chars[i2].charCodeAt(0);
|
|
46197
|
-
}
|
|
46198
|
-
const hashed = import_bytes3.arrayify(import_keccak256.keccak256(expanded));
|
|
46199
|
-
for (let i2 = 0;i2 < 40; i2 += 2) {
|
|
46200
|
-
if (hashed[i2 >> 1] >> 4 >= 8) {
|
|
46201
|
-
chars[i2] = chars[i2].toUpperCase();
|
|
46202
|
-
}
|
|
46203
|
-
if ((hashed[i2 >> 1] & 15) >= 8) {
|
|
46204
|
-
chars[i2 + 1] = chars[i2 + 1].toUpperCase();
|
|
46205
|
-
}
|
|
46206
|
-
}
|
|
46207
|
-
return "0x" + chars.join("");
|
|
46208
|
-
}
|
|
46209
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
46210
|
-
function log10(x) {
|
|
46211
|
-
if (Math.log10) {
|
|
46212
|
-
return Math.log10(x);
|
|
46213
|
-
}
|
|
46214
|
-
return Math.log(x) / Math.LN10;
|
|
46215
|
-
}
|
|
46216
|
-
var ibanLookup = {};
|
|
46217
|
-
for (let i2 = 0;i2 < 10; i2++) {
|
|
46218
|
-
ibanLookup[String(i2)] = String(i2);
|
|
46219
|
-
}
|
|
46220
|
-
for (let i2 = 0;i2 < 26; i2++) {
|
|
46221
|
-
ibanLookup[String.fromCharCode(65 + i2)] = String(10 + i2);
|
|
46222
|
-
}
|
|
46223
|
-
var safeDigits = Math.floor(log10(MAX_SAFE_INTEGER));
|
|
46224
|
-
function ibanChecksum(address) {
|
|
46225
|
-
address = address.toUpperCase();
|
|
46226
|
-
address = address.substring(4) + address.substring(0, 2) + "00";
|
|
46227
|
-
let expanded = address.split("").map((c) => {
|
|
46228
|
-
return ibanLookup[c];
|
|
46229
|
-
}).join("");
|
|
46230
|
-
while (expanded.length >= safeDigits) {
|
|
46231
|
-
let block = expanded.substring(0, safeDigits);
|
|
46232
|
-
expanded = parseInt(block, 10) % 97 + expanded.substring(block.length);
|
|
46233
|
-
}
|
|
46234
|
-
let checksum = String(98 - parseInt(expanded, 10) % 97);
|
|
46235
|
-
while (checksum.length < 2) {
|
|
46236
|
-
checksum = "0" + checksum;
|
|
46237
|
-
}
|
|
46238
|
-
return checksum;
|
|
46239
|
-
}
|
|
46240
|
-
function getAddress(address) {
|
|
46241
|
-
let result = null;
|
|
46242
|
-
if (typeof address !== "string") {
|
|
46243
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46244
|
-
}
|
|
46245
|
-
if (address.match(/^(0x)?[0-9a-fA-F]{40}$/)) {
|
|
46246
|
-
if (address.substring(0, 2) !== "0x") {
|
|
46247
|
-
address = "0x" + address;
|
|
46248
|
-
}
|
|
46249
|
-
result = getChecksumAddress(address);
|
|
46250
|
-
if (address.match(/([A-F].*[a-f])|([a-f].*[A-F])/) && result !== address) {
|
|
46251
|
-
logger5.throwArgumentError("bad address checksum", "address", address);
|
|
46252
|
-
}
|
|
46253
|
-
} else if (address.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)) {
|
|
46254
|
-
if (address.substring(2, 4) !== ibanChecksum(address)) {
|
|
46255
|
-
logger5.throwArgumentError("bad icap checksum", "address", address);
|
|
46256
|
-
}
|
|
46257
|
-
result = _base36To16(address.substring(4));
|
|
46258
|
-
while (result.length < 40) {
|
|
46259
|
-
result = "0" + result;
|
|
46260
|
-
}
|
|
46261
|
-
result = getChecksumAddress("0x" + result);
|
|
46262
|
-
} else {
|
|
46263
|
-
logger5.throwArgumentError("invalid address", "address", address);
|
|
46264
|
-
}
|
|
46265
|
-
return result;
|
|
46266
|
-
}
|
|
46267
|
-
function isAddress(address) {
|
|
46268
|
-
try {
|
|
46269
|
-
getAddress(address);
|
|
46270
|
-
return true;
|
|
46271
|
-
} catch (error) {}
|
|
46272
|
-
return false;
|
|
46273
|
-
}
|
|
46274
|
-
function getIcapAddress(address) {
|
|
46275
|
-
let base36 = _base16To36(getAddress(address).substring(2)).toUpperCase();
|
|
46276
|
-
while (base36.length < 30) {
|
|
46277
|
-
base36 = "0" + base36;
|
|
46278
|
-
}
|
|
46279
|
-
return "XE" + ibanChecksum("XE00" + base36) + base36;
|
|
46280
|
-
}
|
|
46281
|
-
function getContractAddress(transaction) {
|
|
46282
|
-
let from2 = null;
|
|
46283
|
-
try {
|
|
46284
|
-
from2 = getAddress(transaction.from);
|
|
46285
|
-
} catch (error) {
|
|
46286
|
-
logger5.throwArgumentError("missing from address", "transaction", transaction);
|
|
46287
|
-
}
|
|
46288
|
-
const nonce = import_bytes3.stripZeros(import_bytes3.arrayify(BigNumber.from(transaction.nonce).toHexString()));
|
|
46289
|
-
return getAddress(import_bytes3.hexDataSlice(import_keccak256.keccak256(import_rlp.encode([from2, nonce])), 12));
|
|
46290
|
-
}
|
|
46291
|
-
function getCreate2Address(from2, salt, initCodeHash) {
|
|
46292
|
-
if (import_bytes3.hexDataLength(salt) !== 32) {
|
|
46293
|
-
logger5.throwArgumentError("salt must be 32 bytes", "salt", salt);
|
|
46294
|
-
}
|
|
46295
|
-
if (import_bytes3.hexDataLength(initCodeHash) !== 32) {
|
|
46296
|
-
logger5.throwArgumentError("initCodeHash must be 32 bytes", "initCodeHash", initCodeHash);
|
|
46297
|
-
}
|
|
46298
|
-
return getAddress(import_bytes3.hexDataSlice(import_keccak256.keccak256(import_bytes3.concat(["0xff", getAddress(from2), salt, initCodeHash])), 12));
|
|
46299
|
-
}
|
|
46300
|
-
|
|
46301
46174
|
// node_modules/@ethersproject/contracts/lib.esm/index.js
|
|
46302
|
-
var
|
|
46175
|
+
var import_address2 = __toESM(require_lib7());
|
|
46176
|
+
var import_bytes3 = __toESM(require_lib2());
|
|
46303
46177
|
var import_properties3 = __toESM(require_lib4());
|
|
46304
46178
|
var import_transactions = __toESM(require_lib15());
|
|
46305
46179
|
|
|
46306
46180
|
// node_modules/@ethersproject/contracts/lib.esm/_version.js
|
|
46307
|
-
var
|
|
46181
|
+
var version7 = "contracts/5.7.0";
|
|
46308
46182
|
|
|
46309
46183
|
// node_modules/@ethersproject/contracts/lib.esm/index.js
|
|
46310
46184
|
var __awaiter3 = function(thisArg, _arguments, P, generator) {
|
|
@@ -46334,7 +46208,7 @@ var __awaiter3 = function(thisArg, _arguments, P, generator) {
|
|
|
46334
46208
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46335
46209
|
});
|
|
46336
46210
|
};
|
|
46337
|
-
var
|
|
46211
|
+
var logger5 = new Logger(version7);
|
|
46338
46212
|
var allowedTransactionKeys2 = {
|
|
46339
46213
|
chainId: true,
|
|
46340
46214
|
data: true,
|
|
@@ -46355,19 +46229,19 @@ function resolveName(resolver, nameOrPromise) {
|
|
|
46355
46229
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46356
46230
|
const name = yield nameOrPromise;
|
|
46357
46231
|
if (typeof name !== "string") {
|
|
46358
|
-
|
|
46232
|
+
logger5.throwArgumentError("invalid address or ENS name", "name", name);
|
|
46359
46233
|
}
|
|
46360
46234
|
try {
|
|
46361
|
-
return getAddress(name);
|
|
46235
|
+
return import_address2.getAddress(name);
|
|
46362
46236
|
} catch (error) {}
|
|
46363
46237
|
if (!resolver) {
|
|
46364
|
-
|
|
46238
|
+
logger5.throwError("a provider or signer is needed to resolve ENS names", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46365
46239
|
operation: "resolveName"
|
|
46366
46240
|
});
|
|
46367
46241
|
}
|
|
46368
46242
|
const address = yield resolver.resolveName(name);
|
|
46369
46243
|
if (address == null) {
|
|
46370
|
-
|
|
46244
|
+
logger5.throwArgumentError("resolver or addr is not configured for ENS name", "name", name);
|
|
46371
46245
|
}
|
|
46372
46246
|
return address;
|
|
46373
46247
|
});
|
|
@@ -46387,7 +46261,7 @@ function resolveAddresses(resolver, value, paramType) {
|
|
|
46387
46261
|
}
|
|
46388
46262
|
if (paramType.baseType === "array") {
|
|
46389
46263
|
if (!Array.isArray(value)) {
|
|
46390
|
-
return Promise.reject(
|
|
46264
|
+
return Promise.reject(logger5.makeError("invalid value for array", Logger.errors.INVALID_ARGUMENT, {
|
|
46391
46265
|
argument: "value",
|
|
46392
46266
|
value
|
|
46393
46267
|
}));
|
|
@@ -46403,15 +46277,15 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46403
46277
|
if (args.length === fragment.inputs.length + 1 && typeof args[args.length - 1] === "object") {
|
|
46404
46278
|
overrides = import_properties3.shallowCopy(args.pop());
|
|
46405
46279
|
}
|
|
46406
|
-
|
|
46280
|
+
logger5.checkArgumentCount(args.length, fragment.inputs.length, "passed to contract");
|
|
46407
46281
|
if (contract.signer) {
|
|
46408
46282
|
if (overrides.from) {
|
|
46409
46283
|
overrides.from = import_properties3.resolveProperties({
|
|
46410
46284
|
override: resolveName(contract.signer, overrides.from),
|
|
46411
46285
|
signer: contract.signer.getAddress()
|
|
46412
46286
|
}).then((check) => __awaiter3(this, undefined, undefined, function* () {
|
|
46413
|
-
if (getAddress(check.signer) !== check.override) {
|
|
46414
|
-
|
|
46287
|
+
if (import_address2.getAddress(check.signer) !== check.override) {
|
|
46288
|
+
logger5.throwError("Contract with a Signer cannot override from", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46415
46289
|
operation: "overrides.from"
|
|
46416
46290
|
});
|
|
46417
46291
|
}
|
|
@@ -46460,7 +46334,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46460
46334
|
}
|
|
46461
46335
|
if (tx.gasLimit == null && fragment.gas != null) {
|
|
46462
46336
|
let intrinsic = 21000;
|
|
46463
|
-
const bytes =
|
|
46337
|
+
const bytes = import_bytes3.arrayify(data);
|
|
46464
46338
|
for (let i2 = 0;i2 < bytes.length; i2++) {
|
|
46465
46339
|
intrinsic += 4;
|
|
46466
46340
|
if (bytes[i2]) {
|
|
@@ -46472,7 +46346,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46472
46346
|
if (ro.value) {
|
|
46473
46347
|
const roValue = BigNumber.from(ro.value);
|
|
46474
46348
|
if (!roValue.isZero() && !fragment.payable) {
|
|
46475
|
-
|
|
46349
|
+
logger5.throwError("non-payable method cannot override value", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46476
46350
|
operation: "overrides.value",
|
|
46477
46351
|
value: overrides.value
|
|
46478
46352
|
});
|
|
@@ -46498,7 +46372,7 @@ function populateTransaction(contract, fragment, args) {
|
|
|
46498
46372
|
delete overrides.ccipReadEnabled;
|
|
46499
46373
|
const leftovers = Object.keys(overrides).filter((key) => overrides[key] != null);
|
|
46500
46374
|
if (leftovers.length) {
|
|
46501
|
-
|
|
46375
|
+
logger5.throwError(`cannot override ${leftovers.map((l) => JSON.stringify(l)).join(",")}`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46502
46376
|
operation: "overrides",
|
|
46503
46377
|
overrides: leftovers
|
|
46504
46378
|
});
|
|
@@ -46516,7 +46390,7 @@ function buildEstimate(contract, fragment) {
|
|
|
46516
46390
|
return function(...args) {
|
|
46517
46391
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46518
46392
|
if (!signerOrProvider) {
|
|
46519
|
-
|
|
46393
|
+
logger5.throwError("estimate require a provider or signer", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46520
46394
|
operation: "estimateGas"
|
|
46521
46395
|
});
|
|
46522
46396
|
}
|
|
@@ -46600,7 +46474,7 @@ function buildSend(contract, fragment) {
|
|
|
46600
46474
|
return function(...args) {
|
|
46601
46475
|
return __awaiter3(this, undefined, undefined, function* () {
|
|
46602
46476
|
if (!contract.signer) {
|
|
46603
|
-
|
|
46477
|
+
logger5.throwError("sending a transaction requires a signer", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46604
46478
|
operation: "sendTransaction"
|
|
46605
46479
|
});
|
|
46606
46480
|
}
|
|
@@ -46691,7 +46565,7 @@ class FragmentRunningEvent extends RunningEvent {
|
|
|
46691
46565
|
let topic = contractInterface.getEventTopic(fragment);
|
|
46692
46566
|
if (topics) {
|
|
46693
46567
|
if (topic !== topics[0]) {
|
|
46694
|
-
|
|
46568
|
+
logger5.throwArgumentError("topic mismatch", "topics", topics);
|
|
46695
46569
|
}
|
|
46696
46570
|
filter.topics = topics.slice();
|
|
46697
46571
|
} else {
|
|
@@ -46760,7 +46634,7 @@ class BaseContract {
|
|
|
46760
46634
|
import_properties3.defineReadOnly(this, "provider", signerOrProvider);
|
|
46761
46635
|
import_properties3.defineReadOnly(this, "signer", null);
|
|
46762
46636
|
} else {
|
|
46763
|
-
|
|
46637
|
+
logger5.throwArgumentError("invalid signer or provider", "signerOrProvider", signerOrProvider);
|
|
46764
46638
|
}
|
|
46765
46639
|
import_properties3.defineReadOnly(this, "callStatic", {});
|
|
46766
46640
|
import_properties3.defineReadOnly(this, "estimateGas", {});
|
|
@@ -46787,23 +46661,23 @@ class BaseContract {
|
|
|
46787
46661
|
if (filters.length === 1) {
|
|
46788
46662
|
import_properties3.defineReadOnly(this.filters, name, this.filters[filters[0]]);
|
|
46789
46663
|
} else {
|
|
46790
|
-
|
|
46664
|
+
logger5.warn(`Duplicate definition of ${name} (${filters.join(", ")})`);
|
|
46791
46665
|
}
|
|
46792
46666
|
});
|
|
46793
46667
|
}
|
|
46794
46668
|
import_properties3.defineReadOnly(this, "_runningEvents", {});
|
|
46795
46669
|
import_properties3.defineReadOnly(this, "_wrappedEmits", {});
|
|
46796
46670
|
if (addressOrName == null) {
|
|
46797
|
-
|
|
46671
|
+
logger5.throwArgumentError("invalid contract address or ENS name", "addressOrName", addressOrName);
|
|
46798
46672
|
}
|
|
46799
46673
|
import_properties3.defineReadOnly(this, "address", addressOrName);
|
|
46800
46674
|
if (this.provider) {
|
|
46801
46675
|
import_properties3.defineReadOnly(this, "resolvedAddress", resolveName(this.provider, addressOrName));
|
|
46802
46676
|
} else {
|
|
46803
46677
|
try {
|
|
46804
|
-
import_properties3.defineReadOnly(this, "resolvedAddress", Promise.resolve(getAddress(addressOrName)));
|
|
46678
|
+
import_properties3.defineReadOnly(this, "resolvedAddress", Promise.resolve(import_address2.getAddress(addressOrName)));
|
|
46805
46679
|
} catch (error) {
|
|
46806
|
-
|
|
46680
|
+
logger5.throwError("provider is required to use ENS name as contract address", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46807
46681
|
operation: "new Contract"
|
|
46808
46682
|
});
|
|
46809
46683
|
}
|
|
@@ -46814,7 +46688,7 @@ class BaseContract {
|
|
|
46814
46688
|
Object.keys(this.interface.functions).forEach((signature) => {
|
|
46815
46689
|
const fragment = this.interface.functions[signature];
|
|
46816
46690
|
if (uniqueSignatures[signature]) {
|
|
46817
|
-
|
|
46691
|
+
logger5.warn(`Duplicate ABI entry for ${JSON.stringify(signature)}`);
|
|
46818
46692
|
return;
|
|
46819
46693
|
}
|
|
46820
46694
|
uniqueSignatures[signature] = true;
|
|
@@ -46868,7 +46742,7 @@ class BaseContract {
|
|
|
46868
46742
|
});
|
|
46869
46743
|
}
|
|
46870
46744
|
static getContractAddress(transaction) {
|
|
46871
|
-
return getContractAddress(transaction);
|
|
46745
|
+
return import_address2.getContractAddress(transaction);
|
|
46872
46746
|
}
|
|
46873
46747
|
static getInterface(contractInterface) {
|
|
46874
46748
|
if (import_abi.Interface.isInterface(contractInterface)) {
|
|
@@ -46888,7 +46762,7 @@ class BaseContract {
|
|
|
46888
46762
|
} else {
|
|
46889
46763
|
this._deployedPromise = this.provider.getCode(this.address, blockTag).then((code2) => {
|
|
46890
46764
|
if (code2 === "0x") {
|
|
46891
|
-
|
|
46765
|
+
logger5.throwError("contract not deployed", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
46892
46766
|
contractAddress: this.address,
|
|
46893
46767
|
operation: "getDeployed"
|
|
46894
46768
|
});
|
|
@@ -46901,14 +46775,14 @@ class BaseContract {
|
|
|
46901
46775
|
}
|
|
46902
46776
|
fallback(overrides) {
|
|
46903
46777
|
if (!this.signer) {
|
|
46904
|
-
|
|
46778
|
+
logger5.throwError("sending a transactions require a signer", Logger.errors.UNSUPPORTED_OPERATION, { operation: "sendTransaction(fallback)" });
|
|
46905
46779
|
}
|
|
46906
46780
|
const tx = import_properties3.shallowCopy(overrides || {});
|
|
46907
46781
|
["from", "to"].forEach(function(key) {
|
|
46908
46782
|
if (tx[key] == null) {
|
|
46909
46783
|
return;
|
|
46910
46784
|
}
|
|
46911
|
-
|
|
46785
|
+
logger5.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });
|
|
46912
46786
|
});
|
|
46913
46787
|
tx.to = this.resolvedAddress;
|
|
46914
46788
|
return this.deployed().then(() => {
|
|
@@ -47001,7 +46875,7 @@ class BaseContract {
|
|
|
47001
46875
|
}
|
|
47002
46876
|
_addEventListener(runningEvent, listener, once3) {
|
|
47003
46877
|
if (!this.provider) {
|
|
47004
|
-
|
|
46878
|
+
logger5.throwError("events require a provider or a signer with a provider", Logger.errors.UNSUPPORTED_OPERATION, { operation: "once" });
|
|
47005
46879
|
}
|
|
47006
46880
|
runningEvent.addListener(listener, once3);
|
|
47007
46881
|
this._runningEvents[runningEvent.tag] = runningEvent;
|
|
@@ -47032,9 +46906,9 @@ class BaseContract {
|
|
|
47032
46906
|
queryFilter(event, fromBlockOrBlockhash, toBlock) {
|
|
47033
46907
|
const runningEvent = this._getRunningEvent(event);
|
|
47034
46908
|
const filter = import_properties3.shallowCopy(runningEvent.filter);
|
|
47035
|
-
if (typeof fromBlockOrBlockhash === "string" &&
|
|
46909
|
+
if (typeof fromBlockOrBlockhash === "string" && import_bytes3.isHexString(fromBlockOrBlockhash, 32)) {
|
|
47036
46910
|
if (toBlock != null) {
|
|
47037
|
-
|
|
46911
|
+
logger5.throwArgumentError("cannot specify toBlock with blockhash", "toBlock", toBlock);
|
|
47038
46912
|
}
|
|
47039
46913
|
filter.blockHash = fromBlockOrBlockhash;
|
|
47040
46914
|
} else {
|
|
@@ -47127,8 +47001,8 @@ class ContractFactory {
|
|
|
47127
47001
|
let bytecodeHex = null;
|
|
47128
47002
|
if (typeof bytecode === "string") {
|
|
47129
47003
|
bytecodeHex = bytecode;
|
|
47130
|
-
} else if (
|
|
47131
|
-
bytecodeHex =
|
|
47004
|
+
} else if (import_bytes3.isBytes(bytecode)) {
|
|
47005
|
+
bytecodeHex = import_bytes3.hexlify(bytecode);
|
|
47132
47006
|
} else if (bytecode && typeof bytecode.object === "string") {
|
|
47133
47007
|
bytecodeHex = bytecode.object;
|
|
47134
47008
|
} else {
|
|
@@ -47137,11 +47011,11 @@ class ContractFactory {
|
|
|
47137
47011
|
if (bytecodeHex.substring(0, 2) !== "0x") {
|
|
47138
47012
|
bytecodeHex = "0x" + bytecodeHex;
|
|
47139
47013
|
}
|
|
47140
|
-
if (!
|
|
47141
|
-
|
|
47014
|
+
if (!import_bytes3.isHexString(bytecodeHex) || bytecodeHex.length % 2) {
|
|
47015
|
+
logger5.throwArgumentError("invalid bytecode", "bytecode", bytecode);
|
|
47142
47016
|
}
|
|
47143
47017
|
if (signer && !Signer.isSigner(signer)) {
|
|
47144
|
-
|
|
47018
|
+
logger5.throwArgumentError("invalid signer", "signer", signer);
|
|
47145
47019
|
}
|
|
47146
47020
|
import_properties3.defineReadOnly(this, "bytecode", bytecodeHex);
|
|
47147
47021
|
import_properties3.defineReadOnly(this, "interface", import_properties3.getStatic(new.target, "getInterface")(contractInterface));
|
|
@@ -47161,19 +47035,19 @@ class ContractFactory {
|
|
|
47161
47035
|
if (tx[key] == null) {
|
|
47162
47036
|
return;
|
|
47163
47037
|
}
|
|
47164
|
-
|
|
47038
|
+
logger5.throwError("cannot override " + key, Logger.errors.UNSUPPORTED_OPERATION, { operation: key });
|
|
47165
47039
|
});
|
|
47166
47040
|
if (tx.value) {
|
|
47167
47041
|
const value = BigNumber.from(tx.value);
|
|
47168
47042
|
if (!value.isZero() && !this.interface.deploy.payable) {
|
|
47169
|
-
|
|
47043
|
+
logger5.throwError("non-payable constructor cannot override value", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
47170
47044
|
operation: "overrides.value",
|
|
47171
47045
|
value: tx.value
|
|
47172
47046
|
});
|
|
47173
47047
|
}
|
|
47174
47048
|
}
|
|
47175
|
-
|
|
47176
|
-
tx.data =
|
|
47049
|
+
logger5.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor");
|
|
47050
|
+
tx.data = import_bytes3.hexlify(import_bytes3.concat([
|
|
47177
47051
|
this.bytecode,
|
|
47178
47052
|
this.interface.encodeDeploy(args)
|
|
47179
47053
|
]));
|
|
@@ -47185,7 +47059,7 @@ class ContractFactory {
|
|
|
47185
47059
|
if (args.length === this.interface.deploy.inputs.length + 1) {
|
|
47186
47060
|
overrides = args.pop();
|
|
47187
47061
|
}
|
|
47188
|
-
|
|
47062
|
+
logger5.checkArgumentCount(args.length, this.interface.deploy.inputs.length, " in Contract constructor");
|
|
47189
47063
|
const params = yield resolveAddresses(this.signer, args, this.interface.deploy.inputs);
|
|
47190
47064
|
params.push(overrides);
|
|
47191
47065
|
const unsignedTx = this.getDeployTransaction(...params);
|
|
@@ -47205,7 +47079,7 @@ class ContractFactory {
|
|
|
47205
47079
|
}
|
|
47206
47080
|
static fromSolidity(compilerOutput, signer) {
|
|
47207
47081
|
if (compilerOutput == null) {
|
|
47208
|
-
|
|
47082
|
+
logger5.throwError("missing compiler output", Logger.errors.MISSING_ARGUMENT, { argument: "compilerOutput" });
|
|
47209
47083
|
}
|
|
47210
47084
|
if (typeof compilerOutput === "string") {
|
|
47211
47085
|
compilerOutput = JSON.parse(compilerOutput);
|
|
@@ -47223,7 +47097,7 @@ class ContractFactory {
|
|
|
47223
47097
|
return Contract.getInterface(contractInterface);
|
|
47224
47098
|
}
|
|
47225
47099
|
static getContractAddress(tx) {
|
|
47226
|
-
return getContractAddress(tx);
|
|
47100
|
+
return import_address2.getContractAddress(tx);
|
|
47227
47101
|
}
|
|
47228
47102
|
static getContract(address, contractInterface, signer) {
|
|
47229
47103
|
return new Contract(address, contractInterface, signer);
|
|
@@ -47231,10 +47105,11 @@ class ContractFactory {
|
|
|
47231
47105
|
}
|
|
47232
47106
|
|
|
47233
47107
|
// node_modules/@ethersproject/wallet/lib.esm/index.js
|
|
47234
|
-
var
|
|
47108
|
+
var import_address3 = __toESM(require_lib7());
|
|
47109
|
+
var import_bytes4 = __toESM(require_lib2());
|
|
47235
47110
|
var import_hash = __toESM(require_lib12());
|
|
47236
47111
|
var import_hdnode = __toESM(require_lib20());
|
|
47237
|
-
var
|
|
47112
|
+
var import_keccak256 = __toESM(require_lib5());
|
|
47238
47113
|
var import_properties4 = __toESM(require_lib4());
|
|
47239
47114
|
var import_random = __toESM(require_lib21());
|
|
47240
47115
|
var import_signing_key = __toESM(require_lib14());
|
|
@@ -47242,7 +47117,7 @@ var import_json_wallets = __toESM(require_lib22());
|
|
|
47242
47117
|
var import_transactions2 = __toESM(require_lib15());
|
|
47243
47118
|
|
|
47244
47119
|
// node_modules/@ethersproject/wallet/lib.esm/_version.js
|
|
47245
|
-
var
|
|
47120
|
+
var version8 = "wallet/5.7.0";
|
|
47246
47121
|
|
|
47247
47122
|
// node_modules/@ethersproject/wallet/lib.esm/index.js
|
|
47248
47123
|
var __awaiter4 = function(thisArg, _arguments, P, generator) {
|
|
@@ -47272,9 +47147,9 @@ var __awaiter4 = function(thisArg, _arguments, P, generator) {
|
|
|
47272
47147
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
47273
47148
|
});
|
|
47274
47149
|
};
|
|
47275
|
-
var
|
|
47150
|
+
var logger6 = new Logger(version8);
|
|
47276
47151
|
function isAccount(value) {
|
|
47277
|
-
return value != null &&
|
|
47152
|
+
return value != null && import_bytes4.isHexString(value.privateKey, 32) && value.address != null;
|
|
47278
47153
|
}
|
|
47279
47154
|
function hasMnemonic(value) {
|
|
47280
47155
|
const mnemonic = value.mnemonic;
|
|
@@ -47288,8 +47163,8 @@ class Wallet extends Signer {
|
|
|
47288
47163
|
const signingKey = new import_signing_key.SigningKey(privateKey.privateKey);
|
|
47289
47164
|
import_properties4.defineReadOnly(this, "_signingKey", () => signingKey);
|
|
47290
47165
|
import_properties4.defineReadOnly(this, "address", import_transactions2.computeAddress(this.publicKey));
|
|
47291
|
-
if (this.address !== getAddress(privateKey.address)) {
|
|
47292
|
-
|
|
47166
|
+
if (this.address !== import_address3.getAddress(privateKey.address)) {
|
|
47167
|
+
logger6.throwArgumentError("privateKey/address mismatch", "privateKey", "[REDACTED]");
|
|
47293
47168
|
}
|
|
47294
47169
|
if (hasMnemonic(privateKey)) {
|
|
47295
47170
|
const srcMnemonic = privateKey.mnemonic;
|
|
@@ -47301,7 +47176,7 @@ class Wallet extends Signer {
|
|
|
47301
47176
|
const mnemonic = this.mnemonic;
|
|
47302
47177
|
const node = import_hdnode.HDNode.fromMnemonic(mnemonic.phrase, null, mnemonic.locale).derivePath(mnemonic.path);
|
|
47303
47178
|
if (import_transactions2.computeAddress(node.privateKey) !== this.address) {
|
|
47304
|
-
|
|
47179
|
+
logger6.throwArgumentError("mnemonic/address mismatch", "privateKey", "[REDACTED]");
|
|
47305
47180
|
}
|
|
47306
47181
|
} else {
|
|
47307
47182
|
import_properties4.defineReadOnly(this, "_mnemonic", () => null);
|
|
@@ -47309,7 +47184,7 @@ class Wallet extends Signer {
|
|
|
47309
47184
|
} else {
|
|
47310
47185
|
if (import_signing_key.SigningKey.isSigningKey(privateKey)) {
|
|
47311
47186
|
if (privateKey.curve !== "secp256k1") {
|
|
47312
|
-
|
|
47187
|
+
logger6.throwArgumentError("unsupported curve; must be secp256k1", "privateKey", "[REDACTED]");
|
|
47313
47188
|
}
|
|
47314
47189
|
import_properties4.defineReadOnly(this, "_signingKey", () => privateKey);
|
|
47315
47190
|
} else {
|
|
@@ -47325,7 +47200,7 @@ class Wallet extends Signer {
|
|
|
47325
47200
|
import_properties4.defineReadOnly(this, "address", import_transactions2.computeAddress(this.publicKey));
|
|
47326
47201
|
}
|
|
47327
47202
|
if (provider && !Provider.isProvider(provider)) {
|
|
47328
|
-
|
|
47203
|
+
logger6.throwArgumentError("invalid provider", "provider", provider);
|
|
47329
47204
|
}
|
|
47330
47205
|
import_properties4.defineReadOnly(this, "provider", provider || null);
|
|
47331
47206
|
}
|
|
@@ -47347,32 +47222,32 @@ class Wallet extends Signer {
|
|
|
47347
47222
|
signTransaction(transaction) {
|
|
47348
47223
|
return import_properties4.resolveProperties(transaction).then((tx) => {
|
|
47349
47224
|
if (tx.from != null) {
|
|
47350
|
-
if (getAddress(tx.from) !== this.address) {
|
|
47351
|
-
|
|
47225
|
+
if (import_address3.getAddress(tx.from) !== this.address) {
|
|
47226
|
+
logger6.throwArgumentError("transaction from address mismatch", "transaction.from", transaction.from);
|
|
47352
47227
|
}
|
|
47353
47228
|
delete tx.from;
|
|
47354
47229
|
}
|
|
47355
|
-
const signature = this._signingKey().signDigest(
|
|
47230
|
+
const signature = this._signingKey().signDigest(import_keccak256.keccak256(import_transactions2.serialize(tx)));
|
|
47356
47231
|
return import_transactions2.serialize(tx, signature);
|
|
47357
47232
|
});
|
|
47358
47233
|
}
|
|
47359
47234
|
signMessage(message) {
|
|
47360
47235
|
return __awaiter4(this, undefined, undefined, function* () {
|
|
47361
|
-
return
|
|
47236
|
+
return import_bytes4.joinSignature(this._signingKey().signDigest(import_hash.hashMessage(message)));
|
|
47362
47237
|
});
|
|
47363
47238
|
}
|
|
47364
47239
|
_signTypedData(domain, types2, value) {
|
|
47365
47240
|
return __awaiter4(this, undefined, undefined, function* () {
|
|
47366
47241
|
const populated = yield import_hash._TypedDataEncoder.resolveNames(domain, types2, value, (name) => {
|
|
47367
47242
|
if (this.provider == null) {
|
|
47368
|
-
|
|
47243
|
+
logger6.throwError("cannot resolve ENS names without a provider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
47369
47244
|
operation: "resolveName",
|
|
47370
47245
|
value: name
|
|
47371
47246
|
});
|
|
47372
47247
|
}
|
|
47373
47248
|
return this.provider.resolveName(name);
|
|
47374
47249
|
});
|
|
47375
|
-
return
|
|
47250
|
+
return import_bytes4.joinSignature(this._signingKey().signDigest(import_hash._TypedDataEncoder.hash(populated.domain, types2, populated.value)));
|
|
47376
47251
|
});
|
|
47377
47252
|
}
|
|
47378
47253
|
encrypt(password, options, progressCallback) {
|
|
@@ -47394,7 +47269,7 @@ class Wallet extends Signer {
|
|
|
47394
47269
|
options = {};
|
|
47395
47270
|
}
|
|
47396
47271
|
if (options.extraEntropy) {
|
|
47397
|
-
entropy =
|
|
47272
|
+
entropy = import_bytes4.arrayify(import_bytes4.hexDataSlice(import_keccak256.keccak256(import_bytes4.concat([entropy, options.extraEntropy])), 0, 16));
|
|
47398
47273
|
}
|
|
47399
47274
|
const mnemonic = import_hdnode.entropyToMnemonic(entropy, options.locale);
|
|
47400
47275
|
return Wallet.fromMnemonic(mnemonic, options.path, options.locale);
|
|
@@ -47485,10 +47360,10 @@ __export(exports_lib2, {
|
|
|
47485
47360
|
});
|
|
47486
47361
|
|
|
47487
47362
|
// node_modules/@ethersproject/networks/lib.esm/_version.js
|
|
47488
|
-
var
|
|
47363
|
+
var version9 = "networks/5.7.1";
|
|
47489
47364
|
|
|
47490
47365
|
// node_modules/@ethersproject/networks/lib.esm/index.js
|
|
47491
|
-
var
|
|
47366
|
+
var logger7 = new Logger(version9);
|
|
47492
47367
|
function isRenetworkable(value) {
|
|
47493
47368
|
return value && typeof value.renetwork === "function";
|
|
47494
47369
|
}
|
|
@@ -47683,12 +47558,12 @@ function getNetwork(network) {
|
|
|
47683
47558
|
const standard = networks[network.name];
|
|
47684
47559
|
if (!standard) {
|
|
47685
47560
|
if (typeof network.chainId !== "number") {
|
|
47686
|
-
|
|
47561
|
+
logger7.throwArgumentError("invalid network chainId", "network", network);
|
|
47687
47562
|
}
|
|
47688
47563
|
return network;
|
|
47689
47564
|
}
|
|
47690
47565
|
if (network.chainId !== 0 && network.chainId !== standard.chainId) {
|
|
47691
|
-
|
|
47566
|
+
logger7.throwArgumentError("network chainId mismatch", "network", network);
|
|
47692
47567
|
}
|
|
47693
47568
|
let defaultProvider = network._defaultProvider || null;
|
|
47694
47569
|
if (defaultProvider == null && standard._defaultProvider) {
|
|
@@ -47709,7 +47584,7 @@ function getNetwork(network) {
|
|
|
47709
47584
|
// node_modules/@ethersproject/providers/lib.esm/base-provider.js
|
|
47710
47585
|
var import_base64 = __toESM(require_lib10());
|
|
47711
47586
|
var import_basex = __toESM(require_lib16());
|
|
47712
|
-
var
|
|
47587
|
+
var import_bytes6 = __toESM(require_lib2());
|
|
47713
47588
|
var import_hash2 = __toESM(require_lib12());
|
|
47714
47589
|
var import_properties6 = __toESM(require_lib4());
|
|
47715
47590
|
var import_sha2 = __toESM(require_lib17());
|
|
@@ -47718,13 +47593,14 @@ var import_web = __toESM(require_lib23());
|
|
|
47718
47593
|
var import_bech32 = __toESM(require_bech32());
|
|
47719
47594
|
|
|
47720
47595
|
// node_modules/@ethersproject/providers/lib.esm/_version.js
|
|
47721
|
-
var
|
|
47596
|
+
var version10 = "providers/5.7.2";
|
|
47722
47597
|
|
|
47723
47598
|
// node_modules/@ethersproject/providers/lib.esm/formatter.js
|
|
47724
|
-
var
|
|
47599
|
+
var import_address4 = __toESM(require_lib7());
|
|
47600
|
+
var import_bytes5 = __toESM(require_lib2());
|
|
47725
47601
|
var import_properties5 = __toESM(require_lib4());
|
|
47726
47602
|
var import_transactions3 = __toESM(require_lib15());
|
|
47727
|
-
var
|
|
47603
|
+
var logger8 = new Logger(version10);
|
|
47728
47604
|
|
|
47729
47605
|
class Formatter {
|
|
47730
47606
|
constructor() {
|
|
@@ -47881,11 +47757,11 @@ class Formatter {
|
|
|
47881
47757
|
if (!strict && value.substring(0, 2) !== "0x") {
|
|
47882
47758
|
value = "0x" + value;
|
|
47883
47759
|
}
|
|
47884
|
-
if (
|
|
47760
|
+
if (import_bytes5.isHexString(value)) {
|
|
47885
47761
|
return value.toLowerCase();
|
|
47886
47762
|
}
|
|
47887
47763
|
}
|
|
47888
|
-
return
|
|
47764
|
+
return logger8.throwArgumentError("invalid hash", "value", value);
|
|
47889
47765
|
}
|
|
47890
47766
|
data(value, strict) {
|
|
47891
47767
|
const result = this.hex(value, strict);
|
|
@@ -47895,17 +47771,17 @@ class Formatter {
|
|
|
47895
47771
|
return result;
|
|
47896
47772
|
}
|
|
47897
47773
|
address(value) {
|
|
47898
|
-
return getAddress(value);
|
|
47774
|
+
return import_address4.getAddress(value);
|
|
47899
47775
|
}
|
|
47900
47776
|
callAddress(value) {
|
|
47901
|
-
if (!
|
|
47777
|
+
if (!import_bytes5.isHexString(value, 32)) {
|
|
47902
47778
|
return null;
|
|
47903
47779
|
}
|
|
47904
|
-
const address = getAddress(
|
|
47780
|
+
const address = import_address4.getAddress(import_bytes5.hexDataSlice(value, 12));
|
|
47905
47781
|
return address === AddressZero ? null : address;
|
|
47906
47782
|
}
|
|
47907
47783
|
contractAddress(value) {
|
|
47908
|
-
return getContractAddress(value);
|
|
47784
|
+
return import_address4.getContractAddress(value);
|
|
47909
47785
|
}
|
|
47910
47786
|
blockTag(blockTag) {
|
|
47911
47787
|
if (blockTag == null) {
|
|
@@ -47923,15 +47799,15 @@ class Formatter {
|
|
|
47923
47799
|
case "finalized":
|
|
47924
47800
|
return blockTag;
|
|
47925
47801
|
}
|
|
47926
|
-
if (typeof blockTag === "number" ||
|
|
47927
|
-
return
|
|
47802
|
+
if (typeof blockTag === "number" || import_bytes5.isHexString(blockTag)) {
|
|
47803
|
+
return import_bytes5.hexValue(blockTag);
|
|
47928
47804
|
}
|
|
47929
47805
|
throw new Error("invalid blockTag");
|
|
47930
47806
|
}
|
|
47931
47807
|
hash(value, strict) {
|
|
47932
47808
|
const result = this.hex(value, strict);
|
|
47933
|
-
if (
|
|
47934
|
-
return
|
|
47809
|
+
if (import_bytes5.hexDataLength(result) !== 32) {
|
|
47810
|
+
return logger8.throwArgumentError("invalid hash", "value", value);
|
|
47935
47811
|
}
|
|
47936
47812
|
return result;
|
|
47937
47813
|
}
|
|
@@ -47946,10 +47822,10 @@ class Formatter {
|
|
|
47946
47822
|
return null;
|
|
47947
47823
|
}
|
|
47948
47824
|
uint256(value) {
|
|
47949
|
-
if (!
|
|
47825
|
+
if (!import_bytes5.isHexString(value)) {
|
|
47950
47826
|
throw new Error("invalid uint256");
|
|
47951
47827
|
}
|
|
47952
|
-
return
|
|
47828
|
+
return import_bytes5.hexZeroPad(value, 32);
|
|
47953
47829
|
}
|
|
47954
47830
|
_block(value, format2) {
|
|
47955
47831
|
if (value.author != null && value.miner == null) {
|
|
@@ -47988,7 +47864,7 @@ class Formatter {
|
|
|
47988
47864
|
const result = Formatter.check(this.formats.transaction, transaction);
|
|
47989
47865
|
if (transaction.chainId != null) {
|
|
47990
47866
|
let chainId = transaction.chainId;
|
|
47991
|
-
if (
|
|
47867
|
+
if (import_bytes5.isHexString(chainId)) {
|
|
47992
47868
|
chainId = BigNumber.from(chainId).toNumber();
|
|
47993
47869
|
}
|
|
47994
47870
|
result.chainId = chainId;
|
|
@@ -47997,7 +47873,7 @@ class Formatter {
|
|
|
47997
47873
|
if (chainId == null && result.v == null) {
|
|
47998
47874
|
chainId = transaction.chainId;
|
|
47999
47875
|
}
|
|
48000
|
-
if (
|
|
47876
|
+
if (import_bytes5.isHexString(chainId)) {
|
|
48001
47877
|
chainId = BigNumber.from(chainId).toNumber();
|
|
48002
47878
|
}
|
|
48003
47879
|
if (typeof chainId !== "number" && result.v != null) {
|
|
@@ -48030,15 +47906,15 @@ class Formatter {
|
|
|
48030
47906
|
const value2 = BigNumber.from(result.root).toNumber();
|
|
48031
47907
|
if (value2 === 0 || value2 === 1) {
|
|
48032
47908
|
if (result.status != null && result.status !== value2) {
|
|
48033
|
-
|
|
47909
|
+
logger8.throwArgumentError("alt-root-status/status mismatch", "value", { root: result.root, status: result.status });
|
|
48034
47910
|
}
|
|
48035
47911
|
result.status = value2;
|
|
48036
47912
|
delete result.root;
|
|
48037
47913
|
} else {
|
|
48038
|
-
|
|
47914
|
+
logger8.throwArgumentError("invalid alt-root-status", "value.root", result.root);
|
|
48039
47915
|
}
|
|
48040
47916
|
} else if (result.root.length !== 66) {
|
|
48041
|
-
|
|
47917
|
+
logger8.throwArgumentError("invalid root hash", "value.root", result.root);
|
|
48042
47918
|
}
|
|
48043
47919
|
}
|
|
48044
47920
|
if (result.status != null) {
|
|
@@ -48159,14 +48035,14 @@ var __awaiter5 = function(thisArg, _arguments, P, generator) {
|
|
|
48159
48035
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48160
48036
|
});
|
|
48161
48037
|
};
|
|
48162
|
-
var
|
|
48038
|
+
var logger9 = new Logger(version10);
|
|
48163
48039
|
var MAX_CCIP_REDIRECTS = 10;
|
|
48164
48040
|
function checkTopic(topic) {
|
|
48165
48041
|
if (topic == null) {
|
|
48166
48042
|
return "null";
|
|
48167
48043
|
}
|
|
48168
|
-
if (
|
|
48169
|
-
|
|
48044
|
+
if (import_bytes6.hexDataLength(topic) !== 32) {
|
|
48045
|
+
logger9.throwArgumentError("invalid topic", "topic", topic);
|
|
48170
48046
|
}
|
|
48171
48047
|
return topic.toLowerCase();
|
|
48172
48048
|
}
|
|
@@ -48206,7 +48082,7 @@ function deserializeTopics(data) {
|
|
|
48206
48082
|
function getEventTag2(eventName) {
|
|
48207
48083
|
if (typeof eventName === "string") {
|
|
48208
48084
|
eventName = eventName.toLowerCase();
|
|
48209
|
-
if (
|
|
48085
|
+
if (import_bytes6.hexDataLength(eventName) === 32) {
|
|
48210
48086
|
return "tx:" + eventName;
|
|
48211
48087
|
}
|
|
48212
48088
|
if (eventName.indexOf(":") === -1) {
|
|
@@ -48215,7 +48091,7 @@ function getEventTag2(eventName) {
|
|
|
48215
48091
|
} else if (Array.isArray(eventName)) {
|
|
48216
48092
|
return "filter:*:" + serializeTopics(eventName);
|
|
48217
48093
|
} else if (ForkEvent.isForkEvent(eventName)) {
|
|
48218
|
-
|
|
48094
|
+
logger9.warn("not implemented");
|
|
48219
48095
|
throw new Error("not implemented");
|
|
48220
48096
|
} else if (eventName && typeof eventName === "object") {
|
|
48221
48097
|
return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []);
|
|
@@ -48288,10 +48164,10 @@ var coinInfos = {
|
|
|
48288
48164
|
"700": { symbol: "xdai", ilk: "eth" }
|
|
48289
48165
|
};
|
|
48290
48166
|
function bytes32ify(value) {
|
|
48291
|
-
return
|
|
48167
|
+
return import_bytes6.hexZeroPad(BigNumber.from(value).toHexString(), 32);
|
|
48292
48168
|
}
|
|
48293
48169
|
function base58Encode(data) {
|
|
48294
|
-
return import_basex.Base58.encode(
|
|
48170
|
+
return import_basex.Base58.encode(import_bytes6.concat([data, import_bytes6.hexDataSlice(import_sha2.sha256(import_sha2.sha256(data)), 0, 4)]));
|
|
48295
48171
|
}
|
|
48296
48172
|
var matcherIpfs = new RegExp("^(ipfs)://(.*)$", "i");
|
|
48297
48173
|
var matchers = [
|
|
@@ -48310,9 +48186,9 @@ function _parseBytes(result, start) {
|
|
|
48310
48186
|
if (result === "0x") {
|
|
48311
48187
|
return null;
|
|
48312
48188
|
}
|
|
48313
|
-
const offset = BigNumber.from(
|
|
48314
|
-
const length = BigNumber.from(
|
|
48315
|
-
return
|
|
48189
|
+
const offset = BigNumber.from(import_bytes6.hexDataSlice(result, start, start + 32)).toNumber();
|
|
48190
|
+
const length = BigNumber.from(import_bytes6.hexDataSlice(result, offset, offset + 32)).toNumber();
|
|
48191
|
+
return import_bytes6.hexDataSlice(result, offset + 32, offset + 32 + length);
|
|
48316
48192
|
}
|
|
48317
48193
|
function getIpfsLink(link) {
|
|
48318
48194
|
if (link.match(/^ipfs:\/\/ipfs\//i)) {
|
|
@@ -48320,12 +48196,12 @@ function getIpfsLink(link) {
|
|
|
48320
48196
|
} else if (link.match(/^ipfs:\/\//i)) {
|
|
48321
48197
|
link = link.substring(7);
|
|
48322
48198
|
} else {
|
|
48323
|
-
|
|
48199
|
+
logger9.throwArgumentError("unsupported IPFS format", "link", link);
|
|
48324
48200
|
}
|
|
48325
48201
|
return `https://gateway.ipfs.io/ipfs/${link}`;
|
|
48326
48202
|
}
|
|
48327
48203
|
function numPad(value) {
|
|
48328
|
-
const result =
|
|
48204
|
+
const result = import_bytes6.arrayify(value);
|
|
48329
48205
|
if (result.length > 32) {
|
|
48330
48206
|
throw new Error("internal; should not happen");
|
|
48331
48207
|
}
|
|
@@ -48349,13 +48225,13 @@ function encodeBytes(datas) {
|
|
|
48349
48225
|
byteCount += 32;
|
|
48350
48226
|
}
|
|
48351
48227
|
for (let i2 = 0;i2 < datas.length; i2++) {
|
|
48352
|
-
const data =
|
|
48228
|
+
const data = import_bytes6.arrayify(datas[i2]);
|
|
48353
48229
|
result[i2] = numPad(byteCount);
|
|
48354
48230
|
result.push(numPad(data.length));
|
|
48355
48231
|
result.push(bytesPad(data));
|
|
48356
48232
|
byteCount += 32 + Math.ceil(data.length / 32) * 32;
|
|
48357
48233
|
}
|
|
48358
|
-
return
|
|
48234
|
+
return import_bytes6.hexConcat(result);
|
|
48359
48235
|
}
|
|
48360
48236
|
|
|
48361
48237
|
class Resolver {
|
|
@@ -48387,17 +48263,17 @@ class Resolver {
|
|
|
48387
48263
|
const tx = {
|
|
48388
48264
|
to: this.address,
|
|
48389
48265
|
ccipReadEnabled: true,
|
|
48390
|
-
data:
|
|
48266
|
+
data: import_bytes6.hexConcat([selector, import_hash2.namehash(this.name), parameters || "0x"])
|
|
48391
48267
|
};
|
|
48392
48268
|
let parseBytes = false;
|
|
48393
48269
|
if (yield this.supportsWildcard()) {
|
|
48394
48270
|
parseBytes = true;
|
|
48395
|
-
tx.data =
|
|
48271
|
+
tx.data = import_bytes6.hexConcat(["0x9061b923", encodeBytes([import_hash2.dnsEncode(this.name), tx.data])]);
|
|
48396
48272
|
}
|
|
48397
48273
|
try {
|
|
48398
48274
|
let result = yield this.provider.call(tx);
|
|
48399
|
-
if (
|
|
48400
|
-
|
|
48275
|
+
if (import_bytes6.arrayify(result).length % 32 === 4) {
|
|
48276
|
+
logger9.throwError("resolver threw error", Logger.errors.CALL_EXCEPTION, {
|
|
48401
48277
|
transaction: tx,
|
|
48402
48278
|
data: result
|
|
48403
48279
|
});
|
|
@@ -48426,20 +48302,20 @@ class Resolver {
|
|
|
48426
48302
|
_getAddress(coinType, hexBytes) {
|
|
48427
48303
|
const coinInfo = coinInfos[String(coinType)];
|
|
48428
48304
|
if (coinInfo == null) {
|
|
48429
|
-
|
|
48305
|
+
logger9.throwError(`unsupported coin type: ${coinType}`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48430
48306
|
operation: `getAddress(${coinType})`
|
|
48431
48307
|
});
|
|
48432
48308
|
}
|
|
48433
48309
|
if (coinInfo.ilk === "eth") {
|
|
48434
48310
|
return this.provider.formatter.address(hexBytes);
|
|
48435
48311
|
}
|
|
48436
|
-
const bytes =
|
|
48312
|
+
const bytes = import_bytes6.arrayify(hexBytes);
|
|
48437
48313
|
if (coinInfo.p2pkh != null) {
|
|
48438
48314
|
const p2pkh = hexBytes.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);
|
|
48439
48315
|
if (p2pkh) {
|
|
48440
48316
|
const length = parseInt(p2pkh[1], 16);
|
|
48441
48317
|
if (p2pkh[2].length === length * 2 && length >= 1 && length <= 75) {
|
|
48442
|
-
return base58Encode(
|
|
48318
|
+
return base58Encode(import_bytes6.concat([[coinInfo.p2pkh], "0x" + p2pkh[2]]));
|
|
48443
48319
|
}
|
|
48444
48320
|
}
|
|
48445
48321
|
}
|
|
@@ -48448,23 +48324,23 @@ class Resolver {
|
|
|
48448
48324
|
if (p2sh) {
|
|
48449
48325
|
const length = parseInt(p2sh[1], 16);
|
|
48450
48326
|
if (p2sh[2].length === length * 2 && length >= 1 && length <= 75) {
|
|
48451
|
-
return base58Encode(
|
|
48327
|
+
return base58Encode(import_bytes6.concat([[coinInfo.p2sh], "0x" + p2sh[2]]));
|
|
48452
48328
|
}
|
|
48453
48329
|
}
|
|
48454
48330
|
}
|
|
48455
48331
|
if (coinInfo.prefix != null) {
|
|
48456
48332
|
const length = bytes[1];
|
|
48457
|
-
let
|
|
48458
|
-
if (
|
|
48333
|
+
let version11 = bytes[0];
|
|
48334
|
+
if (version11 === 0) {
|
|
48459
48335
|
if (length !== 20 && length !== 32) {
|
|
48460
|
-
|
|
48336
|
+
version11 = -1;
|
|
48461
48337
|
}
|
|
48462
48338
|
} else {
|
|
48463
|
-
|
|
48339
|
+
version11 = -1;
|
|
48464
48340
|
}
|
|
48465
|
-
if (
|
|
48341
|
+
if (version11 >= 0 && bytes.length === 2 + length && length >= 1 && length <= 75) {
|
|
48466
48342
|
const words = import_bech32.default.toWords(bytes.slice(2));
|
|
48467
|
-
words.unshift(
|
|
48343
|
+
words.unshift(version11);
|
|
48468
48344
|
return import_bech32.default.encode(coinInfo.prefix, words);
|
|
48469
48345
|
}
|
|
48470
48346
|
}
|
|
@@ -48495,7 +48371,7 @@ class Resolver {
|
|
|
48495
48371
|
}
|
|
48496
48372
|
const address = this._getAddress(coinType, hexBytes);
|
|
48497
48373
|
if (address == null) {
|
|
48498
|
-
|
|
48374
|
+
logger9.throwError(`invalid or unsupported coin data`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48499
48375
|
operation: `getAddress(${coinType})`,
|
|
48500
48376
|
coinType,
|
|
48501
48377
|
data: hexBytes
|
|
@@ -48538,11 +48414,11 @@ class Resolver {
|
|
|
48538
48414
|
return null;
|
|
48539
48415
|
}
|
|
48540
48416
|
const addr = yield this.provider.formatter.address(comps[0]);
|
|
48541
|
-
const tokenId =
|
|
48417
|
+
const tokenId = import_bytes6.hexZeroPad(BigNumber.from(comps[1]).toHexString(), 32);
|
|
48542
48418
|
if (scheme === "erc721") {
|
|
48543
48419
|
const tokenOwner = this.provider.formatter.callAddress(yield this.provider.call({
|
|
48544
48420
|
to: addr,
|
|
48545
|
-
data:
|
|
48421
|
+
data: import_bytes6.hexConcat(["0x6352211e", tokenId])
|
|
48546
48422
|
}));
|
|
48547
48423
|
if (owner !== tokenOwner) {
|
|
48548
48424
|
return null;
|
|
@@ -48551,7 +48427,7 @@ class Resolver {
|
|
|
48551
48427
|
} else if (scheme === "erc1155") {
|
|
48552
48428
|
const balance = BigNumber.from(yield this.provider.call({
|
|
48553
48429
|
to: addr,
|
|
48554
|
-
data:
|
|
48430
|
+
data: import_bytes6.hexConcat(["0x00fdd58e", import_bytes6.hexZeroPad(owner, 32), tokenId])
|
|
48555
48431
|
}));
|
|
48556
48432
|
if (balance.isZero()) {
|
|
48557
48433
|
return null;
|
|
@@ -48560,7 +48436,7 @@ class Resolver {
|
|
|
48560
48436
|
}
|
|
48561
48437
|
const tx = {
|
|
48562
48438
|
to: this.provider.formatter.address(comps[0]),
|
|
48563
|
-
data:
|
|
48439
|
+
data: import_bytes6.hexConcat([selector, tokenId])
|
|
48564
48440
|
};
|
|
48565
48441
|
let metadataUrl = _parseString(yield this.provider.call(tx), 0);
|
|
48566
48442
|
if (metadataUrl == null) {
|
|
@@ -48635,7 +48511,7 @@ class Resolver {
|
|
|
48635
48511
|
return "sia://" + hash;
|
|
48636
48512
|
}
|
|
48637
48513
|
}
|
|
48638
|
-
return
|
|
48514
|
+
return logger9.throwError(`invalid or unsupported content hash data`, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48639
48515
|
operation: "getContentHash()",
|
|
48640
48516
|
data: hexBytes
|
|
48641
48517
|
});
|
|
@@ -48644,11 +48520,11 @@ class Resolver {
|
|
|
48644
48520
|
getText(key) {
|
|
48645
48521
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
48646
48522
|
let keyBytes = import_strings2.toUtf8Bytes(key);
|
|
48647
|
-
keyBytes =
|
|
48523
|
+
keyBytes = import_bytes6.concat([bytes32ify(64), bytes32ify(keyBytes.length), keyBytes]);
|
|
48648
48524
|
if (keyBytes.length % 32 !== 0) {
|
|
48649
|
-
keyBytes =
|
|
48525
|
+
keyBytes = import_bytes6.concat([keyBytes, import_bytes6.hexZeroPad("0x", 32 - key.length % 32)]);
|
|
48650
48526
|
}
|
|
48651
|
-
const hexBytes = yield this._fetchBytes("0x59d1d43c",
|
|
48527
|
+
const hexBytes = yield this._fetchBytes("0x59d1d43c", import_bytes6.hexlify(keyBytes));
|
|
48652
48528
|
if (hexBytes == null || hexBytes === "0x") {
|
|
48653
48529
|
return null;
|
|
48654
48530
|
}
|
|
@@ -48680,7 +48556,7 @@ class BaseProvider extends Provider {
|
|
|
48680
48556
|
import_properties6.defineReadOnly(this, "_network", knownNetwork);
|
|
48681
48557
|
this.emit("network", knownNetwork, null);
|
|
48682
48558
|
} else {
|
|
48683
|
-
|
|
48559
|
+
logger9.throwArgumentError("invalid network", "network", network);
|
|
48684
48560
|
}
|
|
48685
48561
|
}
|
|
48686
48562
|
this._maxInternalBlockNumber = -1024;
|
|
@@ -48702,7 +48578,7 @@ class BaseProvider extends Provider {
|
|
|
48702
48578
|
network = yield this.detectNetwork();
|
|
48703
48579
|
}
|
|
48704
48580
|
if (!network) {
|
|
48705
|
-
|
|
48581
|
+
logger9.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {});
|
|
48706
48582
|
}
|
|
48707
48583
|
if (this._network == null) {
|
|
48708
48584
|
if (this.anyNetwork) {
|
|
@@ -48758,11 +48634,11 @@ class BaseProvider extends Provider {
|
|
|
48758
48634
|
}
|
|
48759
48635
|
const errorMessage = result.message || "unknown error";
|
|
48760
48636
|
if (result.status >= 400 && result.status < 500) {
|
|
48761
|
-
return
|
|
48637
|
+
return logger9.throwError(`response not found during CCIP fetch: ${errorMessage}`, Logger.errors.SERVER_ERROR, { url, errorMessage });
|
|
48762
48638
|
}
|
|
48763
48639
|
errorMessages.push(errorMessage);
|
|
48764
48640
|
}
|
|
48765
|
-
return
|
|
48641
|
+
return logger9.throwError(`error encountered during CCIP fetch: ${errorMessages.map((m) => JSON.stringify(m)).join(", ")}`, Logger.errors.SERVER_ERROR, {
|
|
48766
48642
|
urls,
|
|
48767
48643
|
errorMessages
|
|
48768
48644
|
});
|
|
@@ -48837,8 +48713,8 @@ class BaseProvider extends Provider {
|
|
|
48837
48713
|
this._emitted.block = blockNumber - 1;
|
|
48838
48714
|
}
|
|
48839
48715
|
if (Math.abs(this._emitted.block - blockNumber) > 1000) {
|
|
48840
|
-
|
|
48841
|
-
this.emit("error",
|
|
48716
|
+
logger9.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${blockNumber})`);
|
|
48717
|
+
this.emit("error", logger9.makeError("network block skew detected", Logger.errors.NETWORK_ERROR, {
|
|
48842
48718
|
blockNumber,
|
|
48843
48719
|
event: "blockSkew",
|
|
48844
48720
|
previousBlockNumber: this._emitted.block
|
|
@@ -48943,7 +48819,7 @@ class BaseProvider extends Provider {
|
|
|
48943
48819
|
}
|
|
48944
48820
|
detectNetwork() {
|
|
48945
48821
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
48946
|
-
return
|
|
48822
|
+
return logger9.throwError("provider does not support network detection", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
48947
48823
|
operation: "provider.detectNetwork"
|
|
48948
48824
|
});
|
|
48949
48825
|
});
|
|
@@ -48966,7 +48842,7 @@ class BaseProvider extends Provider {
|
|
|
48966
48842
|
yield stall(0);
|
|
48967
48843
|
return this._network;
|
|
48968
48844
|
}
|
|
48969
|
-
const error =
|
|
48845
|
+
const error = logger9.makeError("underlying network changed", Logger.errors.NETWORK_ERROR, {
|
|
48970
48846
|
event: "changed",
|
|
48971
48847
|
network,
|
|
48972
48848
|
detectedNetwork: currentNetwork
|
|
@@ -49133,7 +49009,7 @@ class BaseProvider extends Provider {
|
|
|
49133
49009
|
} else if (tx.data === "0x" && tx.from === tx.to && tx.value.isZero()) {
|
|
49134
49010
|
reason = "cancelled";
|
|
49135
49011
|
}
|
|
49136
|
-
reject(
|
|
49012
|
+
reject(logger9.makeError("transaction was replaced", Logger.errors.TRANSACTION_REPLACED, {
|
|
49137
49013
|
cancelled: reason === "replaced" || reason === "cancelled",
|
|
49138
49014
|
reason,
|
|
49139
49015
|
replacement: this._wrapTransaction(tx),
|
|
@@ -49170,7 +49046,7 @@ class BaseProvider extends Provider {
|
|
|
49170
49046
|
if (alreadyDone()) {
|
|
49171
49047
|
return;
|
|
49172
49048
|
}
|
|
49173
|
-
reject(
|
|
49049
|
+
reject(logger9.makeError("timeout exceeded", Logger.errors.TIMEOUT, { timeout }));
|
|
49174
49050
|
}, timeout);
|
|
49175
49051
|
if (timer.unref) {
|
|
49176
49052
|
timer.unref();
|
|
@@ -49194,7 +49070,7 @@ class BaseProvider extends Provider {
|
|
|
49194
49070
|
try {
|
|
49195
49071
|
return BigNumber.from(result);
|
|
49196
49072
|
} catch (error) {
|
|
49197
|
-
return
|
|
49073
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49198
49074
|
method: "getGasPrice",
|
|
49199
49075
|
result,
|
|
49200
49076
|
error
|
|
@@ -49213,7 +49089,7 @@ class BaseProvider extends Provider {
|
|
|
49213
49089
|
try {
|
|
49214
49090
|
return BigNumber.from(result);
|
|
49215
49091
|
} catch (error) {
|
|
49216
|
-
return
|
|
49092
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49217
49093
|
method: "getBalance",
|
|
49218
49094
|
params,
|
|
49219
49095
|
result,
|
|
@@ -49233,7 +49109,7 @@ class BaseProvider extends Provider {
|
|
|
49233
49109
|
try {
|
|
49234
49110
|
return BigNumber.from(result).toNumber();
|
|
49235
49111
|
} catch (error) {
|
|
49236
|
-
return
|
|
49112
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49237
49113
|
method: "getTransactionCount",
|
|
49238
49114
|
params,
|
|
49239
49115
|
result,
|
|
@@ -49251,9 +49127,9 @@ class BaseProvider extends Provider {
|
|
|
49251
49127
|
});
|
|
49252
49128
|
const result = yield this.perform("getCode", params);
|
|
49253
49129
|
try {
|
|
49254
|
-
return
|
|
49130
|
+
return import_bytes6.hexlify(result);
|
|
49255
49131
|
} catch (error) {
|
|
49256
|
-
return
|
|
49132
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49257
49133
|
method: "getCode",
|
|
49258
49134
|
params,
|
|
49259
49135
|
result,
|
|
@@ -49268,13 +49144,13 @@ class BaseProvider extends Provider {
|
|
|
49268
49144
|
const params = yield import_properties6.resolveProperties({
|
|
49269
49145
|
address: this._getAddress(addressOrName),
|
|
49270
49146
|
blockTag: this._getBlockTag(blockTag),
|
|
49271
|
-
position: Promise.resolve(position).then((p) =>
|
|
49147
|
+
position: Promise.resolve(position).then((p) => import_bytes6.hexValue(p))
|
|
49272
49148
|
});
|
|
49273
49149
|
const result = yield this.perform("getStorageAt", params);
|
|
49274
49150
|
try {
|
|
49275
|
-
return
|
|
49151
|
+
return import_bytes6.hexlify(result);
|
|
49276
49152
|
} catch (error) {
|
|
49277
|
-
return
|
|
49153
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49278
49154
|
method: "getStorageAt",
|
|
49279
49155
|
params,
|
|
49280
49156
|
result,
|
|
@@ -49284,12 +49160,12 @@ class BaseProvider extends Provider {
|
|
|
49284
49160
|
});
|
|
49285
49161
|
}
|
|
49286
49162
|
_wrapTransaction(tx, hash, startBlock) {
|
|
49287
|
-
if (hash != null &&
|
|
49163
|
+
if (hash != null && import_bytes6.hexDataLength(hash) !== 32) {
|
|
49288
49164
|
throw new Error("invalid response - sendTransaction");
|
|
49289
49165
|
}
|
|
49290
49166
|
const result = tx;
|
|
49291
49167
|
if (hash != null && tx.hash !== hash) {
|
|
49292
|
-
|
|
49168
|
+
logger9.throwError("Transaction hash mismatch from Provider.sendTransaction.", Logger.errors.UNKNOWN_ERROR, { expectedHash: tx.hash, returnedHash: hash });
|
|
49293
49169
|
}
|
|
49294
49170
|
result.wait = (confirms, timeout) => __awaiter5(this, undefined, undefined, function* () {
|
|
49295
49171
|
if (confirms == null) {
|
|
@@ -49315,7 +49191,7 @@ class BaseProvider extends Provider {
|
|
|
49315
49191
|
}
|
|
49316
49192
|
this._emitted["t:" + tx.hash] = receipt.blockNumber;
|
|
49317
49193
|
if (receipt.status === 0) {
|
|
49318
|
-
|
|
49194
|
+
logger9.throwError("transaction failed", Logger.errors.CALL_EXCEPTION, {
|
|
49319
49195
|
transactionHash: tx.hash,
|
|
49320
49196
|
transaction: tx,
|
|
49321
49197
|
receipt
|
|
@@ -49328,7 +49204,7 @@ class BaseProvider extends Provider {
|
|
|
49328
49204
|
sendTransaction(signedTransaction) {
|
|
49329
49205
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49330
49206
|
yield this.getNetwork();
|
|
49331
|
-
const hexTx = yield Promise.resolve(signedTransaction).then((t) =>
|
|
49207
|
+
const hexTx = yield Promise.resolve(signedTransaction).then((t) => import_bytes6.hexlify(t));
|
|
49332
49208
|
const tx = this.formatter.transaction(signedTransaction);
|
|
49333
49209
|
if (tx.confirmations == null) {
|
|
49334
49210
|
tx.confirmations = 0;
|
|
@@ -49373,7 +49249,7 @@ class BaseProvider extends Provider {
|
|
|
49373
49249
|
if (values[key] == null) {
|
|
49374
49250
|
return;
|
|
49375
49251
|
}
|
|
49376
|
-
tx[key] = Promise.resolve(values[key]).then((v) => v ?
|
|
49252
|
+
tx[key] = Promise.resolve(values[key]).then((v) => v ? import_bytes6.hexlify(v) : null);
|
|
49377
49253
|
});
|
|
49378
49254
|
return this.formatter.transactionRequest(yield import_properties6.resolveProperties(tx));
|
|
49379
49255
|
});
|
|
@@ -49403,19 +49279,19 @@ class BaseProvider extends Provider {
|
|
|
49403
49279
|
_call(transaction, blockTag, attempt) {
|
|
49404
49280
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49405
49281
|
if (attempt >= MAX_CCIP_REDIRECTS) {
|
|
49406
|
-
|
|
49282
|
+
logger9.throwError("CCIP read exceeded maximum redirections", Logger.errors.SERVER_ERROR, {
|
|
49407
49283
|
redirects: attempt,
|
|
49408
49284
|
transaction
|
|
49409
49285
|
});
|
|
49410
49286
|
}
|
|
49411
49287
|
const txSender = transaction.to;
|
|
49412
49288
|
const result = yield this.perform("call", { transaction, blockTag });
|
|
49413
|
-
if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" &&
|
|
49289
|
+
if (attempt >= 0 && blockTag === "latest" && txSender != null && result.substring(0, 10) === "0x556f1830" && import_bytes6.hexDataLength(result) % 32 === 4) {
|
|
49414
49290
|
try {
|
|
49415
|
-
const data =
|
|
49416
|
-
const sender =
|
|
49291
|
+
const data = import_bytes6.hexDataSlice(result, 4);
|
|
49292
|
+
const sender = import_bytes6.hexDataSlice(data, 0, 32);
|
|
49417
49293
|
if (!BigNumber.from(sender).eq(txSender)) {
|
|
49418
|
-
|
|
49294
|
+
logger9.throwError("CCIP Read sender did not match", Logger.errors.CALL_EXCEPTION, {
|
|
49419
49295
|
name: "OffchainLookup",
|
|
49420
49296
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49421
49297
|
transaction,
|
|
@@ -49423,13 +49299,13 @@ class BaseProvider extends Provider {
|
|
|
49423
49299
|
});
|
|
49424
49300
|
}
|
|
49425
49301
|
const urls = [];
|
|
49426
|
-
const urlsOffset = BigNumber.from(
|
|
49427
|
-
const urlsLength = BigNumber.from(
|
|
49428
|
-
const urlsData =
|
|
49302
|
+
const urlsOffset = BigNumber.from(import_bytes6.hexDataSlice(data, 32, 64)).toNumber();
|
|
49303
|
+
const urlsLength = BigNumber.from(import_bytes6.hexDataSlice(data, urlsOffset, urlsOffset + 32)).toNumber();
|
|
49304
|
+
const urlsData = import_bytes6.hexDataSlice(data, urlsOffset + 32);
|
|
49429
49305
|
for (let u = 0;u < urlsLength; u++) {
|
|
49430
49306
|
const url = _parseString(urlsData, u * 32);
|
|
49431
49307
|
if (url == null) {
|
|
49432
|
-
|
|
49308
|
+
logger9.throwError("CCIP Read contained corrupt URL string", Logger.errors.CALL_EXCEPTION, {
|
|
49433
49309
|
name: "OffchainLookup",
|
|
49434
49310
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49435
49311
|
transaction,
|
|
@@ -49439,19 +49315,19 @@ class BaseProvider extends Provider {
|
|
|
49439
49315
|
urls.push(url);
|
|
49440
49316
|
}
|
|
49441
49317
|
const calldata = _parseBytes(data, 64);
|
|
49442
|
-
if (!BigNumber.from(
|
|
49443
|
-
|
|
49318
|
+
if (!BigNumber.from(import_bytes6.hexDataSlice(data, 100, 128)).isZero()) {
|
|
49319
|
+
logger9.throwError("CCIP Read callback selector included junk", Logger.errors.CALL_EXCEPTION, {
|
|
49444
49320
|
name: "OffchainLookup",
|
|
49445
49321
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49446
49322
|
transaction,
|
|
49447
49323
|
data: result
|
|
49448
49324
|
});
|
|
49449
49325
|
}
|
|
49450
|
-
const callbackSelector =
|
|
49326
|
+
const callbackSelector = import_bytes6.hexDataSlice(data, 96, 100);
|
|
49451
49327
|
const extraData = _parseBytes(data, 128);
|
|
49452
49328
|
const ccipResult = yield this.ccipReadFetch(transaction, calldata, urls);
|
|
49453
49329
|
if (ccipResult == null) {
|
|
49454
|
-
|
|
49330
|
+
logger9.throwError("CCIP Read disabled or provided no URLs", Logger.errors.CALL_EXCEPTION, {
|
|
49455
49331
|
name: "OffchainLookup",
|
|
49456
49332
|
signature: "OffchainLookup(address,string[],bytes,bytes4,bytes)",
|
|
49457
49333
|
transaction,
|
|
@@ -49460,7 +49336,7 @@ class BaseProvider extends Provider {
|
|
|
49460
49336
|
}
|
|
49461
49337
|
const tx = {
|
|
49462
49338
|
to: txSender,
|
|
49463
|
-
data:
|
|
49339
|
+
data: import_bytes6.hexConcat([callbackSelector, encodeBytes([ccipResult, extraData])])
|
|
49464
49340
|
};
|
|
49465
49341
|
return this._call(tx, blockTag, attempt + 1);
|
|
49466
49342
|
} catch (error) {
|
|
@@ -49470,9 +49346,9 @@ class BaseProvider extends Provider {
|
|
|
49470
49346
|
}
|
|
49471
49347
|
}
|
|
49472
49348
|
try {
|
|
49473
|
-
return
|
|
49349
|
+
return import_bytes6.hexlify(result);
|
|
49474
49350
|
} catch (error) {
|
|
49475
|
-
return
|
|
49351
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49476
49352
|
method: "call",
|
|
49477
49353
|
params: { transaction, blockTag },
|
|
49478
49354
|
result,
|
|
@@ -49502,7 +49378,7 @@ class BaseProvider extends Provider {
|
|
|
49502
49378
|
try {
|
|
49503
49379
|
return BigNumber.from(result);
|
|
49504
49380
|
} catch (error) {
|
|
49505
|
-
return
|
|
49381
|
+
return logger9.throwError("bad result from backend", Logger.errors.SERVER_ERROR, {
|
|
49506
49382
|
method: "estimateGas",
|
|
49507
49383
|
params,
|
|
49508
49384
|
result,
|
|
@@ -49515,11 +49391,11 @@ class BaseProvider extends Provider {
|
|
|
49515
49391
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49516
49392
|
addressOrName = yield addressOrName;
|
|
49517
49393
|
if (typeof addressOrName !== "string") {
|
|
49518
|
-
|
|
49394
|
+
logger9.throwArgumentError("invalid address or ENS name", "name", addressOrName);
|
|
49519
49395
|
}
|
|
49520
49396
|
const address = yield this.resolveName(addressOrName);
|
|
49521
49397
|
if (address == null) {
|
|
49522
|
-
|
|
49398
|
+
logger9.throwError("ENS name not configured", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
49523
49399
|
operation: `resolveName(${JSON.stringify(addressOrName)})`
|
|
49524
49400
|
});
|
|
49525
49401
|
}
|
|
@@ -49534,16 +49410,16 @@ class BaseProvider extends Provider {
|
|
|
49534
49410
|
const params = {
|
|
49535
49411
|
includeTransactions: !!includeTransactions
|
|
49536
49412
|
};
|
|
49537
|
-
if (
|
|
49413
|
+
if (import_bytes6.isHexString(blockHashOrBlockTag, 32)) {
|
|
49538
49414
|
params.blockHash = blockHashOrBlockTag;
|
|
49539
49415
|
} else {
|
|
49540
49416
|
try {
|
|
49541
49417
|
params.blockTag = yield this._getBlockTag(blockHashOrBlockTag);
|
|
49542
|
-
if (
|
|
49418
|
+
if (import_bytes6.isHexString(params.blockTag)) {
|
|
49543
49419
|
blockNumber = parseInt(params.blockTag.substring(2), 16);
|
|
49544
49420
|
}
|
|
49545
49421
|
} catch (error) {
|
|
49546
|
-
|
|
49422
|
+
logger9.throwArgumentError("invalid block hash or block tag", "blockHashOrBlockTag", blockHashOrBlockTag);
|
|
49547
49423
|
}
|
|
49548
49424
|
}
|
|
49549
49425
|
return import_web.poll(() => __awaiter5(this, undefined, undefined, function* () {
|
|
@@ -49675,7 +49551,7 @@ class BaseProvider extends Provider {
|
|
|
49675
49551
|
blockTag = yield blockTag;
|
|
49676
49552
|
if (typeof blockTag === "number" && blockTag < 0) {
|
|
49677
49553
|
if (blockTag % 1) {
|
|
49678
|
-
|
|
49554
|
+
logger9.throwArgumentError("invalid BlockTag", "blockTag", blockTag);
|
|
49679
49555
|
}
|
|
49680
49556
|
let blockNumber = yield this._getInternalBlockNumber(100 + 2 * this.pollingInterval);
|
|
49681
49557
|
blockNumber += blockTag;
|
|
@@ -49716,7 +49592,7 @@ class BaseProvider extends Provider {
|
|
|
49716
49592
|
}
|
|
49717
49593
|
const network = yield this.getNetwork();
|
|
49718
49594
|
if (!network.ensAddress) {
|
|
49719
|
-
|
|
49595
|
+
logger9.throwError("network does not support ENS", Logger.errors.UNSUPPORTED_OPERATION, { operation, network: network.name });
|
|
49720
49596
|
}
|
|
49721
49597
|
try {
|
|
49722
49598
|
const addrData = yield this.call({
|
|
@@ -49734,12 +49610,12 @@ class BaseProvider extends Provider {
|
|
|
49734
49610
|
try {
|
|
49735
49611
|
return Promise.resolve(this.formatter.address(name));
|
|
49736
49612
|
} catch (error) {
|
|
49737
|
-
if (
|
|
49613
|
+
if (import_bytes6.isHexString(name)) {
|
|
49738
49614
|
throw error;
|
|
49739
49615
|
}
|
|
49740
49616
|
}
|
|
49741
49617
|
if (typeof name !== "string") {
|
|
49742
|
-
|
|
49618
|
+
logger9.throwArgumentError("invalid ENS name", "name", name);
|
|
49743
49619
|
}
|
|
49744
49620
|
const resolver = yield this.getResolver(name);
|
|
49745
49621
|
if (!resolver) {
|
|
@@ -49771,7 +49647,7 @@ class BaseProvider extends Provider {
|
|
|
49771
49647
|
getAvatar(nameOrAddress) {
|
|
49772
49648
|
return __awaiter5(this, undefined, undefined, function* () {
|
|
49773
49649
|
let resolver = null;
|
|
49774
|
-
if (
|
|
49650
|
+
if (import_bytes6.isHexString(nameOrAddress)) {
|
|
49775
49651
|
const address = this.formatter.address(nameOrAddress);
|
|
49776
49652
|
const node = address.substring(2).toLowerCase() + ".addr.reverse";
|
|
49777
49653
|
const resolverAddress = yield this._getResolver(node, "getAvatar");
|
|
@@ -49815,7 +49691,7 @@ class BaseProvider extends Provider {
|
|
|
49815
49691
|
});
|
|
49816
49692
|
}
|
|
49817
49693
|
perform(method, params) {
|
|
49818
|
-
return
|
|
49694
|
+
return logger9.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method });
|
|
49819
49695
|
}
|
|
49820
49696
|
_startEvent(event) {
|
|
49821
49697
|
this.polling = this._events.filter((e) => e.pollable()).length > 0;
|
|
@@ -49926,7 +49802,7 @@ var import_properties10 = __toESM(require_lib4());
|
|
|
49926
49802
|
var import_properties8 = __toESM(require_lib4());
|
|
49927
49803
|
|
|
49928
49804
|
// node_modules/@ethersproject/providers/lib.esm/json-rpc-provider.js
|
|
49929
|
-
var
|
|
49805
|
+
var import_bytes7 = __toESM(require_lib2());
|
|
49930
49806
|
var import_hash3 = __toESM(require_lib12());
|
|
49931
49807
|
var import_properties7 = __toESM(require_lib4());
|
|
49932
49808
|
var import_strings3 = __toESM(require_lib9());
|
|
@@ -49959,14 +49835,14 @@ var __awaiter6 = function(thisArg, _arguments, P, generator) {
|
|
|
49959
49835
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
49960
49836
|
});
|
|
49961
49837
|
};
|
|
49962
|
-
var
|
|
49838
|
+
var logger10 = new Logger(version10);
|
|
49963
49839
|
var errorGas = ["call", "estimateGas"];
|
|
49964
49840
|
function spelunk(value, requireData) {
|
|
49965
49841
|
if (value == null) {
|
|
49966
49842
|
return null;
|
|
49967
49843
|
}
|
|
49968
49844
|
if (typeof value.message === "string" && value.message.match("reverted")) {
|
|
49969
|
-
const data =
|
|
49845
|
+
const data = import_bytes7.isHexString(value.data) ? value.data : null;
|
|
49970
49846
|
if (!requireData || data) {
|
|
49971
49847
|
return { message: value.message, data };
|
|
49972
49848
|
}
|
|
@@ -49994,7 +49870,7 @@ function checkError(method, error, params) {
|
|
|
49994
49870
|
if (result) {
|
|
49995
49871
|
return result.data;
|
|
49996
49872
|
}
|
|
49997
|
-
|
|
49873
|
+
logger10.throwError("missing revert data in call exception; Transaction reverted without a reason string", Logger.errors.CALL_EXCEPTION, {
|
|
49998
49874
|
data: "0x",
|
|
49999
49875
|
transaction,
|
|
50000
49876
|
error
|
|
@@ -50006,7 +49882,7 @@ function checkError(method, error, params) {
|
|
|
50006
49882
|
result = spelunk(error, false);
|
|
50007
49883
|
}
|
|
50008
49884
|
if (result) {
|
|
50009
|
-
|
|
49885
|
+
logger10.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
50010
49886
|
reason: result.message,
|
|
50011
49887
|
method,
|
|
50012
49888
|
transaction,
|
|
@@ -50024,35 +49900,35 @@ function checkError(method, error, params) {
|
|
|
50024
49900
|
}
|
|
50025
49901
|
message = (message || "").toLowerCase();
|
|
50026
49902
|
if (message.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)) {
|
|
50027
|
-
|
|
49903
|
+
logger10.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
|
50028
49904
|
error,
|
|
50029
49905
|
method,
|
|
50030
49906
|
transaction
|
|
50031
49907
|
});
|
|
50032
49908
|
}
|
|
50033
49909
|
if (message.match(/nonce (is )?too low/i)) {
|
|
50034
|
-
|
|
49910
|
+
logger10.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
|
50035
49911
|
error,
|
|
50036
49912
|
method,
|
|
50037
49913
|
transaction
|
|
50038
49914
|
});
|
|
50039
49915
|
}
|
|
50040
49916
|
if (message.match(/replacement transaction underpriced|transaction gas price.*too low/i)) {
|
|
50041
|
-
|
|
49917
|
+
logger10.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
|
50042
49918
|
error,
|
|
50043
49919
|
method,
|
|
50044
49920
|
transaction
|
|
50045
49921
|
});
|
|
50046
49922
|
}
|
|
50047
49923
|
if (message.match(/only replay-protected/i)) {
|
|
50048
|
-
|
|
49924
|
+
logger10.throwError("legacy pre-eip-155 transactions not supported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50049
49925
|
error,
|
|
50050
49926
|
method,
|
|
50051
49927
|
transaction
|
|
50052
49928
|
});
|
|
50053
49929
|
}
|
|
50054
49930
|
if (errorGas.indexOf(method) >= 0 && message.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)) {
|
|
50055
|
-
|
|
49931
|
+
logger10.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
50056
49932
|
error,
|
|
50057
49933
|
method,
|
|
50058
49934
|
transaction
|
|
@@ -50099,11 +49975,11 @@ class JsonRpcSigner extends Signer {
|
|
|
50099
49975
|
import_properties7.defineReadOnly(this, "_index", addressOrIndex);
|
|
50100
49976
|
import_properties7.defineReadOnly(this, "_address", null);
|
|
50101
49977
|
} else {
|
|
50102
|
-
|
|
49978
|
+
logger10.throwArgumentError("invalid address or index", "addressOrIndex", addressOrIndex);
|
|
50103
49979
|
}
|
|
50104
49980
|
}
|
|
50105
49981
|
connect(provider) {
|
|
50106
|
-
return
|
|
49982
|
+
return logger10.throwError("cannot alter JSON-RPC Signer connection", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50107
49983
|
operation: "connect"
|
|
50108
49984
|
});
|
|
50109
49985
|
}
|
|
@@ -50116,7 +49992,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50116
49992
|
}
|
|
50117
49993
|
return this.provider.send("eth_accounts", []).then((accounts) => {
|
|
50118
49994
|
if (accounts.length <= this._index) {
|
|
50119
|
-
|
|
49995
|
+
logger10.throwError("unknown account #" + this._index, Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50120
49996
|
operation: "getAddress"
|
|
50121
49997
|
});
|
|
50122
49998
|
}
|
|
@@ -50143,7 +50019,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50143
50019
|
}
|
|
50144
50020
|
const address = yield this.provider.resolveName(to);
|
|
50145
50021
|
if (address == null) {
|
|
50146
|
-
|
|
50022
|
+
logger10.throwArgumentError("provided ENS name resolves to null", "tx.to", to);
|
|
50147
50023
|
}
|
|
50148
50024
|
return address;
|
|
50149
50025
|
}));
|
|
@@ -50154,7 +50030,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50154
50030
|
}).then(({ tx, sender }) => {
|
|
50155
50031
|
if (tx.from != null) {
|
|
50156
50032
|
if (tx.from.toLowerCase() !== sender) {
|
|
50157
|
-
|
|
50033
|
+
logger10.throwArgumentError("from address mismatch", "transaction", transaction);
|
|
50158
50034
|
}
|
|
50159
50035
|
} else {
|
|
50160
50036
|
tx.from = sender;
|
|
@@ -50164,7 +50040,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50164
50040
|
return hash;
|
|
50165
50041
|
}, (error) => {
|
|
50166
50042
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50167
|
-
|
|
50043
|
+
logger10.throwError("user rejected transaction", Logger.errors.ACTION_REJECTED, {
|
|
50168
50044
|
action: "sendTransaction",
|
|
50169
50045
|
transaction: tx
|
|
50170
50046
|
});
|
|
@@ -50174,7 +50050,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50174
50050
|
});
|
|
50175
50051
|
}
|
|
50176
50052
|
signTransaction(transaction) {
|
|
50177
|
-
return
|
|
50053
|
+
return logger10.throwError("signing transactions is unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50178
50054
|
operation: "signTransaction"
|
|
50179
50055
|
});
|
|
50180
50056
|
}
|
|
@@ -50201,10 +50077,10 @@ class JsonRpcSigner extends Signer {
|
|
|
50201
50077
|
const data = typeof message === "string" ? import_strings3.toUtf8Bytes(message) : message;
|
|
50202
50078
|
const address = yield this.getAddress();
|
|
50203
50079
|
try {
|
|
50204
|
-
return yield this.provider.send("personal_sign", [
|
|
50080
|
+
return yield this.provider.send("personal_sign", [import_bytes7.hexlify(data), address.toLowerCase()]);
|
|
50205
50081
|
} catch (error) {
|
|
50206
50082
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50207
|
-
|
|
50083
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50208
50084
|
action: "signMessage",
|
|
50209
50085
|
from: address,
|
|
50210
50086
|
messageData: message
|
|
@@ -50219,10 +50095,10 @@ class JsonRpcSigner extends Signer {
|
|
|
50219
50095
|
const data = typeof message === "string" ? import_strings3.toUtf8Bytes(message) : message;
|
|
50220
50096
|
const address = yield this.getAddress();
|
|
50221
50097
|
try {
|
|
50222
|
-
return yield this.provider.send("eth_sign", [address.toLowerCase(),
|
|
50098
|
+
return yield this.provider.send("eth_sign", [address.toLowerCase(), import_bytes7.hexlify(data)]);
|
|
50223
50099
|
} catch (error) {
|
|
50224
50100
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50225
|
-
|
|
50101
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50226
50102
|
action: "_legacySignMessage",
|
|
50227
50103
|
from: address,
|
|
50228
50104
|
messageData: message
|
|
@@ -50245,7 +50121,7 @@ class JsonRpcSigner extends Signer {
|
|
|
50245
50121
|
]);
|
|
50246
50122
|
} catch (error) {
|
|
50247
50123
|
if (typeof error.message === "string" && error.message.match(/user denied/i)) {
|
|
50248
|
-
|
|
50124
|
+
logger10.throwError("user rejected signing", Logger.errors.ACTION_REJECTED, {
|
|
50249
50125
|
action: "_signTypedData",
|
|
50250
50126
|
from: address,
|
|
50251
50127
|
messageData: { domain: populated.domain, types: types2, value: populated.value }
|
|
@@ -50359,14 +50235,14 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50359
50235
|
try {
|
|
50360
50236
|
return getNetwork2(BigNumber.from(chainId).toNumber());
|
|
50361
50237
|
} catch (error) {
|
|
50362
|
-
return
|
|
50238
|
+
return logger10.throwError("could not detect network", Logger.errors.NETWORK_ERROR, {
|
|
50363
50239
|
chainId,
|
|
50364
50240
|
event: "invalidNetwork",
|
|
50365
50241
|
serverError: error
|
|
50366
50242
|
});
|
|
50367
50243
|
}
|
|
50368
50244
|
}
|
|
50369
|
-
return
|
|
50245
|
+
return logger10.throwError("could not detect network", Logger.errors.NETWORK_ERROR, {
|
|
50370
50246
|
event: "noNetwork"
|
|
50371
50247
|
});
|
|
50372
50248
|
});
|
|
@@ -50436,7 +50312,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50436
50312
|
case "getCode":
|
|
50437
50313
|
return ["eth_getCode", [getLowerCase(params.address), params.blockTag]];
|
|
50438
50314
|
case "getStorageAt":
|
|
50439
|
-
return ["eth_getStorageAt", [getLowerCase(params.address),
|
|
50315
|
+
return ["eth_getStorageAt", [getLowerCase(params.address), import_bytes7.hexZeroPad(params.position, 32), params.blockTag]];
|
|
50440
50316
|
case "sendTransaction":
|
|
50441
50317
|
return ["eth_sendRawTransaction", [params.signedTransaction]];
|
|
50442
50318
|
case "getBlock":
|
|
@@ -50485,7 +50361,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50485
50361
|
}
|
|
50486
50362
|
const args = this.prepareRequest(method, params);
|
|
50487
50363
|
if (args == null) {
|
|
50488
|
-
|
|
50364
|
+
logger10.throwError(method + " not implemented", Logger.errors.NOT_IMPLEMENTED, { operation: method });
|
|
50489
50365
|
}
|
|
50490
50366
|
try {
|
|
50491
50367
|
return yield this.send(args[0], args[1]);
|
|
@@ -50562,7 +50438,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50562
50438
|
if (transaction[key] == null) {
|
|
50563
50439
|
return;
|
|
50564
50440
|
}
|
|
50565
|
-
const value =
|
|
50441
|
+
const value = import_bytes7.hexValue(BigNumber.from(transaction[key]));
|
|
50566
50442
|
if (key === "gasLimit") {
|
|
50567
50443
|
key = "gas";
|
|
50568
50444
|
}
|
|
@@ -50572,7 +50448,7 @@ class JsonRpcProvider extends BaseProvider {
|
|
|
50572
50448
|
if (transaction[key] == null) {
|
|
50573
50449
|
return;
|
|
50574
50450
|
}
|
|
50575
|
-
result[key] =
|
|
50451
|
+
result[key] = import_bytes7.hexlify(transaction[key]);
|
|
50576
50452
|
});
|
|
50577
50453
|
if (transaction.accessList) {
|
|
50578
50454
|
result["accessList"] = import_transactions4.accessListify(transaction.accessList);
|
|
@@ -50589,9 +50465,9 @@ try {
|
|
|
50589
50465
|
throw new Error("inject please");
|
|
50590
50466
|
}
|
|
50591
50467
|
} catch (error) {
|
|
50592
|
-
const
|
|
50468
|
+
const logger11 = new Logger(version10);
|
|
50593
50469
|
WS = function() {
|
|
50594
|
-
|
|
50470
|
+
logger11.throwError("WebSockets not supported in this environment", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50595
50471
|
operation: "new WebSocket()"
|
|
50596
50472
|
});
|
|
50597
50473
|
};
|
|
@@ -50625,13 +50501,13 @@ var __awaiter7 = function(thisArg, _arguments, P, generator) {
|
|
|
50625
50501
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50626
50502
|
});
|
|
50627
50503
|
};
|
|
50628
|
-
var
|
|
50504
|
+
var logger11 = new Logger(version10);
|
|
50629
50505
|
var NextId = 1;
|
|
50630
50506
|
|
|
50631
50507
|
class WebSocketProvider extends JsonRpcProvider {
|
|
50632
50508
|
constructor(url, network) {
|
|
50633
50509
|
if (network === "any") {
|
|
50634
|
-
|
|
50510
|
+
logger11.throwError("WebSocketProvider does not support 'any' network yet", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50635
50511
|
operation: "network:any"
|
|
50636
50512
|
});
|
|
50637
50513
|
}
|
|
@@ -50715,12 +50591,12 @@ class WebSocketProvider extends JsonRpcProvider {
|
|
|
50715
50591
|
return 0;
|
|
50716
50592
|
}
|
|
50717
50593
|
resetEventsBlock(blockNumber) {
|
|
50718
|
-
|
|
50594
|
+
logger11.throwError("cannot reset events block on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50719
50595
|
operation: "resetEventBlock"
|
|
50720
50596
|
});
|
|
50721
50597
|
}
|
|
50722
50598
|
set pollingInterval(value) {
|
|
50723
|
-
|
|
50599
|
+
logger11.throwError("cannot set polling interval on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50724
50600
|
operation: "setPollingInterval"
|
|
50725
50601
|
});
|
|
50726
50602
|
}
|
|
@@ -50733,7 +50609,7 @@ class WebSocketProvider extends JsonRpcProvider {
|
|
|
50733
50609
|
if (!value) {
|
|
50734
50610
|
return;
|
|
50735
50611
|
}
|
|
50736
|
-
|
|
50612
|
+
logger11.throwError("cannot set polling on WebSocketProvider", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
50737
50613
|
operation: "setPolling"
|
|
50738
50614
|
});
|
|
50739
50615
|
}
|
|
@@ -50897,7 +50773,7 @@ var __awaiter8 = function(thisArg, _arguments, P, generator) {
|
|
|
50897
50773
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
50898
50774
|
});
|
|
50899
50775
|
};
|
|
50900
|
-
var
|
|
50776
|
+
var logger12 = new Logger(version10);
|
|
50901
50777
|
|
|
50902
50778
|
class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
50903
50779
|
detectNetwork() {
|
|
@@ -50909,7 +50785,7 @@ class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
|
50909
50785
|
if (network == null) {
|
|
50910
50786
|
network = yield _super.detectNetwork.call(this);
|
|
50911
50787
|
if (!network) {
|
|
50912
|
-
|
|
50788
|
+
logger12.throwError("no network detected", Logger.errors.UNKNOWN_ERROR, {});
|
|
50913
50789
|
}
|
|
50914
50790
|
if (this._network == null) {
|
|
50915
50791
|
import_properties9.defineReadOnly(this, "_network", network);
|
|
@@ -50923,7 +50799,7 @@ class StaticJsonRpcProvider extends JsonRpcProvider {
|
|
|
50923
50799
|
|
|
50924
50800
|
class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
50925
50801
|
constructor(network, apiKey) {
|
|
50926
|
-
|
|
50802
|
+
logger12.checkAbstract(new.target, UrlJsonRpcProvider);
|
|
50927
50803
|
network = import_properties9.getStatic(new.target, "getNetwork")(network);
|
|
50928
50804
|
apiKey = import_properties9.getStatic(new.target, "getApiKey")(apiKey);
|
|
50929
50805
|
const connection = import_properties9.getStatic(new.target, "getUrl")(network, apiKey);
|
|
@@ -50937,13 +50813,13 @@ class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
|
50937
50813
|
}
|
|
50938
50814
|
}
|
|
50939
50815
|
_startPending() {
|
|
50940
|
-
|
|
50816
|
+
logger12.warn("WARNING: API provider does not support pending filters");
|
|
50941
50817
|
}
|
|
50942
50818
|
isCommunityResource() {
|
|
50943
50819
|
return false;
|
|
50944
50820
|
}
|
|
50945
50821
|
getSigner(address) {
|
|
50946
|
-
return
|
|
50822
|
+
return logger12.throwError("API provider does not support signing", Logger.errors.UNSUPPORTED_OPERATION, { operation: "getSigner" });
|
|
50947
50823
|
}
|
|
50948
50824
|
listAccounts() {
|
|
50949
50825
|
return Promise.resolve([]);
|
|
@@ -50952,14 +50828,14 @@ class UrlJsonRpcProvider extends StaticJsonRpcProvider {
|
|
|
50952
50828
|
return apiKey;
|
|
50953
50829
|
}
|
|
50954
50830
|
static getUrl(network, apiKey) {
|
|
50955
|
-
return
|
|
50831
|
+
return logger12.throwError("not implemented; sub-classes must override getUrl", Logger.errors.NOT_IMPLEMENTED, {
|
|
50956
50832
|
operation: "getUrl"
|
|
50957
50833
|
});
|
|
50958
50834
|
}
|
|
50959
50835
|
}
|
|
50960
50836
|
|
|
50961
50837
|
// node_modules/@ethersproject/providers/lib.esm/alchemy-provider.js
|
|
50962
|
-
var
|
|
50838
|
+
var logger13 = new Logger(version10);
|
|
50963
50839
|
var defaultApiKey = "_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";
|
|
50964
50840
|
|
|
50965
50841
|
class AlchemyWebSocketProvider extends WebSocketProvider {
|
|
@@ -50983,7 +50859,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
50983
50859
|
return defaultApiKey;
|
|
50984
50860
|
}
|
|
50985
50861
|
if (apiKey && typeof apiKey !== "string") {
|
|
50986
|
-
|
|
50862
|
+
logger13.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
|
50987
50863
|
}
|
|
50988
50864
|
return apiKey;
|
|
50989
50865
|
}
|
|
@@ -51015,7 +50891,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
51015
50891
|
host = "opt-goerli.g.alchemy.com/v2/";
|
|
51016
50892
|
break;
|
|
51017
50893
|
default:
|
|
51018
|
-
|
|
50894
|
+
logger13.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
51019
50895
|
}
|
|
51020
50896
|
return {
|
|
51021
50897
|
allowGzip: true,
|
|
@@ -51034,7 +50910,7 @@ class AlchemyProvider extends UrlJsonRpcProvider {
|
|
|
51034
50910
|
}
|
|
51035
50911
|
|
|
51036
50912
|
// node_modules/@ethersproject/providers/lib.esm/ankr-provider.js
|
|
51037
|
-
var
|
|
50913
|
+
var logger14 = new Logger(version10);
|
|
51038
50914
|
var defaultApiKey2 = "9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";
|
|
51039
50915
|
function getHost(name) {
|
|
51040
50916
|
switch (name) {
|
|
@@ -51051,7 +50927,7 @@ function getHost(name) {
|
|
|
51051
50927
|
case "arbitrum":
|
|
51052
50928
|
return "rpc.ankr.com/arbitrum/";
|
|
51053
50929
|
}
|
|
51054
|
-
return
|
|
50930
|
+
return logger14.throwArgumentError("unsupported network", "name", name);
|
|
51055
50931
|
}
|
|
51056
50932
|
|
|
51057
50933
|
class AnkrProvider extends UrlJsonRpcProvider {
|
|
@@ -51114,12 +50990,12 @@ var __awaiter9 = function(thisArg, _arguments, P, generator) {
|
|
|
51114
50990
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51115
50991
|
});
|
|
51116
50992
|
};
|
|
51117
|
-
var
|
|
50993
|
+
var logger15 = new Logger(version10);
|
|
51118
50994
|
|
|
51119
50995
|
class CloudflareProvider extends UrlJsonRpcProvider {
|
|
51120
50996
|
static getApiKey(apiKey) {
|
|
51121
50997
|
if (apiKey != null) {
|
|
51122
|
-
|
|
50998
|
+
logger15.throwArgumentError("apiKey not supported for cloudflare", "apiKey", apiKey);
|
|
51123
50999
|
}
|
|
51124
51000
|
return null;
|
|
51125
51001
|
}
|
|
@@ -51130,7 +51006,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
|
|
|
51130
51006
|
host = "https://cloudflare-eth.com/";
|
|
51131
51007
|
break;
|
|
51132
51008
|
default:
|
|
51133
|
-
|
|
51009
|
+
logger15.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
51134
51010
|
}
|
|
51135
51011
|
return host;
|
|
51136
51012
|
}
|
|
@@ -51149,7 +51025,7 @@ class CloudflareProvider extends UrlJsonRpcProvider {
|
|
|
51149
51025
|
}
|
|
51150
51026
|
|
|
51151
51027
|
// node_modules/@ethersproject/providers/lib.esm/etherscan-provider.js
|
|
51152
|
-
var
|
|
51028
|
+
var import_bytes8 = __toESM(require_lib2());
|
|
51153
51029
|
var import_properties11 = __toESM(require_lib4());
|
|
51154
51030
|
var import_transactions5 = __toESM(require_lib15());
|
|
51155
51031
|
var import_web3 = __toESM(require_lib23());
|
|
@@ -51180,7 +51056,7 @@ var __awaiter10 = function(thisArg, _arguments, P, generator) {
|
|
|
51180
51056
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51181
51057
|
});
|
|
51182
51058
|
};
|
|
51183
|
-
var
|
|
51059
|
+
var logger16 = new Logger(version10);
|
|
51184
51060
|
function getTransactionPostData(transaction) {
|
|
51185
51061
|
const result = {};
|
|
51186
51062
|
for (let key in transaction) {
|
|
@@ -51192,13 +51068,13 @@ function getTransactionPostData(transaction) {
|
|
|
51192
51068
|
continue;
|
|
51193
51069
|
}
|
|
51194
51070
|
if ({ type: true, gasLimit: true, gasPrice: true, maxFeePerGs: true, maxPriorityFeePerGas: true, nonce: true, value: true }[key]) {
|
|
51195
|
-
value =
|
|
51071
|
+
value = import_bytes8.hexValue(import_bytes8.hexlify(value));
|
|
51196
51072
|
} else if (key === "accessList") {
|
|
51197
51073
|
value = "[" + import_transactions5.accessListify(value).map((set) => {
|
|
51198
51074
|
return `{address:"${set.address}",storageKeys:["${set.storageKeys.join('","')}"]}`;
|
|
51199
51075
|
}).join(",") + "]";
|
|
51200
51076
|
} else {
|
|
51201
|
-
value =
|
|
51077
|
+
value = import_bytes8.hexlify(value);
|
|
51202
51078
|
}
|
|
51203
51079
|
result[key] = value;
|
|
51204
51080
|
}
|
|
@@ -51259,10 +51135,10 @@ function checkError2(method, error, transaction) {
|
|
|
51259
51135
|
if (data) {
|
|
51260
51136
|
data = "0x" + data.replace(/^.*0x/i, "");
|
|
51261
51137
|
}
|
|
51262
|
-
if (
|
|
51138
|
+
if (import_bytes8.isHexString(data)) {
|
|
51263
51139
|
return data;
|
|
51264
51140
|
}
|
|
51265
|
-
|
|
51141
|
+
logger16.throwError("missing revert data in call exception", Logger.errors.CALL_EXCEPTION, {
|
|
51266
51142
|
error,
|
|
51267
51143
|
data: "0x"
|
|
51268
51144
|
});
|
|
@@ -51280,28 +51156,28 @@ function checkError2(method, error, transaction) {
|
|
|
51280
51156
|
}
|
|
51281
51157
|
message = (message || "").toLowerCase();
|
|
51282
51158
|
if (message.match(/insufficient funds/)) {
|
|
51283
|
-
|
|
51159
|
+
logger16.throwError("insufficient funds for intrinsic transaction cost", Logger.errors.INSUFFICIENT_FUNDS, {
|
|
51284
51160
|
error,
|
|
51285
51161
|
method,
|
|
51286
51162
|
transaction
|
|
51287
51163
|
});
|
|
51288
51164
|
}
|
|
51289
51165
|
if (message.match(/same hash was already imported|transaction nonce is too low|nonce too low/)) {
|
|
51290
|
-
|
|
51166
|
+
logger16.throwError("nonce has already been used", Logger.errors.NONCE_EXPIRED, {
|
|
51291
51167
|
error,
|
|
51292
51168
|
method,
|
|
51293
51169
|
transaction
|
|
51294
51170
|
});
|
|
51295
51171
|
}
|
|
51296
51172
|
if (message.match(/another transaction with same nonce/)) {
|
|
51297
|
-
|
|
51173
|
+
logger16.throwError("replacement fee too low", Logger.errors.REPLACEMENT_UNDERPRICED, {
|
|
51298
51174
|
error,
|
|
51299
51175
|
method,
|
|
51300
51176
|
transaction
|
|
51301
51177
|
});
|
|
51302
51178
|
}
|
|
51303
51179
|
if (message.match(/execution failed due to an exception|execution reverted/)) {
|
|
51304
|
-
|
|
51180
|
+
logger16.throwError("cannot estimate gas; transaction may fail or may require manual gas limit", Logger.errors.UNPREDICTABLE_GAS_LIMIT, {
|
|
51305
51181
|
error,
|
|
51306
51182
|
method,
|
|
51307
51183
|
transaction
|
|
@@ -51338,7 +51214,7 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51338
51214
|
return "https://api-goerli-optimistic.etherscan.io";
|
|
51339
51215
|
default:
|
|
51340
51216
|
}
|
|
51341
|
-
return
|
|
51217
|
+
return logger16.throwArgumentError("unsupported network", "network", this.network.name);
|
|
51342
51218
|
}
|
|
51343
51219
|
getUrl(module2, params) {
|
|
51344
51220
|
const query = Object.keys(params).reduce((accum, key) => {
|
|
@@ -51498,12 +51374,12 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51498
51374
|
}
|
|
51499
51375
|
if (params.filter.topics && params.filter.topics.length > 0) {
|
|
51500
51376
|
if (params.filter.topics.length > 1) {
|
|
51501
|
-
|
|
51377
|
+
logger16.throwError("unsupported topic count", Logger.errors.UNSUPPORTED_OPERATION, { topics: params.filter.topics });
|
|
51502
51378
|
}
|
|
51503
51379
|
if (params.filter.topics.length === 1) {
|
|
51504
51380
|
const topic0 = params.filter.topics[0];
|
|
51505
51381
|
if (typeof topic0 !== "string" || topic0.length !== 66) {
|
|
51506
|
-
|
|
51382
|
+
logger16.throwError("unsupported topic format", Logger.errors.UNSUPPORTED_OPERATION, { topic0 });
|
|
51507
51383
|
}
|
|
51508
51384
|
args.topic0 = topic0;
|
|
51509
51385
|
}
|
|
@@ -51569,7 +51445,7 @@ class EtherscanProvider extends BaseProvider {
|
|
|
51569
51445
|
}
|
|
51570
51446
|
|
|
51571
51447
|
// node_modules/@ethersproject/providers/lib.esm/fallback-provider.js
|
|
51572
|
-
var
|
|
51448
|
+
var import_bytes9 = __toESM(require_lib2());
|
|
51573
51449
|
var import_properties12 = __toESM(require_lib4());
|
|
51574
51450
|
var import_random2 = __toESM(require_lib21());
|
|
51575
51451
|
var import_web4 = __toESM(require_lib23());
|
|
@@ -51600,7 +51476,7 @@ var __awaiter11 = function(thisArg, _arguments, P, generator) {
|
|
|
51600
51476
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
51601
51477
|
});
|
|
51602
51478
|
};
|
|
51603
|
-
var
|
|
51479
|
+
var logger17 = new Logger(version10);
|
|
51604
51480
|
function now() {
|
|
51605
51481
|
return new Date().getTime();
|
|
51606
51482
|
}
|
|
@@ -51613,7 +51489,7 @@ function checkNetworks(networks2) {
|
|
|
51613
51489
|
}
|
|
51614
51490
|
if (result) {
|
|
51615
51491
|
if (!(result.name === network.name && result.chainId === network.chainId && (result.ensAddress === network.ensAddress || result.ensAddress == null && network.ensAddress == null))) {
|
|
51616
|
-
|
|
51492
|
+
logger17.throwArgumentError("provider mismatch", "networks", networks2);
|
|
51617
51493
|
}
|
|
51618
51494
|
} else {
|
|
51619
51495
|
result = network;
|
|
@@ -51849,23 +51725,23 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51849
51725
|
case "getBalance":
|
|
51850
51726
|
case "getTransactionCount":
|
|
51851
51727
|
case "getCode":
|
|
51852
|
-
if (params.blockTag &&
|
|
51728
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51853
51729
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51854
51730
|
}
|
|
51855
51731
|
return provider[method](params.address, params.blockTag || "latest");
|
|
51856
51732
|
case "getStorageAt":
|
|
51857
|
-
if (params.blockTag &&
|
|
51733
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51858
51734
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51859
51735
|
}
|
|
51860
51736
|
return provider.getStorageAt(params.address, params.position, params.blockTag || "latest");
|
|
51861
51737
|
case "getBlock":
|
|
51862
|
-
if (params.blockTag &&
|
|
51738
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51863
51739
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51864
51740
|
}
|
|
51865
51741
|
return provider[params.includeTransactions ? "getBlockWithTransactions" : "getBlock"](params.blockTag || params.blockHash);
|
|
51866
51742
|
case "call":
|
|
51867
51743
|
case "estimateGas":
|
|
51868
|
-
if (params.blockTag &&
|
|
51744
|
+
if (params.blockTag && import_bytes9.isHexString(params.blockTag)) {
|
|
51869
51745
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51870
51746
|
}
|
|
51871
51747
|
if (method === "call" && params.blockTag) {
|
|
@@ -51877,13 +51753,13 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51877
51753
|
return provider[method](params.transactionHash);
|
|
51878
51754
|
case "getLogs": {
|
|
51879
51755
|
let filter = params.filter;
|
|
51880
|
-
if (filter.fromBlock &&
|
|
51756
|
+
if (filter.fromBlock && import_bytes9.isHexString(filter.fromBlock) || filter.toBlock && import_bytes9.isHexString(filter.toBlock)) {
|
|
51881
51757
|
provider = yield waitForSync(config, currentBlockNumber);
|
|
51882
51758
|
}
|
|
51883
51759
|
return provider.getLogs(filter);
|
|
51884
51760
|
}
|
|
51885
51761
|
}
|
|
51886
|
-
return
|
|
51762
|
+
return logger17.throwError("unknown method error", Logger.errors.UNKNOWN_ERROR, {
|
|
51887
51763
|
method,
|
|
51888
51764
|
params
|
|
51889
51765
|
});
|
|
@@ -51893,7 +51769,7 @@ function getRunner(config, currentBlockNumber, method, params) {
|
|
|
51893
51769
|
class FallbackProvider extends BaseProvider {
|
|
51894
51770
|
constructor(providers, quorum) {
|
|
51895
51771
|
if (providers.length === 0) {
|
|
51896
|
-
|
|
51772
|
+
logger17.throwArgumentError("missing providers", "providers", providers);
|
|
51897
51773
|
}
|
|
51898
51774
|
const providerConfigs = providers.map((configOrProvider, index) => {
|
|
51899
51775
|
if (Provider.isProvider(configOrProvider)) {
|
|
@@ -51913,7 +51789,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
51913
51789
|
}
|
|
51914
51790
|
const weight = config.weight;
|
|
51915
51791
|
if (weight % 1 || weight > 512 || weight < 1) {
|
|
51916
|
-
|
|
51792
|
+
logger17.throwArgumentError("invalid weight; must be integer in [1, 512]", `providers[${index}].weight`, weight);
|
|
51917
51793
|
}
|
|
51918
51794
|
return Object.freeze(config);
|
|
51919
51795
|
});
|
|
@@ -51921,7 +51797,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
51921
51797
|
if (quorum == null) {
|
|
51922
51798
|
quorum = total / 2;
|
|
51923
51799
|
} else if (quorum > total) {
|
|
51924
|
-
|
|
51800
|
+
logger17.throwArgumentError("quorum will always fail; larger than total weight", "quorum", quorum);
|
|
51925
51801
|
}
|
|
51926
51802
|
let networkOrReady = checkNetworks(providerConfigs.map((c) => c.provider.network));
|
|
51927
51803
|
if (networkOrReady == null) {
|
|
@@ -52078,7 +51954,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
52078
51954
|
}
|
|
52079
51955
|
props[name] = e[name];
|
|
52080
51956
|
});
|
|
52081
|
-
|
|
51957
|
+
logger17.throwError(e.reason || e.message, errorCode, props);
|
|
52082
51958
|
});
|
|
52083
51959
|
if (configs.filter((c) => !c.done).length === 0) {
|
|
52084
51960
|
break;
|
|
@@ -52090,7 +51966,7 @@ class FallbackProvider extends BaseProvider {
|
|
|
52090
51966
|
}
|
|
52091
51967
|
c.cancelled = true;
|
|
52092
51968
|
});
|
|
52093
|
-
return
|
|
51969
|
+
return logger17.throwError("failed to meet quorum", Logger.errors.SERVER_ERROR, {
|
|
52094
51970
|
method,
|
|
52095
51971
|
params,
|
|
52096
51972
|
results: configs.map((c) => exposeDebugConfig(c)),
|
|
@@ -52105,7 +51981,7 @@ var IpcProvider = null;
|
|
|
52105
51981
|
|
|
52106
51982
|
// node_modules/@ethersproject/providers/lib.esm/infura-provider.js
|
|
52107
51983
|
var import_properties13 = __toESM(require_lib4());
|
|
52108
|
-
var
|
|
51984
|
+
var logger18 = new Logger(version10);
|
|
52109
51985
|
var defaultProjectId = "84842078b09946638c03157f83405213";
|
|
52110
51986
|
|
|
52111
51987
|
class InfuraWebSocketProvider extends WebSocketProvider {
|
|
@@ -52113,7 +51989,7 @@ class InfuraWebSocketProvider extends WebSocketProvider {
|
|
|
52113
51989
|
const provider = new InfuraProvider(network, apiKey);
|
|
52114
51990
|
const connection = provider.connection;
|
|
52115
51991
|
if (connection.password) {
|
|
52116
|
-
|
|
51992
|
+
logger18.throwError("INFURA WebSocket project secrets unsupported", Logger.errors.UNSUPPORTED_OPERATION, {
|
|
52117
51993
|
operation: "InfuraProvider.getWebSocketProvider()"
|
|
52118
51994
|
});
|
|
52119
51995
|
}
|
|
@@ -52144,8 +52020,8 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
|
|
52144
52020
|
if (typeof apiKey === "string") {
|
|
52145
52021
|
apiKeyObj.projectId = apiKey;
|
|
52146
52022
|
} else if (apiKey.projectSecret != null) {
|
|
52147
|
-
|
|
52148
|
-
|
|
52023
|
+
logger18.assertArgument(typeof apiKey.projectId === "string", "projectSecret requires a projectId", "projectId", apiKey.projectId);
|
|
52024
|
+
logger18.assertArgument(typeof apiKey.projectSecret === "string", "invalid projectSecret", "projectSecret", "[REDACTED]");
|
|
52149
52025
|
apiKeyObj.projectId = apiKey.projectId;
|
|
52150
52026
|
apiKeyObj.projectSecret = apiKey.projectSecret;
|
|
52151
52027
|
} else if (apiKey.projectId) {
|
|
@@ -52185,7 +52061,7 @@ class InfuraProvider extends UrlJsonRpcProvider {
|
|
|
52185
52061
|
host = "arbitrum-goerli.infura.io";
|
|
52186
52062
|
break;
|
|
52187
52063
|
default:
|
|
52188
|
-
|
|
52064
|
+
logger18.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
|
52189
52065
|
argument: "network",
|
|
52190
52066
|
value: network
|
|
52191
52067
|
});
|
|
@@ -52278,18 +52154,18 @@ class JsonRpcBatchProvider extends JsonRpcProvider {
|
|
|
52278
52154
|
}
|
|
52279
52155
|
|
|
52280
52156
|
// node_modules/@ethersproject/providers/lib.esm/nodesmith-provider.js
|
|
52281
|
-
var
|
|
52157
|
+
var logger19 = new Logger(version10);
|
|
52282
52158
|
var defaultApiKey3 = "ETHERS_JS_SHARED";
|
|
52283
52159
|
|
|
52284
52160
|
class NodesmithProvider extends UrlJsonRpcProvider {
|
|
52285
52161
|
static getApiKey(apiKey) {
|
|
52286
52162
|
if (apiKey && typeof apiKey !== "string") {
|
|
52287
|
-
|
|
52163
|
+
logger19.throwArgumentError("invalid apiKey", "apiKey", apiKey);
|
|
52288
52164
|
}
|
|
52289
52165
|
return apiKey || defaultApiKey3;
|
|
52290
52166
|
}
|
|
52291
52167
|
static getUrl(network, apiKey) {
|
|
52292
|
-
|
|
52168
|
+
logger19.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");
|
|
52293
52169
|
let host = null;
|
|
52294
52170
|
switch (network.name) {
|
|
52295
52171
|
case "homestead":
|
|
@@ -52308,14 +52184,14 @@ class NodesmithProvider extends UrlJsonRpcProvider {
|
|
|
52308
52184
|
host = "https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";
|
|
52309
52185
|
break;
|
|
52310
52186
|
default:
|
|
52311
|
-
|
|
52187
|
+
logger19.throwArgumentError("unsupported network", "network", arguments[0]);
|
|
52312
52188
|
}
|
|
52313
52189
|
return host + "?apiKey=" + apiKey;
|
|
52314
52190
|
}
|
|
52315
52191
|
}
|
|
52316
52192
|
|
|
52317
52193
|
// node_modules/@ethersproject/providers/lib.esm/pocket-provider.js
|
|
52318
|
-
var
|
|
52194
|
+
var logger20 = new Logger(version10);
|
|
52319
52195
|
var defaultApplicationId = "62e1ad51b37b8e00394bda3b";
|
|
52320
52196
|
|
|
52321
52197
|
class PocketProvider extends UrlJsonRpcProvider {
|
|
@@ -52335,7 +52211,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52335
52211
|
} else if (apiKey.applicationId) {
|
|
52336
52212
|
apiKeyObj.applicationId = apiKey.applicationId;
|
|
52337
52213
|
} else {
|
|
52338
|
-
|
|
52214
|
+
logger20.throwArgumentError("unsupported PocketProvider apiKey", "apiKey", apiKey);
|
|
52339
52215
|
}
|
|
52340
52216
|
return apiKeyObj;
|
|
52341
52217
|
}
|
|
@@ -52364,7 +52240,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52364
52240
|
host = "eth-ropsten.gateway.pokt.network";
|
|
52365
52241
|
break;
|
|
52366
52242
|
default:
|
|
52367
|
-
|
|
52243
|
+
logger20.throwError("unsupported network", Logger.errors.INVALID_ARGUMENT, {
|
|
52368
52244
|
argument: "network",
|
|
52369
52245
|
value: network
|
|
52370
52246
|
});
|
|
@@ -52384,7 +52260,7 @@ class PocketProvider extends UrlJsonRpcProvider {
|
|
|
52384
52260
|
|
|
52385
52261
|
// node_modules/@ethersproject/providers/lib.esm/web3-provider.js
|
|
52386
52262
|
var import_properties15 = __toESM(require_lib4());
|
|
52387
|
-
var
|
|
52263
|
+
var logger21 = new Logger(version10);
|
|
52388
52264
|
var _nextId = 1;
|
|
52389
52265
|
function buildWeb3LegacyFetcher(provider, sendFunc) {
|
|
52390
52266
|
const fetcher = "Web3LegacyFetcher";
|
|
@@ -52468,7 +52344,7 @@ function buildEip1193Fetcher(provider) {
|
|
|
52468
52344
|
class Web3Provider extends JsonRpcProvider {
|
|
52469
52345
|
constructor(provider, network) {
|
|
52470
52346
|
if (provider == null) {
|
|
52471
|
-
|
|
52347
|
+
logger21.throwArgumentError("missing provider", "provider", provider);
|
|
52472
52348
|
}
|
|
52473
52349
|
let path = null;
|
|
52474
52350
|
let jsonRpcFetchFunc = null;
|
|
@@ -52492,7 +52368,7 @@ class Web3Provider extends JsonRpcProvider {
|
|
|
52492
52368
|
} else if (provider.send) {
|
|
52493
52369
|
jsonRpcFetchFunc = buildWeb3LegacyFetcher(provider, provider.send.bind(provider));
|
|
52494
52370
|
} else {
|
|
52495
|
-
|
|
52371
|
+
logger21.throwArgumentError("unsupported provider", "provider", provider);
|
|
52496
52372
|
}
|
|
52497
52373
|
if (!path) {
|
|
52498
52374
|
path = "unknown:";
|
|
@@ -52508,7 +52384,7 @@ class Web3Provider extends JsonRpcProvider {
|
|
|
52508
52384
|
}
|
|
52509
52385
|
|
|
52510
52386
|
// node_modules/@ethersproject/providers/lib.esm/index.js
|
|
52511
|
-
var
|
|
52387
|
+
var logger22 = new Logger(version10);
|
|
52512
52388
|
function getDefaultProvider(network, options) {
|
|
52513
52389
|
if (network == null) {
|
|
52514
52390
|
network = "homestead";
|
|
@@ -52524,13 +52400,13 @@ function getDefaultProvider(network, options) {
|
|
|
52524
52400
|
case "wss":
|
|
52525
52401
|
return new WebSocketProvider(network);
|
|
52526
52402
|
default:
|
|
52527
|
-
|
|
52403
|
+
logger22.throwArgumentError("unsupported URL scheme", "network", network);
|
|
52528
52404
|
}
|
|
52529
52405
|
}
|
|
52530
52406
|
}
|
|
52531
52407
|
const n = getNetwork(network);
|
|
52532
52408
|
if (!n || !n._defaultProvider) {
|
|
52533
|
-
|
|
52409
|
+
logger22.throwError("unsupported getDefaultProvider network", Logger.errors.NETWORK_ERROR, {
|
|
52534
52410
|
operation: "getDefaultProvider",
|
|
52535
52411
|
network
|
|
52536
52412
|
});
|
|
@@ -52555,15 +52431,15 @@ var import_hash4 = __toESM(require_lib12());
|
|
|
52555
52431
|
var import_properties16 = __toESM(require_lib4());
|
|
52556
52432
|
|
|
52557
52433
|
// node_modules/@ethersproject/wordlists/lib.esm/_version.js
|
|
52558
|
-
var
|
|
52434
|
+
var version11 = "wordlists/5.7.0";
|
|
52559
52435
|
|
|
52560
52436
|
// node_modules/@ethersproject/wordlists/lib.esm/wordlist.js
|
|
52561
52437
|
var exportWordlist = false;
|
|
52562
|
-
var
|
|
52438
|
+
var logger23 = new Logger(version11);
|
|
52563
52439
|
|
|
52564
52440
|
class Wordlist {
|
|
52565
52441
|
constructor(locale) {
|
|
52566
|
-
|
|
52442
|
+
logger23.checkAbstract(new.target, Wordlist);
|
|
52567
52443
|
import_properties16.defineReadOnly(this, "locale", locale);
|
|
52568
52444
|
}
|
|
52569
52445
|
split(mnemonic) {
|
|
@@ -52640,14 +52516,14 @@ var wordlists = {
|
|
|
52640
52516
|
// node_modules/ethers/lib.esm/utils.js
|
|
52641
52517
|
var exports_utils = {};
|
|
52642
52518
|
__export(exports_utils, {
|
|
52643
|
-
zeroPad: () =>
|
|
52519
|
+
zeroPad: () => import_bytes10.zeroPad,
|
|
52644
52520
|
verifyTypedData: () => verifyTypedData,
|
|
52645
52521
|
verifyMessage: () => verifyMessage,
|
|
52646
52522
|
toUtf8String: () => import_strings4.toUtf8String,
|
|
52647
52523
|
toUtf8CodePoints: () => import_strings4.toUtf8CodePoints,
|
|
52648
52524
|
toUtf8Bytes: () => import_strings4.toUtf8Bytes,
|
|
52649
|
-
stripZeros: () =>
|
|
52650
|
-
splitSignature: () =>
|
|
52525
|
+
stripZeros: () => import_bytes10.stripZeros,
|
|
52526
|
+
splitSignature: () => import_bytes10.splitSignature,
|
|
52651
52527
|
soliditySha256: () => import_solidity.sha256,
|
|
52652
52528
|
solidityPack: () => import_solidity.pack,
|
|
52653
52529
|
solidityKeccak256: () => import_solidity.keccak256,
|
|
@@ -52670,29 +52546,29 @@ __export(exports_utils, {
|
|
|
52670
52546
|
namehash: () => import_hash5.namehash,
|
|
52671
52547
|
mnemonicToSeed: () => import_hdnode2.mnemonicToSeed,
|
|
52672
52548
|
mnemonicToEntropy: () => import_hdnode2.mnemonicToEntropy,
|
|
52673
|
-
keccak256: () =>
|
|
52674
|
-
joinSignature: () =>
|
|
52549
|
+
keccak256: () => import_keccak2562.keccak256,
|
|
52550
|
+
joinSignature: () => import_bytes10.joinSignature,
|
|
52675
52551
|
isValidName: () => import_hash5.isValidName,
|
|
52676
52552
|
isValidMnemonic: () => import_hdnode2.isValidMnemonic,
|
|
52677
|
-
isHexString: () =>
|
|
52678
|
-
isBytesLike: () =>
|
|
52679
|
-
isBytes: () =>
|
|
52680
|
-
isAddress: () => isAddress,
|
|
52553
|
+
isHexString: () => import_bytes10.isHexString,
|
|
52554
|
+
isBytesLike: () => import_bytes10.isBytesLike,
|
|
52555
|
+
isBytes: () => import_bytes10.isBytes,
|
|
52556
|
+
isAddress: () => import_address5.isAddress,
|
|
52681
52557
|
id: () => import_hash5.id,
|
|
52682
|
-
hexlify: () =>
|
|
52683
|
-
hexZeroPad: () =>
|
|
52684
|
-
hexValue: () =>
|
|
52685
|
-
hexStripZeros: () =>
|
|
52686
|
-
hexDataSlice: () =>
|
|
52687
|
-
hexDataLength: () =>
|
|
52688
|
-
hexConcat: () =>
|
|
52558
|
+
hexlify: () => import_bytes10.hexlify,
|
|
52559
|
+
hexZeroPad: () => import_bytes10.hexZeroPad,
|
|
52560
|
+
hexValue: () => import_bytes10.hexValue,
|
|
52561
|
+
hexStripZeros: () => import_bytes10.hexStripZeros,
|
|
52562
|
+
hexDataSlice: () => import_bytes10.hexDataSlice,
|
|
52563
|
+
hexDataLength: () => import_bytes10.hexDataLength,
|
|
52564
|
+
hexConcat: () => import_bytes10.hexConcat,
|
|
52689
52565
|
hashMessage: () => import_hash5.hashMessage,
|
|
52690
52566
|
getStatic: () => import_properties17.getStatic,
|
|
52691
52567
|
getJsonWalletAddress: () => import_json_wallets2.getJsonWalletAddress,
|
|
52692
|
-
getIcapAddress: () => getIcapAddress,
|
|
52693
|
-
getCreate2Address: () => getCreate2Address,
|
|
52694
|
-
getContractAddress: () => getContractAddress,
|
|
52695
|
-
getAddress: () => getAddress,
|
|
52568
|
+
getIcapAddress: () => import_address5.getIcapAddress,
|
|
52569
|
+
getCreate2Address: () => import_address5.getCreate2Address,
|
|
52570
|
+
getContractAddress: () => import_address5.getContractAddress,
|
|
52571
|
+
getAddress: () => import_address5.getAddress,
|
|
52696
52572
|
getAccountPath: () => import_hdnode2.getAccountPath,
|
|
52697
52573
|
formatUnits: () => import_units.formatUnits,
|
|
52698
52574
|
formatEther: () => import_units.formatEther,
|
|
@@ -52704,7 +52580,7 @@ __export(exports_utils, {
|
|
|
52704
52580
|
defaultPath: () => import_hdnode2.defaultPath,
|
|
52705
52581
|
defaultAbiCoder: () => import_abi2.defaultAbiCoder,
|
|
52706
52582
|
deepCopy: () => import_properties17.deepCopy,
|
|
52707
|
-
concat: () =>
|
|
52583
|
+
concat: () => import_bytes10.concat,
|
|
52708
52584
|
computePublicKey: () => import_signing_key2.computePublicKey,
|
|
52709
52585
|
computeHmac: () => import_sha22.computeHmac,
|
|
52710
52586
|
computeAddress: () => import_transactions6.computeAddress,
|
|
@@ -52713,7 +52589,7 @@ __export(exports_utils, {
|
|
|
52713
52589
|
checkProperties: () => import_properties17.checkProperties,
|
|
52714
52590
|
base64: () => base64,
|
|
52715
52591
|
base58: () => import_basex2.Base58,
|
|
52716
|
-
arrayify: () =>
|
|
52592
|
+
arrayify: () => import_bytes10.arrayify,
|
|
52717
52593
|
accessListify: () => import_transactions6.accessListify,
|
|
52718
52594
|
_toEscapedUtf8String: () => import_strings4._toEscapedUtf8String,
|
|
52719
52595
|
_fetchData: () => import_web6._fetchData,
|
|
@@ -52741,13 +52617,14 @@ __export(exports_utils, {
|
|
|
52741
52617
|
AbiCoder: () => import_abi2.AbiCoder
|
|
52742
52618
|
});
|
|
52743
52619
|
var import_abi2 = __toESM(require_lib13());
|
|
52620
|
+
var import_address5 = __toESM(require_lib7());
|
|
52744
52621
|
var base64 = __toESM(require_lib10());
|
|
52745
52622
|
var import_basex2 = __toESM(require_lib16());
|
|
52746
|
-
var
|
|
52623
|
+
var import_bytes10 = __toESM(require_lib2());
|
|
52747
52624
|
var import_hash5 = __toESM(require_lib12());
|
|
52748
52625
|
var import_hdnode2 = __toESM(require_lib20());
|
|
52749
52626
|
var import_json_wallets2 = __toESM(require_lib22());
|
|
52750
|
-
var
|
|
52627
|
+
var import_keccak2562 = __toESM(require_lib5());
|
|
52751
52628
|
var import_sha22 = __toESM(require_lib17());
|
|
52752
52629
|
var import_solidity = __toESM(require_lib24());
|
|
52753
52630
|
var import_random3 = __toESM(require_lib21());
|
|
@@ -52762,10 +52639,10 @@ var import_sha23 = __toESM(require_lib17());
|
|
|
52762
52639
|
var import_strings5 = __toESM(require_lib9());
|
|
52763
52640
|
|
|
52764
52641
|
// node_modules/ethers/lib.esm/_version.js
|
|
52765
|
-
var
|
|
52642
|
+
var version12 = "ethers/5.7.2";
|
|
52766
52643
|
|
|
52767
52644
|
// node_modules/ethers/lib.esm/ethers.js
|
|
52768
|
-
var
|
|
52645
|
+
var logger24 = new Logger(version12);
|
|
52769
52646
|
|
|
52770
52647
|
// node_modules/ethers/lib.esm/index.js
|
|
52771
52648
|
try {
|
|
@@ -54109,8 +53986,8 @@ class MultisendBuilder {
|
|
|
54109
53986
|
data
|
|
54110
53987
|
});
|
|
54111
53988
|
}
|
|
54112
|
-
static new(chainId,
|
|
54113
|
-
return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${
|
|
53989
|
+
static new(chainId, version13 = "v1_4_1") {
|
|
53990
|
+
return new MultisendBuilder(getAddressOrThrow(chainId, `gnosisSafe.${version13}.multisend`));
|
|
54114
53991
|
}
|
|
54115
53992
|
}
|
|
54116
53993
|
// src/integrations/gnosis/safe.L2.abi.ts
|
|
@@ -58350,6 +58227,7 @@ function invariant(condition, message) {
|
|
|
58350
58227
|
var import_decimal = __toESM(require_decimal());
|
|
58351
58228
|
var import_big = __toESM(require_big());
|
|
58352
58229
|
var import_toformat = __toESM(require_toFormat());
|
|
58230
|
+
var import_address6 = __toESM(require_lib7());
|
|
58353
58231
|
function _defineProperties(target, props) {
|
|
58354
58232
|
for (var i2 = 0;i2 < props.length; i2++) {
|
|
58355
58233
|
var descriptor = props[i2];
|
|
@@ -58909,7 +58787,7 @@ var NativeCurrency = /* @__PURE__ */ function(_BaseCurrency) {
|
|
|
58909
58787
|
}(BaseCurrency);
|
|
58910
58788
|
function validateAndParseAddress(address) {
|
|
58911
58789
|
try {
|
|
58912
|
-
return getAddress(address);
|
|
58790
|
+
return import_address6.getAddress(address);
|
|
58913
58791
|
} catch (error) {
|
|
58914
58792
|
throw new Error(address + " is not a valid address.");
|
|
58915
58793
|
}
|
|
@@ -58986,13 +58864,13 @@ var Ether = /* @__PURE__ */ function(_NativeCurrency) {
|
|
|
58986
58864
|
return Ether2;
|
|
58987
58865
|
}(NativeCurrency);
|
|
58988
58866
|
Ether._etherCache = {};
|
|
58989
|
-
var
|
|
58867
|
+
var MAX_SAFE_INTEGER = /* @__PURE__ */ import_jsbi.default.BigInt(Number.MAX_SAFE_INTEGER);
|
|
58990
58868
|
var ZERO = /* @__PURE__ */ import_jsbi.default.BigInt(0);
|
|
58991
58869
|
var ONE2 = /* @__PURE__ */ import_jsbi.default.BigInt(1);
|
|
58992
58870
|
var TWO = /* @__PURE__ */ import_jsbi.default.BigInt(2);
|
|
58993
58871
|
function sqrt(value) {
|
|
58994
58872
|
!import_jsbi.default.greaterThanOrEqual(value, ZERO) && invariant(false, "NEGATIVE");
|
|
58995
|
-
if (import_jsbi.default.lessThan(value,
|
|
58873
|
+
if (import_jsbi.default.lessThan(value, MAX_SAFE_INTEGER)) {
|
|
58996
58874
|
return import_jsbi.default.BigInt(Math.floor(Math.sqrt(import_jsbi.default.toNumber(value))));
|
|
58997
58875
|
}
|
|
58998
58876
|
var z;
|
|
@@ -59009,6 +58887,7 @@ function sqrt(value) {
|
|
|
59009
58887
|
// node_modules/@uniswap/v3-sdk/dist/v3-sdk.esm.js
|
|
59010
58888
|
var import_jsbi2 = __toESM(require_jsbi_umd());
|
|
59011
58889
|
var import_abi3 = __toESM(require_lib13());
|
|
58890
|
+
var import_address7 = __toESM(require_lib7());
|
|
59012
58891
|
var import_solidity2 = __toESM(require_lib24());
|
|
59013
58892
|
// node_modules/@uniswap/v3-periphery/artifacts/contracts/interfaces/IMulticall.sol/IMulticall.json
|
|
59014
58893
|
var IMulticall_default = {
|
|
@@ -62944,7 +62823,7 @@ var Q192 = /* @__PURE__ */ import_jsbi2.default.exponentiate(Q96, /* @__PURE__ *
|
|
|
62944
62823
|
function computePoolAddress(_ref) {
|
|
62945
62824
|
var { factoryAddress, tokenA, tokenB, fee, initCodeHashManualOverride } = _ref;
|
|
62946
62825
|
var _ref2 = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA], token0 = _ref2[0], token1 = _ref2[1];
|
|
62947
|
-
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);
|
|
62826
|
+
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);
|
|
62948
62827
|
}
|
|
62949
62828
|
var LiquidityMath = /* @__PURE__ */ function() {
|
|
62950
62829
|
function LiquidityMath2() {}
|
|
@@ -64317,8 +64196,9 @@ var import_jsbi3 = __toESM(require_jsbi_umd());
|
|
|
64317
64196
|
var import_decimal2 = __toESM(require_decimal());
|
|
64318
64197
|
var import_big2 = __toESM(require_big());
|
|
64319
64198
|
var import_toformat2 = __toESM(require_toFormat());
|
|
64320
|
-
var
|
|
64321
|
-
var
|
|
64199
|
+
var import_address8 = __toESM(require_lib7());
|
|
64200
|
+
var import_bytes11 = __toESM(require_lib2());
|
|
64201
|
+
var import_keccak2563 = __toESM(require_lib5());
|
|
64322
64202
|
var import_strings6 = __toESM(require_lib9());
|
|
64323
64203
|
function _defineProperties3(e, r) {
|
|
64324
64204
|
for (var t = 0;t < r.length; t++) {
|
|
@@ -65023,7 +64903,7 @@ var NativeCurrency2 = /* @__PURE__ */ function(_BaseCurrency) {
|
|
|
65023
64903
|
}(BaseCurrency3);
|
|
65024
64904
|
function validateAndParseAddress2(address) {
|
|
65025
64905
|
try {
|
|
65026
|
-
return getAddress(address);
|
|
64906
|
+
return import_address8.getAddress(address);
|
|
65027
64907
|
} catch (error) {
|
|
65028
64908
|
throw new Error(address + " is not a valid address.");
|
|
65029
64909
|
}
|
|
@@ -65127,18 +65007,18 @@ function computeZksyncCreate2Address(sender, bytecodeHash, salt, input) {
|
|
|
65127
65007
|
if (input === undefined) {
|
|
65128
65008
|
input = "0x";
|
|
65129
65009
|
}
|
|
65130
|
-
var prefix2 =
|
|
65131
|
-
var inputHash =
|
|
65132
|
-
var addressBytes =
|
|
65133
|
-
return getAddress(addressBytes);
|
|
65010
|
+
var prefix2 = import_keccak2563.keccak256(import_strings6.toUtf8Bytes("zksyncCreate2"));
|
|
65011
|
+
var inputHash = import_keccak2563.keccak256(input);
|
|
65012
|
+
var addressBytes = import_keccak2563.keccak256(import_bytes11.concat([prefix2, import_bytes11.hexZeroPad(sender, 32), salt, bytecodeHash, inputHash])).slice(26);
|
|
65013
|
+
return import_address8.getAddress(addressBytes);
|
|
65134
65014
|
}
|
|
65135
|
-
var
|
|
65015
|
+
var MAX_SAFE_INTEGER2 = /* @__PURE__ */ import_jsbi3.default.BigInt(Number.MAX_SAFE_INTEGER);
|
|
65136
65016
|
var ZERO3 = /* @__PURE__ */ import_jsbi3.default.BigInt(0);
|
|
65137
65017
|
var ONE4 = /* @__PURE__ */ import_jsbi3.default.BigInt(1);
|
|
65138
65018
|
var TWO3 = /* @__PURE__ */ import_jsbi3.default.BigInt(2);
|
|
65139
65019
|
function sqrt2(value) {
|
|
65140
65020
|
!import_jsbi3.default.greaterThanOrEqual(value, ZERO3) && invariant(false, "NEGATIVE");
|
|
65141
|
-
if (import_jsbi3.default.lessThan(value,
|
|
65021
|
+
if (import_jsbi3.default.lessThan(value, MAX_SAFE_INTEGER2)) {
|
|
65142
65022
|
return import_jsbi3.default.BigInt(Math.floor(Math.sqrt(import_jsbi3.default.toNumber(value))));
|
|
65143
65023
|
}
|
|
65144
65024
|
var z;
|
|
@@ -65155,6 +65035,7 @@ function sqrt2(value) {
|
|
|
65155
65035
|
// node_modules/@uniswap/v4-sdk/node_modules/@uniswap/v3-sdk/dist/v3-sdk.esm.js
|
|
65156
65036
|
var import_jsbi4 = __toESM(require_jsbi_umd());
|
|
65157
65037
|
var import_abi4 = __toESM(require_lib13());
|
|
65038
|
+
var import_address9 = __toESM(require_lib7());
|
|
65158
65039
|
var import_solidity3 = __toESM(require_lib24());
|
|
65159
65040
|
function _arrayLikeToArray2(r, a) {
|
|
65160
65041
|
(a == null || a > r.length) && (a = r.length);
|
|
@@ -65606,7 +65487,7 @@ function computePoolAddress2(_ref) {
|
|
|
65606
65487
|
case ChainId2.ZKSYNC:
|
|
65607
65488
|
return computeZksyncCreate2Address(factoryAddress, initCodeHash, salt);
|
|
65608
65489
|
default:
|
|
65609
|
-
return getCreate2Address(factoryAddress, salt, initCodeHash);
|
|
65490
|
+
return import_address9.getCreate2Address(factoryAddress, salt, initCodeHash);
|
|
65610
65491
|
}
|
|
65611
65492
|
}
|
|
65612
65493
|
var FullMath2 = /* @__PURE__ */ function() {
|
|
@@ -69461,7 +69342,7 @@ var SwapExactInputSingleCalldataV4 = ({
|
|
|
69461
69342
|
hookData = "0x",
|
|
69462
69343
|
recipient
|
|
69463
69344
|
}) => {
|
|
69464
|
-
const
|
|
69345
|
+
const getAddress7 = (currency) => {
|
|
69465
69346
|
return currency.address;
|
|
69466
69347
|
};
|
|
69467
69348
|
const commands = exports_ethers.utils.solidityPack(["uint8"], [16 /* V4_SWAP */]);
|
|
@@ -69469,15 +69350,15 @@ var SwapExactInputSingleCalldataV4 = ({
|
|
|
69469
69350
|
const params = [
|
|
69470
69351
|
exports_ethers.utils.defaultAbiCoder.encode(["tuple(tuple(address,address,uint24,int24,address),bool,uint128,uint128,bytes)"], [
|
|
69471
69352
|
[
|
|
69472
|
-
[
|
|
69353
|
+
[getAddress7(pool.currency0), getAddress7(pool.currency1), pool.fee, pool.tickSpacing, pool.hooks],
|
|
69473
69354
|
zeroForOne,
|
|
69474
69355
|
amountIn,
|
|
69475
69356
|
amountOutMinimum,
|
|
69476
69357
|
hookData
|
|
69477
69358
|
]
|
|
69478
69359
|
]),
|
|
69479
|
-
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ?
|
|
69480
|
-
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ?
|
|
69360
|
+
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ? getAddress7(pool.currency0) : getAddress7(pool.currency1), amountIn]),
|
|
69361
|
+
exports_ethers.utils.defaultAbiCoder.encode(["address", "uint256"], [zeroForOne ? getAddress7(pool.currency1) : getAddress7(pool.currency0), amountOutMinimum])
|
|
69481
69362
|
];
|
|
69482
69363
|
const actionsList = [];
|
|
69483
69364
|
actionsList.push(Actions2.SWAP_EXACT_IN_SINGLE);
|
|
@@ -74135,6 +74016,33 @@ var approveTokenThroughPermit2 = ({
|
|
|
74135
74016
|
operation: 0
|
|
74136
74017
|
});
|
|
74137
74018
|
};
|
|
74019
|
+
var TransferFromPermit2Calldata = ({
|
|
74020
|
+
from: from2,
|
|
74021
|
+
to,
|
|
74022
|
+
amount,
|
|
74023
|
+
token
|
|
74024
|
+
}) => {
|
|
74025
|
+
return permit2Interface.encodeFunctionData("transferFrom(address,address,uint160,address)", [
|
|
74026
|
+
from2,
|
|
74027
|
+
to,
|
|
74028
|
+
amount,
|
|
74029
|
+
token
|
|
74030
|
+
]);
|
|
74031
|
+
};
|
|
74032
|
+
var transferFromPermit2Trx = ({
|
|
74033
|
+
permit2Address,
|
|
74034
|
+
from: from2,
|
|
74035
|
+
to,
|
|
74036
|
+
amount,
|
|
74037
|
+
token
|
|
74038
|
+
}) => {
|
|
74039
|
+
return createCall({
|
|
74040
|
+
to: permit2Address,
|
|
74041
|
+
data: TransferFromPermit2Calldata({ from: from2, to, amount, token }),
|
|
74042
|
+
value: 0n,
|
|
74043
|
+
operation: 0
|
|
74044
|
+
});
|
|
74045
|
+
};
|
|
74138
74046
|
// src/integrations/lagoonV1/factory.abi.ts
|
|
74139
74047
|
var factory_abi_default = [
|
|
74140
74048
|
{
|
|
@@ -84889,48 +84797,31 @@ var sendOFTTrx = ({
|
|
|
84889
84797
|
var message_transmitter_v2_abi_default = [
|
|
84890
84798
|
{
|
|
84891
84799
|
inputs: [
|
|
84892
|
-
{ internalType: "
|
|
84893
|
-
{ internalType: "uint32", name: "
|
|
84800
|
+
{ internalType: "uint32", name: "_localDomain", type: "uint32" },
|
|
84801
|
+
{ internalType: "uint32", name: "_version", type: "uint32" }
|
|
84894
84802
|
],
|
|
84895
84803
|
stateMutability: "nonpayable",
|
|
84896
84804
|
type: "constructor"
|
|
84897
84805
|
},
|
|
84898
84806
|
{
|
|
84899
84807
|
anonymous: false,
|
|
84900
|
-
inputs: [{ indexed: true, internalType: "address", name: "
|
|
84901
|
-
name: "
|
|
84808
|
+
inputs: [{ indexed: true, internalType: "address", name: "attester", type: "address" }],
|
|
84809
|
+
name: "AttesterDisabled",
|
|
84902
84810
|
type: "event"
|
|
84903
84811
|
},
|
|
84904
84812
|
{
|
|
84905
84813
|
anonymous: false,
|
|
84906
|
-
inputs: [
|
|
84907
|
-
|
|
84908
|
-
{ indexed: true, internalType: "address", name: "newDenylister", type: "address" }
|
|
84909
|
-
],
|
|
84910
|
-
name: "DenylisterChanged",
|
|
84814
|
+
inputs: [{ indexed: true, internalType: "address", name: "attester", type: "address" }],
|
|
84815
|
+
name: "AttesterEnabled",
|
|
84911
84816
|
type: "event"
|
|
84912
84817
|
},
|
|
84913
84818
|
{
|
|
84914
84819
|
anonymous: false,
|
|
84915
84820
|
inputs: [
|
|
84916
|
-
{ indexed: true, internalType: "address", name: "
|
|
84917
|
-
{ indexed:
|
|
84918
|
-
{ indexed: true, internalType: "address", name: "depositor", type: "address" },
|
|
84919
|
-
{ indexed: false, internalType: "bytes32", name: "mintRecipient", type: "bytes32" },
|
|
84920
|
-
{ indexed: false, internalType: "uint32", name: "destinationDomain", type: "uint32" },
|
|
84921
|
-
{ indexed: false, internalType: "bytes32", name: "destinationTokenMessenger", type: "bytes32" },
|
|
84922
|
-
{ indexed: false, internalType: "bytes32", name: "destinationCaller", type: "bytes32" },
|
|
84923
|
-
{ indexed: false, internalType: "uint256", name: "maxFee", type: "uint256" },
|
|
84924
|
-
{ indexed: true, internalType: "uint32", name: "minFinalityThreshold", type: "uint32" },
|
|
84925
|
-
{ indexed: false, internalType: "bytes", name: "hookData", type: "bytes" }
|
|
84821
|
+
{ indexed: true, internalType: "address", name: "previousAttesterManager", type: "address" },
|
|
84822
|
+
{ indexed: true, internalType: "address", name: "newAttesterManager", type: "address" }
|
|
84926
84823
|
],
|
|
84927
|
-
name: "
|
|
84928
|
-
type: "event"
|
|
84929
|
-
},
|
|
84930
|
-
{
|
|
84931
|
-
anonymous: false,
|
|
84932
|
-
inputs: [{ indexed: false, internalType: "address", name: "feeRecipient", type: "address" }],
|
|
84933
|
-
name: "FeeRecipientSet",
|
|
84824
|
+
name: "AttesterManagerUpdated",
|
|
84934
84825
|
type: "event"
|
|
84935
84826
|
},
|
|
84936
84827
|
{
|
|
@@ -84941,25 +84832,27 @@ var message_transmitter_v2_abi_default = [
|
|
|
84941
84832
|
},
|
|
84942
84833
|
{
|
|
84943
84834
|
anonymous: false,
|
|
84944
|
-
inputs: [{ indexed: false, internalType: "
|
|
84945
|
-
name: "
|
|
84835
|
+
inputs: [{ indexed: false, internalType: "uint256", name: "newMaxMessageBodySize", type: "uint256" }],
|
|
84836
|
+
name: "MaxMessageBodySizeUpdated",
|
|
84946
84837
|
type: "event"
|
|
84947
84838
|
},
|
|
84948
84839
|
{
|
|
84949
84840
|
anonymous: false,
|
|
84950
|
-
inputs: [
|
|
84951
|
-
|
|
84841
|
+
inputs: [
|
|
84842
|
+
{ indexed: true, internalType: "address", name: "caller", type: "address" },
|
|
84843
|
+
{ indexed: false, internalType: "uint32", name: "sourceDomain", type: "uint32" },
|
|
84844
|
+
{ indexed: true, internalType: "bytes32", name: "nonce", type: "bytes32" },
|
|
84845
|
+
{ indexed: false, internalType: "bytes32", name: "sender", type: "bytes32" },
|
|
84846
|
+
{ indexed: true, internalType: "uint32", name: "finalityThresholdExecuted", type: "uint32" },
|
|
84847
|
+
{ indexed: false, internalType: "bytes", name: "messageBody", type: "bytes" }
|
|
84848
|
+
],
|
|
84849
|
+
name: "MessageReceived",
|
|
84952
84850
|
type: "event"
|
|
84953
84851
|
},
|
|
84954
84852
|
{
|
|
84955
84853
|
anonymous: false,
|
|
84956
|
-
inputs: [
|
|
84957
|
-
|
|
84958
|
-
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
|
|
84959
|
-
{ indexed: true, internalType: "address", name: "mintToken", type: "address" },
|
|
84960
|
-
{ indexed: false, internalType: "uint256", name: "feeCollected", type: "uint256" }
|
|
84961
|
-
],
|
|
84962
|
-
name: "MintAndWithdraw",
|
|
84854
|
+
inputs: [{ indexed: false, internalType: "bytes", name: "message", type: "bytes" }],
|
|
84855
|
+
name: "MessageSent",
|
|
84963
84856
|
type: "event"
|
|
84964
84857
|
},
|
|
84965
84858
|
{
|
|
@@ -84980,22 +84873,11 @@ var message_transmitter_v2_abi_default = [
|
|
|
84980
84873
|
name: "OwnershipTransferred",
|
|
84981
84874
|
type: "event"
|
|
84982
84875
|
},
|
|
84876
|
+
{ anonymous: false, inputs: [], name: "Pause", type: "event" },
|
|
84983
84877
|
{
|
|
84984
84878
|
anonymous: false,
|
|
84985
|
-
inputs: [
|
|
84986
|
-
|
|
84987
|
-
{ indexed: false, internalType: "bytes32", name: "tokenMessenger", type: "bytes32" }
|
|
84988
|
-
],
|
|
84989
|
-
name: "RemoteTokenMessengerAdded",
|
|
84990
|
-
type: "event"
|
|
84991
|
-
},
|
|
84992
|
-
{
|
|
84993
|
-
anonymous: false,
|
|
84994
|
-
inputs: [
|
|
84995
|
-
{ indexed: false, internalType: "uint32", name: "domain", type: "uint32" },
|
|
84996
|
-
{ indexed: false, internalType: "bytes32", name: "tokenMessenger", type: "bytes32" }
|
|
84997
|
-
],
|
|
84998
|
-
name: "RemoteTokenMessengerRemoved",
|
|
84879
|
+
inputs: [{ indexed: true, internalType: "address", name: "newAddress", type: "address" }],
|
|
84880
|
+
name: "PauserChanged",
|
|
84999
84881
|
type: "event"
|
|
85000
84882
|
},
|
|
85001
84883
|
{
|
|
@@ -85006,113 +84888,66 @@ var message_transmitter_v2_abi_default = [
|
|
|
85006
84888
|
},
|
|
85007
84889
|
{
|
|
85008
84890
|
anonymous: false,
|
|
85009
|
-
inputs: [{ indexed: true, internalType: "address", name: "account", type: "address" }],
|
|
85010
|
-
name: "UnDenylisted",
|
|
85011
|
-
type: "event"
|
|
85012
|
-
},
|
|
85013
|
-
{ inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
85014
|
-
{
|
|
85015
|
-
inputs: [{ internalType: "address", name: "newLocalMinter", type: "address" }],
|
|
85016
|
-
name: "addLocalMinter",
|
|
85017
|
-
outputs: [],
|
|
85018
|
-
stateMutability: "nonpayable",
|
|
85019
|
-
type: "function"
|
|
85020
|
-
},
|
|
85021
|
-
{
|
|
85022
84891
|
inputs: [
|
|
85023
|
-
{ internalType: "
|
|
85024
|
-
{ internalType: "
|
|
84892
|
+
{ indexed: false, internalType: "uint256", name: "oldSignatureThreshold", type: "uint256" },
|
|
84893
|
+
{ indexed: false, internalType: "uint256", name: "newSignatureThreshold", type: "uint256" }
|
|
85025
84894
|
],
|
|
85026
|
-
name: "
|
|
85027
|
-
|
|
85028
|
-
stateMutability: "nonpayable",
|
|
85029
|
-
type: "function"
|
|
84895
|
+
name: "SignatureThresholdUpdated",
|
|
84896
|
+
type: "event"
|
|
85030
84897
|
},
|
|
84898
|
+
{ anonymous: false, inputs: [], name: "Unpause", type: "event" },
|
|
85031
84899
|
{
|
|
85032
|
-
inputs: [
|
|
85033
|
-
name: "
|
|
85034
|
-
outputs: [],
|
|
85035
|
-
stateMutability: "
|
|
84900
|
+
inputs: [],
|
|
84901
|
+
name: "NONCE_USED",
|
|
84902
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
84903
|
+
stateMutability: "view",
|
|
85036
84904
|
type: "function"
|
|
85037
84905
|
},
|
|
84906
|
+
{ inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
85038
84907
|
{
|
|
85039
84908
|
inputs: [],
|
|
85040
|
-
name: "
|
|
84909
|
+
name: "attesterManager",
|
|
85041
84910
|
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
85042
84911
|
stateMutability: "view",
|
|
85043
84912
|
type: "function"
|
|
85044
84913
|
},
|
|
85045
84914
|
{
|
|
85046
|
-
inputs: [
|
|
85047
|
-
|
|
85048
|
-
{ internalType: "uint32", name: "destinationDomain", type: "uint32" },
|
|
85049
|
-
{ internalType: "bytes32", name: "mintRecipient", type: "bytes32" },
|
|
85050
|
-
{ internalType: "address", name: "burnToken", type: "address" },
|
|
85051
|
-
{ internalType: "bytes32", name: "destinationCaller", type: "bytes32" },
|
|
85052
|
-
{ internalType: "uint256", name: "maxFee", type: "uint256" },
|
|
85053
|
-
{ internalType: "uint32", name: "minFinalityThreshold", type: "uint32" }
|
|
85054
|
-
],
|
|
85055
|
-
name: "depositForBurn",
|
|
84915
|
+
inputs: [{ internalType: "address", name: "attester", type: "address" }],
|
|
84916
|
+
name: "disableAttester",
|
|
85056
84917
|
outputs: [],
|
|
85057
84918
|
stateMutability: "nonpayable",
|
|
85058
84919
|
type: "function"
|
|
85059
84920
|
},
|
|
85060
84921
|
{
|
|
85061
|
-
inputs: [
|
|
85062
|
-
|
|
85063
|
-
{ internalType: "uint32", name: "destinationDomain", type: "uint32" },
|
|
85064
|
-
{ internalType: "bytes32", name: "mintRecipient", type: "bytes32" },
|
|
85065
|
-
{ internalType: "address", name: "burnToken", type: "address" },
|
|
85066
|
-
{ internalType: "bytes32", name: "destinationCaller", type: "bytes32" },
|
|
85067
|
-
{ internalType: "uint256", name: "maxFee", type: "uint256" },
|
|
85068
|
-
{ internalType: "uint32", name: "minFinalityThreshold", type: "uint32" },
|
|
85069
|
-
{ internalType: "bytes", name: "hookData", type: "bytes" }
|
|
85070
|
-
],
|
|
85071
|
-
name: "depositForBurnWithHook",
|
|
84922
|
+
inputs: [{ internalType: "address", name: "newAttester", type: "address" }],
|
|
84923
|
+
name: "enableAttester",
|
|
85072
84924
|
outputs: [],
|
|
85073
84925
|
stateMutability: "nonpayable",
|
|
85074
84926
|
type: "function"
|
|
85075
84927
|
},
|
|
85076
84928
|
{
|
|
85077
|
-
inputs: [],
|
|
85078
|
-
name: "
|
|
84929
|
+
inputs: [{ internalType: "uint256", name: "index", type: "uint256" }],
|
|
84930
|
+
name: "getEnabledAttester",
|
|
85079
84931
|
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
85080
84932
|
stateMutability: "view",
|
|
85081
84933
|
type: "function"
|
|
85082
84934
|
},
|
|
85083
84935
|
{
|
|
85084
|
-
inputs: [
|
|
85085
|
-
|
|
85086
|
-
|
|
85087
|
-
|
|
85088
|
-
{ internalType: "bytes", name: "messageBody", type: "bytes" }
|
|
85089
|
-
],
|
|
85090
|
-
name: "handleReceiveFinalizedMessage",
|
|
85091
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
85092
|
-
stateMutability: "nonpayable",
|
|
85093
|
-
type: "function"
|
|
85094
|
-
},
|
|
85095
|
-
{
|
|
85096
|
-
inputs: [
|
|
85097
|
-
{ internalType: "uint32", name: "remoteDomain", type: "uint32" },
|
|
85098
|
-
{ internalType: "bytes32", name: "sender", type: "bytes32" },
|
|
85099
|
-
{ internalType: "uint32", name: "finalityThresholdExecuted", type: "uint32" },
|
|
85100
|
-
{ internalType: "bytes", name: "messageBody", type: "bytes" }
|
|
85101
|
-
],
|
|
85102
|
-
name: "handleReceiveUnfinalizedMessage",
|
|
85103
|
-
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
85104
|
-
stateMutability: "nonpayable",
|
|
84936
|
+
inputs: [],
|
|
84937
|
+
name: "getNumEnabledAttesters",
|
|
84938
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
84939
|
+
stateMutability: "view",
|
|
85105
84940
|
type: "function"
|
|
85106
84941
|
},
|
|
85107
84942
|
{
|
|
85108
84943
|
inputs: [
|
|
85109
84944
|
{ internalType: "address", name: "owner_", type: "address" },
|
|
84945
|
+
{ internalType: "address", name: "pauser_", type: "address" },
|
|
85110
84946
|
{ internalType: "address", name: "rescuer_", type: "address" },
|
|
85111
|
-
{ internalType: "address", name: "
|
|
85112
|
-
{ internalType: "address", name: "
|
|
85113
|
-
{ internalType: "
|
|
85114
|
-
{ internalType: "
|
|
85115
|
-
{ internalType: "bytes32[]", name: "remoteTokenMessengers_", type: "bytes32[]" }
|
|
84947
|
+
{ internalType: "address", name: "attesterManager_", type: "address" },
|
|
84948
|
+
{ internalType: "address[]", name: "attesters_", type: "address[]" },
|
|
84949
|
+
{ internalType: "uint256", name: "signatureThreshold_", type: "uint256" },
|
|
84950
|
+
{ internalType: "uint256", name: "maxMessageBodySize_", type: "uint256" }
|
|
85116
84951
|
],
|
|
85117
84952
|
name: "initialize",
|
|
85118
84953
|
outputs: [],
|
|
@@ -85127,59 +84962,62 @@ var message_transmitter_v2_abi_default = [
|
|
|
85127
84962
|
type: "function"
|
|
85128
84963
|
},
|
|
85129
84964
|
{
|
|
85130
|
-
inputs: [{ internalType: "address", name: "
|
|
85131
|
-
name: "
|
|
84965
|
+
inputs: [{ internalType: "address", name: "attester", type: "address" }],
|
|
84966
|
+
name: "isEnabledAttester",
|
|
85132
84967
|
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
85133
84968
|
stateMutability: "view",
|
|
85134
84969
|
type: "function"
|
|
85135
84970
|
},
|
|
85136
84971
|
{
|
|
85137
84972
|
inputs: [],
|
|
85138
|
-
name: "
|
|
85139
|
-
outputs: [{ internalType: "
|
|
84973
|
+
name: "localDomain",
|
|
84974
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
|
85140
84975
|
stateMutability: "view",
|
|
85141
84976
|
type: "function"
|
|
85142
84977
|
},
|
|
85143
84978
|
{
|
|
85144
84979
|
inputs: [],
|
|
85145
|
-
name: "
|
|
85146
|
-
outputs: [{ internalType: "
|
|
84980
|
+
name: "maxMessageBodySize",
|
|
84981
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
85147
84982
|
stateMutability: "view",
|
|
85148
84983
|
type: "function"
|
|
85149
84984
|
},
|
|
85150
84985
|
{
|
|
85151
84986
|
inputs: [],
|
|
85152
|
-
name: "
|
|
85153
|
-
outputs: [{ internalType: "
|
|
84987
|
+
name: "owner",
|
|
84988
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
85154
84989
|
stateMutability: "view",
|
|
85155
84990
|
type: "function"
|
|
85156
84991
|
},
|
|
84992
|
+
{ inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
85157
84993
|
{
|
|
85158
84994
|
inputs: [],
|
|
85159
|
-
name: "
|
|
85160
|
-
outputs: [{ internalType: "
|
|
84995
|
+
name: "paused",
|
|
84996
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
85161
84997
|
stateMutability: "view",
|
|
85162
84998
|
type: "function"
|
|
85163
84999
|
},
|
|
85164
85000
|
{
|
|
85165
85001
|
inputs: [],
|
|
85166
|
-
name: "
|
|
85002
|
+
name: "pauser",
|
|
85167
85003
|
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
85168
85004
|
stateMutability: "view",
|
|
85169
85005
|
type: "function"
|
|
85170
85006
|
},
|
|
85171
85007
|
{
|
|
85172
|
-
inputs: [
|
|
85173
|
-
name: "
|
|
85174
|
-
outputs: [{ internalType: "
|
|
85008
|
+
inputs: [],
|
|
85009
|
+
name: "pendingOwner",
|
|
85010
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
85175
85011
|
stateMutability: "view",
|
|
85176
85012
|
type: "function"
|
|
85177
85013
|
},
|
|
85178
|
-
{ inputs: [], name: "removeLocalMinter", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
85179
85014
|
{
|
|
85180
|
-
inputs: [
|
|
85181
|
-
|
|
85182
|
-
|
|
85015
|
+
inputs: [
|
|
85016
|
+
{ internalType: "bytes", name: "message", type: "bytes" },
|
|
85017
|
+
{ internalType: "bytes", name: "attestation", type: "bytes" }
|
|
85018
|
+
],
|
|
85019
|
+
name: "receiveMessage",
|
|
85020
|
+
outputs: [{ internalType: "bool", name: "success", type: "bool" }],
|
|
85183
85021
|
stateMutability: "nonpayable",
|
|
85184
85022
|
type: "function"
|
|
85185
85023
|
},
|
|
@@ -85202,12 +85040,39 @@ var message_transmitter_v2_abi_default = [
|
|
|
85202
85040
|
type: "function"
|
|
85203
85041
|
},
|
|
85204
85042
|
{
|
|
85205
|
-
inputs: [
|
|
85206
|
-
|
|
85043
|
+
inputs: [
|
|
85044
|
+
{ internalType: "uint32", name: "destinationDomain", type: "uint32" },
|
|
85045
|
+
{ internalType: "bytes32", name: "recipient", type: "bytes32" },
|
|
85046
|
+
{ internalType: "bytes32", name: "destinationCaller", type: "bytes32" },
|
|
85047
|
+
{ internalType: "uint32", name: "minFinalityThreshold", type: "uint32" },
|
|
85048
|
+
{ internalType: "bytes", name: "messageBody", type: "bytes" }
|
|
85049
|
+
],
|
|
85050
|
+
name: "sendMessage",
|
|
85207
85051
|
outputs: [],
|
|
85208
85052
|
stateMutability: "nonpayable",
|
|
85209
85053
|
type: "function"
|
|
85210
85054
|
},
|
|
85055
|
+
{
|
|
85056
|
+
inputs: [{ internalType: "uint256", name: "newMaxMessageBodySize", type: "uint256" }],
|
|
85057
|
+
name: "setMaxMessageBodySize",
|
|
85058
|
+
outputs: [],
|
|
85059
|
+
stateMutability: "nonpayable",
|
|
85060
|
+
type: "function"
|
|
85061
|
+
},
|
|
85062
|
+
{
|
|
85063
|
+
inputs: [{ internalType: "uint256", name: "newSignatureThreshold", type: "uint256" }],
|
|
85064
|
+
name: "setSignatureThreshold",
|
|
85065
|
+
outputs: [],
|
|
85066
|
+
stateMutability: "nonpayable",
|
|
85067
|
+
type: "function"
|
|
85068
|
+
},
|
|
85069
|
+
{
|
|
85070
|
+
inputs: [],
|
|
85071
|
+
name: "signatureThreshold",
|
|
85072
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
85073
|
+
stateMutability: "view",
|
|
85074
|
+
type: "function"
|
|
85075
|
+
},
|
|
85211
85076
|
{
|
|
85212
85077
|
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
|
|
85213
85078
|
name: "transferOwnership",
|
|
@@ -85215,16 +85080,17 @@ var message_transmitter_v2_abi_default = [
|
|
|
85215
85080
|
stateMutability: "nonpayable",
|
|
85216
85081
|
type: "function"
|
|
85217
85082
|
},
|
|
85083
|
+
{ inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
85218
85084
|
{
|
|
85219
|
-
inputs: [{ internalType: "address", name: "
|
|
85220
|
-
name: "
|
|
85085
|
+
inputs: [{ internalType: "address", name: "newAttesterManager", type: "address" }],
|
|
85086
|
+
name: "updateAttesterManager",
|
|
85221
85087
|
outputs: [],
|
|
85222
85088
|
stateMutability: "nonpayable",
|
|
85223
85089
|
type: "function"
|
|
85224
85090
|
},
|
|
85225
85091
|
{
|
|
85226
|
-
inputs: [{ internalType: "address", name: "
|
|
85227
|
-
name: "
|
|
85092
|
+
inputs: [{ internalType: "address", name: "_newPauser", type: "address" }],
|
|
85093
|
+
name: "updatePauser",
|
|
85228
85094
|
outputs: [],
|
|
85229
85095
|
stateMutability: "nonpayable",
|
|
85230
85096
|
type: "function"
|
|
@@ -85235,6 +85101,20 @@ var message_transmitter_v2_abi_default = [
|
|
|
85235
85101
|
outputs: [],
|
|
85236
85102
|
stateMutability: "nonpayable",
|
|
85237
85103
|
type: "function"
|
|
85104
|
+
},
|
|
85105
|
+
{
|
|
85106
|
+
inputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
85107
|
+
name: "usedNonces",
|
|
85108
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
85109
|
+
stateMutability: "view",
|
|
85110
|
+
type: "function"
|
|
85111
|
+
},
|
|
85112
|
+
{
|
|
85113
|
+
inputs: [],
|
|
85114
|
+
name: "version",
|
|
85115
|
+
outputs: [{ internalType: "uint32", name: "", type: "uint32" }],
|
|
85116
|
+
stateMutability: "view",
|
|
85117
|
+
type: "function"
|
|
85238
85118
|
}
|
|
85239
85119
|
];
|
|
85240
85120
|
|
|
@@ -85732,4 +85612,4 @@ var simulateOrThrow = async (env2) => {
|
|
|
85732
85612
|
};
|
|
85733
85613
|
};
|
|
85734
85614
|
|
|
85735
|
-
//# debugId=
|
|
85615
|
+
//# debugId=75820791F15B7DCF64756E2164756E21
|