@gearbox-protocol/deploy-tools 5.5.1 → 5.5.2
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.mjs +597 -320
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4151,15 +4151,15 @@ var init_structs = __esm({
|
|
|
4151
4151
|
// ../../node_modules/viem/node_modules/abitype/dist/esm/human-readable/parseAbi.js
|
|
4152
4152
|
function parseAbi(signatures) {
|
|
4153
4153
|
const structs = parseStructs(signatures);
|
|
4154
|
-
const
|
|
4154
|
+
const abi33 = [];
|
|
4155
4155
|
const length = signatures.length;
|
|
4156
4156
|
for (let i = 0; i < length; i++) {
|
|
4157
4157
|
const signature = signatures[i];
|
|
4158
4158
|
if (isStructSignature(signature))
|
|
4159
4159
|
continue;
|
|
4160
|
-
|
|
4160
|
+
abi33.push(parseSignature(signature, structs));
|
|
4161
4161
|
}
|
|
4162
|
-
return
|
|
4162
|
+
return abi33;
|
|
4163
4163
|
}
|
|
4164
4164
|
var init_parseAbi = __esm({
|
|
4165
4165
|
"../../node_modules/viem/node_modules/abitype/dist/esm/human-readable/parseAbi.js"() {
|
|
@@ -4259,7 +4259,7 @@ var init_size = __esm({
|
|
|
4259
4259
|
var version2;
|
|
4260
4260
|
var init_version2 = __esm({
|
|
4261
4261
|
"../../node_modules/viem/_esm/errors/version.js"() {
|
|
4262
|
-
version2 = "2.22.
|
|
4262
|
+
version2 = "2.22.11";
|
|
4263
4263
|
}
|
|
4264
4264
|
});
|
|
4265
4265
|
|
|
@@ -5828,9 +5828,9 @@ var init_toFunctionSelector = __esm({
|
|
|
5828
5828
|
|
|
5829
5829
|
// ../../node_modules/viem/_esm/utils/abi/getAbiItem.js
|
|
5830
5830
|
function getAbiItem(parameters) {
|
|
5831
|
-
const { abi:
|
|
5831
|
+
const { abi: abi33, args = [], name } = parameters;
|
|
5832
5832
|
const isSelector = isHex(name, { strict: false });
|
|
5833
|
-
const abiItems =
|
|
5833
|
+
const abiItems = abi33.filter((abiItem) => {
|
|
5834
5834
|
if (isSelector) {
|
|
5835
5835
|
if (abiItem.type === "function")
|
|
5836
5836
|
return toFunctionSelector(abiItem) === name;
|
|
@@ -5960,11 +5960,11 @@ var init_parseAccount = __esm({
|
|
|
5960
5960
|
|
|
5961
5961
|
// ../../node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
|
|
5962
5962
|
function prepareEncodeFunctionData(parameters) {
|
|
5963
|
-
const { abi:
|
|
5964
|
-
let abiItem =
|
|
5963
|
+
const { abi: abi33, args, functionName } = parameters;
|
|
5964
|
+
let abiItem = abi33[0];
|
|
5965
5965
|
if (functionName) {
|
|
5966
5966
|
const item = getAbiItem({
|
|
5967
|
-
abi:
|
|
5967
|
+
abi: abi33,
|
|
5968
5968
|
args,
|
|
5969
5969
|
name: functionName
|
|
5970
5970
|
});
|
|
@@ -5993,12 +5993,12 @@ var init_prepareEncodeFunctionData = __esm({
|
|
|
5993
5993
|
// ../../node_modules/viem/_esm/utils/abi/encodeFunctionData.js
|
|
5994
5994
|
function encodeFunctionData(parameters) {
|
|
5995
5995
|
const { args } = parameters;
|
|
5996
|
-
const { abi:
|
|
5996
|
+
const { abi: abi33, functionName } = (() => {
|
|
5997
5997
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
5998
5998
|
return parameters;
|
|
5999
5999
|
return prepareEncodeFunctionData(parameters);
|
|
6000
6000
|
})();
|
|
6001
|
-
const abiItem =
|
|
6001
|
+
const abiItem = abi33[0];
|
|
6002
6002
|
const signature = functionName;
|
|
6003
6003
|
const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
6004
6004
|
return concatHex([signature, data ?? "0x"]);
|
|
@@ -6493,11 +6493,11 @@ var init_decodeAbiParameters = __esm({
|
|
|
6493
6493
|
|
|
6494
6494
|
// ../../node_modules/viem/_esm/utils/abi/decodeErrorResult.js
|
|
6495
6495
|
function decodeErrorResult(parameters) {
|
|
6496
|
-
const { abi:
|
|
6496
|
+
const { abi: abi33, data } = parameters;
|
|
6497
6497
|
const signature = slice(data, 0, 4);
|
|
6498
6498
|
if (signature === "0x")
|
|
6499
6499
|
throw new AbiDecodingZeroDataError();
|
|
6500
|
-
const abi_ = [...
|
|
6500
|
+
const abi_ = [...abi33 || [], solidityError, solidityPanic];
|
|
6501
6501
|
const abiItem = abi_.find((x) => x.type === "error" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
6502
6502
|
if (!abiItem)
|
|
6503
6503
|
throw new AbiErrorSignatureNotFoundError(signature, {
|
|
@@ -6840,8 +6840,8 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6840
6840
|
}
|
|
6841
6841
|
};
|
|
6842
6842
|
ContractFunctionExecutionError = class extends BaseError2 {
|
|
6843
|
-
constructor(cause, { abi:
|
|
6844
|
-
const abiItem = getAbiItem({ abi:
|
|
6843
|
+
constructor(cause, { abi: abi33, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
6844
|
+
const abiItem = getAbiItem({ abi: abi33, args, name: functionName });
|
|
6845
6845
|
const formattedArgs = abiItem ? formatAbiItemWithArgs({
|
|
6846
6846
|
abiItem,
|
|
6847
6847
|
args,
|
|
@@ -6907,7 +6907,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6907
6907
|
writable: true,
|
|
6908
6908
|
value: void 0
|
|
6909
6909
|
});
|
|
6910
|
-
this.abi =
|
|
6910
|
+
this.abi = abi33;
|
|
6911
6911
|
this.args = args;
|
|
6912
6912
|
this.cause = cause;
|
|
6913
6913
|
this.contractAddress = contractAddress;
|
|
@@ -6916,14 +6916,14 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6916
6916
|
}
|
|
6917
6917
|
};
|
|
6918
6918
|
ContractFunctionRevertedError = class extends BaseError2 {
|
|
6919
|
-
constructor({ abi:
|
|
6919
|
+
constructor({ abi: abi33, data, functionName, message }) {
|
|
6920
6920
|
let cause;
|
|
6921
6921
|
let decodedData = void 0;
|
|
6922
6922
|
let metaMessages;
|
|
6923
6923
|
let reason;
|
|
6924
6924
|
if (data && data !== "0x") {
|
|
6925
6925
|
try {
|
|
6926
|
-
decodedData = decodeErrorResult({ abi:
|
|
6926
|
+
decodedData = decodeErrorResult({ abi: abi33, data });
|
|
6927
6927
|
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
6928
6928
|
if (errorName === "Error") {
|
|
6929
6929
|
reason = errorArgs[0];
|
|
@@ -10630,10 +10630,10 @@ var init_isAddressEqual = __esm({
|
|
|
10630
10630
|
|
|
10631
10631
|
// ../../node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
|
|
10632
10632
|
function decodeFunctionResult(parameters) {
|
|
10633
|
-
const { abi:
|
|
10634
|
-
let abiItem =
|
|
10633
|
+
const { abi: abi33, args, functionName, data } = parameters;
|
|
10634
|
+
let abiItem = abi33[0];
|
|
10635
10635
|
if (functionName) {
|
|
10636
|
-
const item = getAbiItem({ abi:
|
|
10636
|
+
const item = getAbiItem({ abi: abi33, args, name: functionName });
|
|
10637
10637
|
if (!item)
|
|
10638
10638
|
throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });
|
|
10639
10639
|
abiItem = item;
|
|
@@ -11469,10 +11469,10 @@ var init_chain = __esm({
|
|
|
11469
11469
|
|
|
11470
11470
|
// ../../node_modules/viem/_esm/utils/abi/encodeDeployData.js
|
|
11471
11471
|
function encodeDeployData(parameters) {
|
|
11472
|
-
const { abi:
|
|
11472
|
+
const { abi: abi33, args, bytecode } = parameters;
|
|
11473
11473
|
if (!args || args.length === 0)
|
|
11474
11474
|
return bytecode;
|
|
11475
|
-
const description =
|
|
11475
|
+
const description = abi33.find((x) => "type" in x && x.type === "constructor");
|
|
11476
11476
|
if (!description)
|
|
11477
11477
|
throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });
|
|
11478
11478
|
if (!("inputs" in description))
|
|
@@ -21404,13 +21404,13 @@ var require_interface = __commonJS({
|
|
|
21404
21404
|
function Interface2(fragments) {
|
|
21405
21405
|
var _newTarget = this.constructor;
|
|
21406
21406
|
var _this = this;
|
|
21407
|
-
var
|
|
21407
|
+
var abi33 = [];
|
|
21408
21408
|
if (typeof fragments === "string") {
|
|
21409
|
-
|
|
21409
|
+
abi33 = JSON.parse(fragments);
|
|
21410
21410
|
} else {
|
|
21411
|
-
|
|
21411
|
+
abi33 = fragments;
|
|
21412
21412
|
}
|
|
21413
|
-
(0, properties_1.defineReadOnly)(this, "fragments",
|
|
21413
|
+
(0, properties_1.defineReadOnly)(this, "fragments", abi33.map(function(fragment) {
|
|
21414
21414
|
return fragments_1.Fragment.from(fragment);
|
|
21415
21415
|
}).filter(function(fragment) {
|
|
21416
21416
|
return fragment != null;
|
|
@@ -21464,15 +21464,15 @@ var require_interface = __commonJS({
|
|
|
21464
21464
|
if (format === fragments_1.FormatTypes.sighash) {
|
|
21465
21465
|
logger2.throwArgumentError("interface does not support formatting sighash", "format", format);
|
|
21466
21466
|
}
|
|
21467
|
-
var
|
|
21467
|
+
var abi33 = this.fragments.map(function(fragment) {
|
|
21468
21468
|
return fragment.format(format);
|
|
21469
21469
|
});
|
|
21470
21470
|
if (format === fragments_1.FormatTypes.json) {
|
|
21471
|
-
return JSON.stringify(
|
|
21471
|
+
return JSON.stringify(abi33.map(function(j) {
|
|
21472
21472
|
return JSON.parse(j);
|
|
21473
21473
|
}));
|
|
21474
21474
|
}
|
|
21475
|
-
return
|
|
21475
|
+
return abi33;
|
|
21476
21476
|
};
|
|
21477
21477
|
Interface2.getAbiCoder = function() {
|
|
21478
21478
|
return abi_coder_1.defaultAbiCoder;
|
|
@@ -37171,14 +37171,14 @@ var require_lib29 = __commonJS({
|
|
|
37171
37171
|
if (typeof compilerOutput === "string") {
|
|
37172
37172
|
compilerOutput = JSON.parse(compilerOutput);
|
|
37173
37173
|
}
|
|
37174
|
-
var
|
|
37174
|
+
var abi33 = compilerOutput.abi;
|
|
37175
37175
|
var bytecode = null;
|
|
37176
37176
|
if (compilerOutput.bytecode) {
|
|
37177
37177
|
bytecode = compilerOutput.bytecode;
|
|
37178
37178
|
} else if (compilerOutput.evm && compilerOutput.evm.bytecode) {
|
|
37179
37179
|
bytecode = compilerOutput.evm.bytecode;
|
|
37180
37180
|
}
|
|
37181
|
-
return new this(
|
|
37181
|
+
return new this(abi33, bytecode, signer);
|
|
37182
37182
|
};
|
|
37183
37183
|
ContractFactory2.getInterface = function(contractInterface) {
|
|
37184
37184
|
return Contract.getInterface(contractInterface);
|
|
@@ -50273,7 +50273,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50273
50273
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
50274
50274
|
var vars = process.config && process.config.variables || {};
|
|
50275
50275
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
50276
|
-
var
|
|
50276
|
+
var abi33 = process.versions.modules;
|
|
50277
50277
|
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
50278
50278
|
var arch = process.env.npm_config_arch || os2.arch();
|
|
50279
50279
|
var platform = process.env.npm_config_platform || os2.platform();
|
|
@@ -50305,7 +50305,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50305
50305
|
"platform=" + platform,
|
|
50306
50306
|
"arch=" + arch,
|
|
50307
50307
|
"runtime=" + runtime,
|
|
50308
|
-
"abi=" +
|
|
50308
|
+
"abi=" + abi33,
|
|
50309
50309
|
"uv=" + uv,
|
|
50310
50310
|
armv ? "armv=" + armv : "",
|
|
50311
50311
|
"libc=" + libc,
|
|
@@ -50321,7 +50321,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50321
50321
|
if (!tuple) return;
|
|
50322
50322
|
var prebuilds = path11.join(dir2, "prebuilds", tuple.name);
|
|
50323
50323
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
50324
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
50324
|
+
var candidates = parsed.filter(matchTags(runtime, abi33));
|
|
50325
50325
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
50326
50326
|
if (winner) return path11.join(prebuilds, winner.file);
|
|
50327
50327
|
}
|
|
@@ -50386,11 +50386,11 @@ var require_node_gyp_build = __commonJS({
|
|
|
50386
50386
|
}
|
|
50387
50387
|
return tags;
|
|
50388
50388
|
}
|
|
50389
|
-
function matchTags(runtime2,
|
|
50389
|
+
function matchTags(runtime2, abi34) {
|
|
50390
50390
|
return function(tags) {
|
|
50391
50391
|
if (tags == null) return false;
|
|
50392
50392
|
if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
50393
|
-
if (tags.abi && tags.abi !==
|
|
50393
|
+
if (tags.abi && tags.abi !== abi34 && !tags.napi) return false;
|
|
50394
50394
|
if (tags.uv && tags.uv !== uv) return false;
|
|
50395
50395
|
if (tags.armv && tags.armv !== armv) return false;
|
|
50396
50396
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -111736,17 +111736,17 @@ var require_interface2 = __commonJS({
|
|
|
111736
111736
|
* Create a new Interface for the %%fragments%%.
|
|
111737
111737
|
*/
|
|
111738
111738
|
constructor(fragments) {
|
|
111739
|
-
let
|
|
111739
|
+
let abi33 = [];
|
|
111740
111740
|
if (typeof fragments === "string") {
|
|
111741
|
-
|
|
111741
|
+
abi33 = JSON.parse(fragments);
|
|
111742
111742
|
} else {
|
|
111743
|
-
|
|
111743
|
+
abi33 = fragments;
|
|
111744
111744
|
}
|
|
111745
111745
|
this.#functions = /* @__PURE__ */ new Map();
|
|
111746
111746
|
this.#errors = /* @__PURE__ */ new Map();
|
|
111747
111747
|
this.#events = /* @__PURE__ */ new Map();
|
|
111748
111748
|
const frags = [];
|
|
111749
|
-
for (const a of
|
|
111749
|
+
for (const a of abi33) {
|
|
111750
111750
|
try {
|
|
111751
111751
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
111752
111752
|
} catch (error) {
|
|
@@ -111810,16 +111810,16 @@ var require_interface2 = __commonJS({
|
|
|
111810
111810
|
*/
|
|
111811
111811
|
format(minimal) {
|
|
111812
111812
|
const format = minimal ? "minimal" : "full";
|
|
111813
|
-
const
|
|
111814
|
-
return
|
|
111813
|
+
const abi33 = this.fragments.map((f) => f.format(format));
|
|
111814
|
+
return abi33;
|
|
111815
111815
|
}
|
|
111816
111816
|
/**
|
|
111817
111817
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
111818
111818
|
* returns.
|
|
111819
111819
|
*/
|
|
111820
111820
|
formatJson() {
|
|
111821
|
-
const
|
|
111822
|
-
return JSON.stringify(
|
|
111821
|
+
const abi33 = this.fragments.map((f) => f.format("json"));
|
|
111822
|
+
return JSON.stringify(abi33.map((j) => JSON.parse(j)));
|
|
111823
111823
|
}
|
|
111824
111824
|
/**
|
|
111825
111825
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -114587,12 +114587,12 @@ var require_contract = __commonJS({
|
|
|
114587
114587
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
114588
114588
|
* of.
|
|
114589
114589
|
*/
|
|
114590
|
-
constructor(target,
|
|
114590
|
+
constructor(target, abi33, runner, _deployTx) {
|
|
114591
114591
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
114592
114592
|
if (runner == null) {
|
|
114593
114593
|
runner = null;
|
|
114594
114594
|
}
|
|
114595
|
-
const iface = index_js_1.Interface.from(
|
|
114595
|
+
const iface = index_js_1.Interface.from(abi33);
|
|
114596
114596
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
114597
114597
|
Object.defineProperty(this, internal, { value: {} });
|
|
114598
114598
|
let addrPromise;
|
|
@@ -114955,10 +114955,10 @@ var require_contract = __commonJS({
|
|
|
114955
114955
|
/**
|
|
114956
114956
|
* Create a new Class for the %%abi%%.
|
|
114957
114957
|
*/
|
|
114958
|
-
static buildClass(
|
|
114958
|
+
static buildClass(abi33) {
|
|
114959
114959
|
class CustomContract extends _BaseContract {
|
|
114960
114960
|
constructor(address, runner = null) {
|
|
114961
|
-
super(address,
|
|
114961
|
+
super(address, abi33, runner);
|
|
114962
114962
|
}
|
|
114963
114963
|
}
|
|
114964
114964
|
return CustomContract;
|
|
@@ -114966,11 +114966,11 @@ var require_contract = __commonJS({
|
|
|
114966
114966
|
/**
|
|
114967
114967
|
* Create a new BaseContract with a specified Interface.
|
|
114968
114968
|
*/
|
|
114969
|
-
static from(target,
|
|
114969
|
+
static from(target, abi33, runner) {
|
|
114970
114970
|
if (runner == null) {
|
|
114971
114971
|
runner = null;
|
|
114972
114972
|
}
|
|
114973
|
-
const contract = new this(target,
|
|
114973
|
+
const contract = new this(target, abi33, runner);
|
|
114974
114974
|
return contract;
|
|
114975
114975
|
}
|
|
114976
114976
|
};
|
|
@@ -115014,8 +115014,8 @@ var require_factory = __commonJS({
|
|
|
115014
115014
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
115015
115015
|
* standard Solidity JSON output.
|
|
115016
115016
|
*/
|
|
115017
|
-
constructor(
|
|
115018
|
-
const iface = index_js_1.Interface.from(
|
|
115017
|
+
constructor(abi33, bytecode, runner) {
|
|
115018
|
+
const iface = index_js_1.Interface.from(abi33);
|
|
115019
115019
|
if (bytecode instanceof Uint8Array) {
|
|
115020
115020
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
115021
115021
|
} else {
|
|
@@ -115085,14 +115085,14 @@ var require_factory = __commonJS({
|
|
|
115085
115085
|
if (typeof output === "string") {
|
|
115086
115086
|
output = JSON.parse(output);
|
|
115087
115087
|
}
|
|
115088
|
-
const
|
|
115088
|
+
const abi33 = output.abi;
|
|
115089
115089
|
let bytecode = "";
|
|
115090
115090
|
if (output.bytecode) {
|
|
115091
115091
|
bytecode = output.bytecode;
|
|
115092
115092
|
} else if (output.evm && output.evm.bytecode) {
|
|
115093
115093
|
bytecode = output.evm.bytecode;
|
|
115094
115094
|
}
|
|
115095
|
-
return new this(
|
|
115095
|
+
return new this(abi33, bytecode, runner);
|
|
115096
115096
|
}
|
|
115097
115097
|
};
|
|
115098
115098
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -120020,8 +120020,8 @@ var require_provider_etherscan = __commonJS({
|
|
|
120020
120020
|
action: "getabi",
|
|
120021
120021
|
address
|
|
120022
120022
|
});
|
|
120023
|
-
const
|
|
120024
|
-
return new index_js_2.Contract(address,
|
|
120023
|
+
const abi33 = JSON.parse(resp);
|
|
120024
|
+
return new index_js_2.Contract(address, abi33, this);
|
|
120025
120025
|
} catch (error) {
|
|
120026
120026
|
return null;
|
|
120027
120027
|
}
|
|
@@ -145127,9 +145127,9 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145127
145127
|
var vars = process.config && process.config.variables || {};
|
|
145128
145128
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
145129
145129
|
var versions = process.versions;
|
|
145130
|
-
var
|
|
145130
|
+
var abi33 = versions.modules;
|
|
145131
145131
|
if (versions.deno || process.isBun) {
|
|
145132
|
-
|
|
145132
|
+
abi33 = "unsupported";
|
|
145133
145133
|
}
|
|
145134
145134
|
var runtime = isElectron() ? "electron" : "node";
|
|
145135
145135
|
var arch = process.arch;
|
|
@@ -145176,7 +145176,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145176
145176
|
"platform=" + platform,
|
|
145177
145177
|
"arch=" + arch,
|
|
145178
145178
|
"runtime=" + runtime,
|
|
145179
|
-
"abi=" +
|
|
145179
|
+
"abi=" + abi33,
|
|
145180
145180
|
"uv=" + uv,
|
|
145181
145181
|
armv ? "armv=" + armv : "",
|
|
145182
145182
|
"libc=" + libc,
|
|
@@ -145194,7 +145194,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145194
145194
|
}
|
|
145195
145195
|
function resolveFile(prebuilds) {
|
|
145196
145196
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
145197
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
145197
|
+
var candidates = parsed.filter(matchTags(runtime, abi33));
|
|
145198
145198
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
145199
145199
|
if (winner) return path11.join(prebuilds, winner.file);
|
|
145200
145200
|
}
|
|
@@ -145259,11 +145259,11 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145259
145259
|
}
|
|
145260
145260
|
return tags;
|
|
145261
145261
|
}
|
|
145262
|
-
function matchTags(runtime2,
|
|
145262
|
+
function matchTags(runtime2, abi34) {
|
|
145263
145263
|
return function(tags) {
|
|
145264
145264
|
if (tags == null) return false;
|
|
145265
145265
|
if (tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
145266
|
-
if (tags.abi !==
|
|
145266
|
+
if (tags.abi !== abi34 && !tags.napi) return false;
|
|
145267
145267
|
if (tags.uv && tags.uv !== uv) return false;
|
|
145268
145268
|
if (tags.armv && tags.armv !== armv) return false;
|
|
145269
145269
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -151427,11 +151427,11 @@ var require_formatAbi = __commonJS({
|
|
|
151427
151427
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
151428
151428
|
exports2.formatAbi = formatAbi;
|
|
151429
151429
|
var formatAbiItem_js_1 = require_formatAbiItem();
|
|
151430
|
-
function formatAbi(
|
|
151430
|
+
function formatAbi(abi33) {
|
|
151431
151431
|
const signatures = [];
|
|
151432
|
-
const length =
|
|
151432
|
+
const length = abi33.length;
|
|
151433
151433
|
for (let i = 0; i < length; i++) {
|
|
151434
|
-
const abiItem =
|
|
151434
|
+
const abiItem = abi33[i];
|
|
151435
151435
|
const signature = (0, formatAbiItem_js_1.formatAbiItem)(abiItem);
|
|
151436
151436
|
signatures.push(signature);
|
|
151437
151437
|
}
|
|
@@ -152194,15 +152194,15 @@ var require_parseAbi = __commonJS({
|
|
|
152194
152194
|
var utils_js_1 = require_utils15();
|
|
152195
152195
|
function parseAbi3(signatures) {
|
|
152196
152196
|
const structs = (0, structs_js_1.parseStructs)(signatures);
|
|
152197
|
-
const
|
|
152197
|
+
const abi33 = [];
|
|
152198
152198
|
const length = signatures.length;
|
|
152199
152199
|
for (let i = 0; i < length; i++) {
|
|
152200
152200
|
const signature = signatures[i];
|
|
152201
152201
|
if ((0, signatures_js_1.isStructSignature)(signature))
|
|
152202
152202
|
continue;
|
|
152203
|
-
|
|
152203
|
+
abi33.push((0, utils_js_1.parseSignature)(signature, structs));
|
|
152204
152204
|
}
|
|
152205
|
-
return
|
|
152205
|
+
return abi33;
|
|
152206
152206
|
}
|
|
152207
152207
|
}
|
|
152208
152208
|
});
|
|
@@ -160094,11 +160094,11 @@ var require_formatAbi2 = __commonJS({
|
|
|
160094
160094
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
160095
160095
|
exports2.formatAbi = formatAbi;
|
|
160096
160096
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
160097
|
-
function formatAbi(
|
|
160097
|
+
function formatAbi(abi33) {
|
|
160098
160098
|
const signatures = [];
|
|
160099
|
-
const length =
|
|
160099
|
+
const length = abi33.length;
|
|
160100
160100
|
for (let i = 0; i < length; i++) {
|
|
160101
|
-
const abiItem =
|
|
160101
|
+
const abiItem = abi33[i];
|
|
160102
160102
|
const signature = (0, formatAbiItem_js_1.formatAbiItem)(abiItem);
|
|
160103
160103
|
signatures.push(signature);
|
|
160104
160104
|
}
|
|
@@ -160838,15 +160838,15 @@ var require_parseAbi2 = __commonJS({
|
|
|
160838
160838
|
var utils_js_1 = require_utils16();
|
|
160839
160839
|
function parseAbi3(signatures) {
|
|
160840
160840
|
const structs = (0, structs_js_1.parseStructs)(signatures);
|
|
160841
|
-
const
|
|
160841
|
+
const abi33 = [];
|
|
160842
160842
|
const length = signatures.length;
|
|
160843
160843
|
for (let i = 0; i < length; i++) {
|
|
160844
160844
|
const signature = signatures[i];
|
|
160845
160845
|
if ((0, signatures_js_1.isStructSignature)(signature))
|
|
160846
160846
|
continue;
|
|
160847
|
-
|
|
160847
|
+
abi33.push((0, utils_js_1.parseSignature)(signature, structs));
|
|
160848
160848
|
}
|
|
160849
|
-
return
|
|
160849
|
+
return abi33;
|
|
160850
160850
|
}
|
|
160851
160851
|
}
|
|
160852
160852
|
});
|
|
@@ -161138,7 +161138,7 @@ var require_version29 = __commonJS({
|
|
|
161138
161138
|
"use strict";
|
|
161139
161139
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
161140
161140
|
exports2.version = void 0;
|
|
161141
|
-
exports2.version = "2.22.
|
|
161141
|
+
exports2.version = "2.22.11";
|
|
161142
161142
|
}
|
|
161143
161143
|
});
|
|
161144
161144
|
|
|
@@ -163141,9 +163141,9 @@ var require_getAbiItem = __commonJS({
|
|
|
163141
163141
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
163142
163142
|
var toFunctionSelector_js_1 = require_toFunctionSelector();
|
|
163143
163143
|
function getAbiItem2(parameters) {
|
|
163144
|
-
const { abi:
|
|
163144
|
+
const { abi: abi33, args = [], name } = parameters;
|
|
163145
163145
|
const isSelector = (0, isHex_js_1.isHex)(name, { strict: false });
|
|
163146
|
-
const abiItems =
|
|
163146
|
+
const abiItems = abi33.filter((abiItem) => {
|
|
163147
163147
|
if (isSelector) {
|
|
163148
163148
|
if (abiItem.type === "function")
|
|
163149
163149
|
return (0, toFunctionSelector_js_1.toFunctionSelector)(abiItem) === name;
|
|
@@ -163268,10 +163268,10 @@ var require_encodeEventTopics = __commonJS({
|
|
|
163268
163268
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
163269
163269
|
var docsPath6 = "/docs/contract/encodeEventTopics";
|
|
163270
163270
|
function encodeEventTopics2(parameters) {
|
|
163271
|
-
const { abi:
|
|
163272
|
-
let abiItem =
|
|
163271
|
+
const { abi: abi33, eventName, args } = parameters;
|
|
163272
|
+
let abiItem = abi33[0];
|
|
163273
163273
|
if (eventName) {
|
|
163274
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
163274
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, name: eventName });
|
|
163275
163275
|
if (!item)
|
|
163276
163276
|
throw new abi_js_1.AbiEventNotFoundError(eventName, { docsPath: docsPath6 });
|
|
163277
163277
|
abiItem = item;
|
|
@@ -163332,12 +163332,12 @@ var require_createContractEventFilter = __commonJS({
|
|
|
163332
163332
|
var toHex_js_1 = require_toHex();
|
|
163333
163333
|
var createFilterRequestScope_js_1 = require_createFilterRequestScope();
|
|
163334
163334
|
async function createContractEventFilter2(client, parameters) {
|
|
163335
|
-
const { address, abi:
|
|
163335
|
+
const { address, abi: abi33, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
163336
163336
|
const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
|
|
163337
163337
|
method: "eth_newFilter"
|
|
163338
163338
|
});
|
|
163339
163339
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
163340
|
-
abi:
|
|
163340
|
+
abi: abi33,
|
|
163341
163341
|
args,
|
|
163342
163342
|
eventName
|
|
163343
163343
|
}) : void 0;
|
|
@@ -163353,7 +163353,7 @@ var require_createContractEventFilter = __commonJS({
|
|
|
163353
163353
|
]
|
|
163354
163354
|
});
|
|
163355
163355
|
return {
|
|
163356
|
-
abi:
|
|
163356
|
+
abi: abi33,
|
|
163357
163357
|
args,
|
|
163358
163358
|
eventName,
|
|
163359
163359
|
id,
|
|
@@ -163391,11 +163391,11 @@ var require_prepareEncodeFunctionData = __commonJS({
|
|
|
163391
163391
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
163392
163392
|
var docsPath6 = "/docs/contract/encodeFunctionData";
|
|
163393
163393
|
function prepareEncodeFunctionData2(parameters) {
|
|
163394
|
-
const { abi:
|
|
163395
|
-
let abiItem =
|
|
163394
|
+
const { abi: abi33, args, functionName } = parameters;
|
|
163395
|
+
let abiItem = abi33[0];
|
|
163396
163396
|
if (functionName) {
|
|
163397
163397
|
const item = (0, getAbiItem_js_1.getAbiItem)({
|
|
163398
|
-
abi:
|
|
163398
|
+
abi: abi33,
|
|
163399
163399
|
args,
|
|
163400
163400
|
name: functionName
|
|
163401
163401
|
});
|
|
@@ -163424,12 +163424,12 @@ var require_encodeFunctionData = __commonJS({
|
|
|
163424
163424
|
var prepareEncodeFunctionData_js_1 = require_prepareEncodeFunctionData();
|
|
163425
163425
|
function encodeFunctionData2(parameters) {
|
|
163426
163426
|
const { args } = parameters;
|
|
163427
|
-
const { abi:
|
|
163427
|
+
const { abi: abi33, functionName } = (() => {
|
|
163428
163428
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
163429
163429
|
return parameters;
|
|
163430
163430
|
return (0, prepareEncodeFunctionData_js_1.prepareEncodeFunctionData)(parameters);
|
|
163431
163431
|
})();
|
|
163432
|
-
const abiItem =
|
|
163432
|
+
const abiItem = abi33[0];
|
|
163433
163433
|
const signature = functionName;
|
|
163434
163434
|
const data = "inputs" in abiItem && abiItem.inputs ? (0, encodeAbiParameters_js_1.encodeAbiParameters)(abiItem.inputs, args ?? []) : void 0;
|
|
163435
163435
|
return (0, concat_js_1.concatHex)([signature, data ?? "0x"]);
|
|
@@ -163961,11 +163961,11 @@ var require_decodeErrorResult = __commonJS({
|
|
|
163961
163961
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
163962
163962
|
var formatAbiItem_js_1 = require_formatAbiItem3();
|
|
163963
163963
|
function decodeErrorResult2(parameters) {
|
|
163964
|
-
const { abi:
|
|
163964
|
+
const { abi: abi33, data } = parameters;
|
|
163965
163965
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
163966
163966
|
if (signature === "0x")
|
|
163967
163967
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
163968
|
-
const abi_ = [...
|
|
163968
|
+
const abi_ = [...abi33 || [], solidity_js_1.solidityError, solidity_js_1.solidityPanic];
|
|
163969
163969
|
const abiItem = abi_.find((x) => x.type === "error" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
163970
163970
|
if (!abiItem)
|
|
163971
163971
|
throw new abi_js_1.AbiErrorSignatureNotFoundError(signature, {
|
|
@@ -164387,8 +164387,8 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
164387
164387
|
};
|
|
164388
164388
|
exports2.CallExecutionError = CallExecutionError2;
|
|
164389
164389
|
var ContractFunctionExecutionError2 = class extends base_js_1.BaseError {
|
|
164390
|
-
constructor(cause, { abi:
|
|
164391
|
-
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
164390
|
+
constructor(cause, { abi: abi33, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
164391
|
+
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, args, name: functionName });
|
|
164392
164392
|
const formattedArgs = abiItem ? (0, formatAbiItemWithArgs_js_1.formatAbiItemWithArgs)({
|
|
164393
164393
|
abiItem,
|
|
164394
164394
|
args,
|
|
@@ -164454,7 +164454,7 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
164454
164454
|
writable: true,
|
|
164455
164455
|
value: void 0
|
|
164456
164456
|
});
|
|
164457
|
-
this.abi =
|
|
164457
|
+
this.abi = abi33;
|
|
164458
164458
|
this.args = args;
|
|
164459
164459
|
this.cause = cause;
|
|
164460
164460
|
this.contractAddress = contractAddress;
|
|
@@ -164464,14 +164464,14 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
164464
164464
|
};
|
|
164465
164465
|
exports2.ContractFunctionExecutionError = ContractFunctionExecutionError2;
|
|
164466
164466
|
var ContractFunctionRevertedError2 = class extends base_js_1.BaseError {
|
|
164467
|
-
constructor({ abi:
|
|
164467
|
+
constructor({ abi: abi33, data, functionName, message }) {
|
|
164468
164468
|
let cause;
|
|
164469
164469
|
let decodedData = void 0;
|
|
164470
164470
|
let metaMessages;
|
|
164471
164471
|
let reason;
|
|
164472
164472
|
if (data && data !== "0x") {
|
|
164473
164473
|
try {
|
|
164474
|
-
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi:
|
|
164474
|
+
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi: abi33, data });
|
|
164475
164475
|
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
164476
164476
|
if (errorName === "Error") {
|
|
164477
164477
|
reason = errorArgs[0];
|
|
@@ -165064,7 +165064,7 @@ var require_getContractError = __commonJS({
|
|
|
165064
165064
|
var request_js_1 = require_request();
|
|
165065
165065
|
var rpc_js_1 = require_rpc();
|
|
165066
165066
|
var EXECUTION_REVERTED_ERROR_CODE2 = 3;
|
|
165067
|
-
function getContractError2(err, { abi:
|
|
165067
|
+
function getContractError2(err, { abi: abi33, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
165068
165068
|
const error = err instanceof contract_js_1.RawContractError ? err : err instanceof base_js_1.BaseError ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
165069
165069
|
const { code, data, details, message, shortMessage } = error;
|
|
165070
165070
|
const cause = (() => {
|
|
@@ -165072,7 +165072,7 @@ var require_getContractError = __commonJS({
|
|
|
165072
165072
|
return new contract_js_1.ContractFunctionZeroDataError({ functionName });
|
|
165073
165073
|
if ([EXECUTION_REVERTED_ERROR_CODE2, rpc_js_1.InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
165074
165074
|
return new contract_js_1.ContractFunctionRevertedError({
|
|
165075
|
-
abi:
|
|
165075
|
+
abi: abi33,
|
|
165076
165076
|
data: typeof data === "object" ? data.data : data,
|
|
165077
165077
|
functionName,
|
|
165078
165078
|
message: error instanceof request_js_1.RpcRequestError ? details : shortMessage ?? message
|
|
@@ -165081,7 +165081,7 @@ var require_getContractError = __commonJS({
|
|
|
165081
165081
|
return err;
|
|
165082
165082
|
})();
|
|
165083
165083
|
return new contract_js_1.ContractFunctionExecutionError(cause, {
|
|
165084
|
-
abi:
|
|
165084
|
+
abi: abi33,
|
|
165085
165085
|
args,
|
|
165086
165086
|
contractAddress: address,
|
|
165087
165087
|
docsPath: docsPath6,
|
|
@@ -170063,9 +170063,9 @@ var require_estimateContractGas = __commonJS({
|
|
|
170063
170063
|
var getAction_js_1 = require_getAction();
|
|
170064
170064
|
var estimateGas_js_1 = require_estimateGas2();
|
|
170065
170065
|
async function estimateContractGas2(client, parameters) {
|
|
170066
|
-
const { abi:
|
|
170066
|
+
const { abi: abi33, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
170067
170067
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
170068
|
-
abi:
|
|
170068
|
+
abi: abi33,
|
|
170069
170069
|
args,
|
|
170070
170070
|
functionName
|
|
170071
170071
|
});
|
|
@@ -170079,7 +170079,7 @@ var require_estimateContractGas = __commonJS({
|
|
|
170079
170079
|
} catch (error) {
|
|
170080
170080
|
const account = request.account ? (0, parseAccount_js_1.parseAccount)(request.account) : void 0;
|
|
170081
170081
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
170082
|
-
abi:
|
|
170082
|
+
abi: abi33,
|
|
170083
170083
|
address,
|
|
170084
170084
|
args,
|
|
170085
170085
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -170123,15 +170123,15 @@ var require_decodeEventLog = __commonJS({
|
|
|
170123
170123
|
var formatAbiItem_js_1 = require_formatAbiItem3();
|
|
170124
170124
|
var docsPath6 = "/docs/contract/decodeEventLog";
|
|
170125
170125
|
function decodeEventLog2(parameters) {
|
|
170126
|
-
const { abi:
|
|
170126
|
+
const { abi: abi33, data, strict: strict_, topics } = parameters;
|
|
170127
170127
|
const strict = strict_ ?? true;
|
|
170128
170128
|
const [signature, ...argTopics] = topics;
|
|
170129
170129
|
if (!signature)
|
|
170130
170130
|
throw new abi_js_1.AbiEventSignatureEmptyTopicsError({ docsPath: docsPath6 });
|
|
170131
170131
|
const abiItem = (() => {
|
|
170132
|
-
if (
|
|
170133
|
-
return
|
|
170134
|
-
return
|
|
170132
|
+
if (abi33.length === 1)
|
|
170133
|
+
return abi33[0];
|
|
170134
|
+
return abi33.find((x) => x.type === "event" && signature === (0, toEventSelector_js_1.toEventSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
170135
170135
|
})();
|
|
170136
170136
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
170137
170137
|
throw new abi_js_1.AbiEventSignatureNotFoundError(signature, { docsPath: docsPath6 });
|
|
@@ -170211,7 +170211,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
170211
170211
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
170212
170212
|
var decodeEventLog_js_1 = require_decodeEventLog();
|
|
170213
170213
|
function parseEventLogs2(parameters) {
|
|
170214
|
-
const { abi:
|
|
170214
|
+
const { abi: abi33, args, logs, strict = true } = parameters;
|
|
170215
170215
|
const eventName = (() => {
|
|
170216
170216
|
if (!parameters.eventName)
|
|
170217
170217
|
return void 0;
|
|
@@ -170221,7 +170221,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
170221
170221
|
})();
|
|
170222
170222
|
return logs.map((log2) => {
|
|
170223
170223
|
try {
|
|
170224
|
-
const abiItem =
|
|
170224
|
+
const abiItem = abi33.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === (0, toEventSelector_js_1.toEventSelector)(abiItem2));
|
|
170225
170225
|
if (!abiItem)
|
|
170226
170226
|
return null;
|
|
170227
170227
|
const event = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
@@ -170382,9 +170382,9 @@ var require_getContractEvents = __commonJS({
|
|
|
170382
170382
|
var getAction_js_1 = require_getAction();
|
|
170383
170383
|
var getLogs_js_1 = require_getLogs();
|
|
170384
170384
|
async function getContractEvents2(client, parameters) {
|
|
170385
|
-
const { abi:
|
|
170386
|
-
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
170387
|
-
const events = !event ?
|
|
170385
|
+
const { abi: abi33, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
170386
|
+
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, name: eventName }) : void 0;
|
|
170387
|
+
const events = !event ? abi33.filter((x) => x.type === "event") : void 0;
|
|
170388
170388
|
return (0, getAction_js_1.getAction)(client, getLogs_js_1.getLogs, "getLogs")({
|
|
170389
170389
|
address,
|
|
170390
170390
|
args,
|
|
@@ -170410,10 +170410,10 @@ var require_decodeFunctionResult = __commonJS({
|
|
|
170410
170410
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
170411
170411
|
var docsPath6 = "/docs/contract/decodeFunctionResult";
|
|
170412
170412
|
function decodeFunctionResult2(parameters) {
|
|
170413
|
-
const { abi:
|
|
170414
|
-
let abiItem =
|
|
170413
|
+
const { abi: abi33, args, functionName, data } = parameters;
|
|
170414
|
+
let abiItem = abi33[0];
|
|
170415
170415
|
if (functionName) {
|
|
170416
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
170416
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, args, name: functionName });
|
|
170417
170417
|
if (!item)
|
|
170418
170418
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
170419
170419
|
abiItem = item;
|
|
@@ -171968,10 +171968,10 @@ var require_encodeDeployData = __commonJS({
|
|
|
171968
171968
|
var encodeAbiParameters_js_1 = require_encodeAbiParameters();
|
|
171969
171969
|
var docsPath6 = "/docs/contract/encodeDeployData";
|
|
171970
171970
|
function encodeDeployData2(parameters) {
|
|
171971
|
-
const { abi:
|
|
171971
|
+
const { abi: abi33, args, bytecode } = parameters;
|
|
171972
171972
|
if (!args || args.length === 0)
|
|
171973
171973
|
return bytecode;
|
|
171974
|
-
const description =
|
|
171974
|
+
const description = abi33.find((x) => "type" in x && x.type === "constructor");
|
|
171975
171975
|
if (!description)
|
|
171976
171976
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
171977
171977
|
if (!("inputs" in description))
|
|
@@ -172510,9 +172510,9 @@ var require_readContract = __commonJS({
|
|
|
172510
172510
|
var getAction_js_1 = require_getAction();
|
|
172511
172511
|
var call_js_1 = require_call();
|
|
172512
172512
|
async function readContract2(client, parameters) {
|
|
172513
|
-
const { abi:
|
|
172513
|
+
const { abi: abi33, address, args, functionName, ...rest2 } = parameters;
|
|
172514
172514
|
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
172515
|
-
abi:
|
|
172515
|
+
abi: abi33,
|
|
172516
172516
|
args,
|
|
172517
172517
|
functionName
|
|
172518
172518
|
});
|
|
@@ -172523,14 +172523,14 @@ var require_readContract = __commonJS({
|
|
|
172523
172523
|
to: address
|
|
172524
172524
|
});
|
|
172525
172525
|
return (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
172526
|
-
abi:
|
|
172526
|
+
abi: abi33,
|
|
172527
172527
|
args,
|
|
172528
172528
|
functionName,
|
|
172529
172529
|
data: data || "0x"
|
|
172530
172530
|
});
|
|
172531
172531
|
} catch (error) {
|
|
172532
172532
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
172533
|
-
abi:
|
|
172533
|
+
abi: abi33,
|
|
172534
172534
|
address,
|
|
172535
172535
|
args,
|
|
172536
172536
|
docsPath: "/docs/contract/readContract",
|
|
@@ -172554,9 +172554,9 @@ var require_simulateContract = __commonJS({
|
|
|
172554
172554
|
var getAction_js_1 = require_getAction();
|
|
172555
172555
|
var call_js_1 = require_call();
|
|
172556
172556
|
async function simulateContract2(client, parameters) {
|
|
172557
|
-
const { abi:
|
|
172557
|
+
const { abi: abi33, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
172558
172558
|
const account = callRequest.account ? (0, parseAccount_js_1.parseAccount)(callRequest.account) : client.account;
|
|
172559
|
-
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
172559
|
+
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi33, args, functionName });
|
|
172560
172560
|
try {
|
|
172561
172561
|
const { data } = await (0, getAction_js_1.getAction)(client, call_js_1.call, "call")({
|
|
172562
172562
|
batch: false,
|
|
@@ -172566,12 +172566,12 @@ var require_simulateContract = __commonJS({
|
|
|
172566
172566
|
account
|
|
172567
172567
|
});
|
|
172568
172568
|
const result = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
172569
|
-
abi:
|
|
172569
|
+
abi: abi33,
|
|
172570
172570
|
args,
|
|
172571
172571
|
functionName,
|
|
172572
172572
|
data: data || "0x"
|
|
172573
172573
|
});
|
|
172574
|
-
const minimizedAbi =
|
|
172574
|
+
const minimizedAbi = abi33.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
172575
172575
|
return {
|
|
172576
172576
|
result,
|
|
172577
172577
|
request: {
|
|
@@ -172586,7 +172586,7 @@ var require_simulateContract = __commonJS({
|
|
|
172586
172586
|
};
|
|
172587
172587
|
} catch (error) {
|
|
172588
172588
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
172589
|
-
abi:
|
|
172589
|
+
abi: abi33,
|
|
172590
172590
|
address,
|
|
172591
172591
|
args,
|
|
172592
172592
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -172828,7 +172828,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
172828
172828
|
var getFilterChanges_js_1 = require_getFilterChanges();
|
|
172829
172829
|
var uninstallFilter_js_1 = require_uninstallFilter();
|
|
172830
172830
|
function watchContractEvent2(client, parameters) {
|
|
172831
|
-
const { abi:
|
|
172831
|
+
const { abi: abi33, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
172832
172832
|
const enablePolling = (() => {
|
|
172833
172833
|
if (typeof poll_ !== "undefined")
|
|
172834
172834
|
return poll_;
|
|
@@ -172863,7 +172863,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
172863
172863
|
if (!initialized) {
|
|
172864
172864
|
try {
|
|
172865
172865
|
filter = await (0, getAction_js_1.getAction)(client, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
172866
|
-
abi:
|
|
172866
|
+
abi: abi33,
|
|
172867
172867
|
address,
|
|
172868
172868
|
args,
|
|
172869
172869
|
eventName,
|
|
@@ -172883,7 +172883,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
172883
172883
|
const blockNumber = await (0, getAction_js_1.getAction)(client, getBlockNumber_js_1.getBlockNumber, "getBlockNumber")({});
|
|
172884
172884
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
172885
172885
|
logs = await (0, getAction_js_1.getAction)(client, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
172886
|
-
abi:
|
|
172886
|
+
abi: abi33,
|
|
172887
172887
|
address,
|
|
172888
172888
|
args,
|
|
172889
172889
|
eventName,
|
|
@@ -172947,7 +172947,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
172947
172947
|
return client.transport;
|
|
172948
172948
|
})();
|
|
172949
172949
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
172950
|
-
abi:
|
|
172950
|
+
abi: abi33,
|
|
172951
172951
|
eventName,
|
|
172952
172952
|
args
|
|
172953
172953
|
}) : [];
|
|
@@ -172959,7 +172959,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
172959
172959
|
const log2 = data.result;
|
|
172960
172960
|
try {
|
|
172961
172961
|
const { eventName: eventName2, args: args2 } = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
172962
|
-
abi:
|
|
172962
|
+
abi: abi33,
|
|
172963
172963
|
data: log2.data,
|
|
172964
172964
|
topics: log2.topics,
|
|
172965
172965
|
strict: strict_
|
|
@@ -173257,14 +173257,14 @@ var require_writeContract = __commonJS({
|
|
|
173257
173257
|
var getAction_js_1 = require_getAction();
|
|
173258
173258
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
173259
173259
|
async function writeContract2(client, parameters) {
|
|
173260
|
-
const { abi:
|
|
173260
|
+
const { abi: abi33, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
173261
173261
|
if (typeof account_ === "undefined")
|
|
173262
173262
|
throw new account_js_1.AccountNotFoundError({
|
|
173263
173263
|
docsPath: "/docs/contract/writeContract"
|
|
173264
173264
|
});
|
|
173265
173265
|
const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : null;
|
|
173266
173266
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
173267
|
-
abi:
|
|
173267
|
+
abi: abi33,
|
|
173268
173268
|
args,
|
|
173269
173269
|
functionName
|
|
173270
173270
|
});
|
|
@@ -173277,7 +173277,7 @@ var require_writeContract = __commonJS({
|
|
|
173277
173277
|
});
|
|
173278
173278
|
} catch (error) {
|
|
173279
173279
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
173280
|
-
abi:
|
|
173280
|
+
abi: abi33,
|
|
173281
173281
|
address,
|
|
173282
173282
|
args,
|
|
173283
173283
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -173305,7 +173305,7 @@ var require_getContract = __commonJS({
|
|
|
173305
173305
|
var simulateContract_js_1 = require_simulateContract();
|
|
173306
173306
|
var watchContractEvent_js_1 = require_watchContractEvent();
|
|
173307
173307
|
var writeContract_js_1 = require_writeContract();
|
|
173308
|
-
function getContract2({ abi:
|
|
173308
|
+
function getContract2({ abi: abi33, address, client: client_ }) {
|
|
173309
173309
|
const client = client_;
|
|
173310
173310
|
const [publicClient, walletClient] = (() => {
|
|
173311
173311
|
if (!client)
|
|
@@ -173324,7 +173324,7 @@ var require_getContract = __commonJS({
|
|
|
173324
173324
|
let hasReadFunction = false;
|
|
173325
173325
|
let hasWriteFunction = false;
|
|
173326
173326
|
let hasEvent = false;
|
|
173327
|
-
for (const item of
|
|
173327
|
+
for (const item of abi33) {
|
|
173328
173328
|
if (item.type === "function")
|
|
173329
173329
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
173330
173330
|
hasReadFunction = true;
|
|
@@ -173342,7 +173342,7 @@ var require_getContract = __commonJS({
|
|
|
173342
173342
|
return (...parameters) => {
|
|
173343
173343
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173344
173344
|
return (0, getAction_js_1.getAction)(publicClient, readContract_js_1.readContract, "readContract")({
|
|
173345
|
-
abi:
|
|
173345
|
+
abi: abi33,
|
|
173346
173346
|
address,
|
|
173347
173347
|
functionName,
|
|
173348
173348
|
args,
|
|
@@ -173357,7 +173357,7 @@ var require_getContract = __commonJS({
|
|
|
173357
173357
|
return (...parameters) => {
|
|
173358
173358
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173359
173359
|
return (0, getAction_js_1.getAction)(publicClient, simulateContract_js_1.simulateContract, "simulateContract")({
|
|
173360
|
-
abi:
|
|
173360
|
+
abi: abi33,
|
|
173361
173361
|
address,
|
|
173362
173362
|
functionName,
|
|
173363
173363
|
args,
|
|
@@ -173370,10 +173370,10 @@ var require_getContract = __commonJS({
|
|
|
173370
173370
|
contract.createEventFilter = new Proxy({}, {
|
|
173371
173371
|
get(_, eventName) {
|
|
173372
173372
|
return (...parameters) => {
|
|
173373
|
-
const abiEvent =
|
|
173373
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
173374
173374
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173375
173375
|
return (0, getAction_js_1.getAction)(publicClient, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
173376
|
-
abi:
|
|
173376
|
+
abi: abi33,
|
|
173377
173377
|
address,
|
|
173378
173378
|
eventName,
|
|
173379
173379
|
args,
|
|
@@ -173385,10 +173385,10 @@ var require_getContract = __commonJS({
|
|
|
173385
173385
|
contract.getEvents = new Proxy({}, {
|
|
173386
173386
|
get(_, eventName) {
|
|
173387
173387
|
return (...parameters) => {
|
|
173388
|
-
const abiEvent =
|
|
173388
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
173389
173389
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173390
173390
|
return (0, getAction_js_1.getAction)(publicClient, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
173391
|
-
abi:
|
|
173391
|
+
abi: abi33,
|
|
173392
173392
|
address,
|
|
173393
173393
|
eventName,
|
|
173394
173394
|
args,
|
|
@@ -173400,10 +173400,10 @@ var require_getContract = __commonJS({
|
|
|
173400
173400
|
contract.watchEvent = new Proxy({}, {
|
|
173401
173401
|
get(_, eventName) {
|
|
173402
173402
|
return (...parameters) => {
|
|
173403
|
-
const abiEvent =
|
|
173403
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
173404
173404
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173405
173405
|
return (0, getAction_js_1.getAction)(publicClient, watchContractEvent_js_1.watchContractEvent, "watchContractEvent")({
|
|
173406
|
-
abi:
|
|
173406
|
+
abi: abi33,
|
|
173407
173407
|
address,
|
|
173408
173408
|
eventName,
|
|
173409
173409
|
args,
|
|
@@ -173421,7 +173421,7 @@ var require_getContract = __commonJS({
|
|
|
173421
173421
|
return (...parameters) => {
|
|
173422
173422
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173423
173423
|
return (0, getAction_js_1.getAction)(walletClient, writeContract_js_1.writeContract, "writeContract")({
|
|
173424
|
-
abi:
|
|
173424
|
+
abi: abi33,
|
|
173425
173425
|
address,
|
|
173426
173426
|
functionName,
|
|
173427
173427
|
args,
|
|
@@ -173439,7 +173439,7 @@ var require_getContract = __commonJS({
|
|
|
173439
173439
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173440
173440
|
const client2 = publicClient ?? walletClient;
|
|
173441
173441
|
return (0, getAction_js_1.getAction)(client2, estimateContractGas_js_1.estimateContractGas, "estimateContractGas")({
|
|
173442
|
-
abi:
|
|
173442
|
+
abi: abi33,
|
|
173443
173443
|
address,
|
|
173444
173444
|
functionName,
|
|
173445
173445
|
args,
|
|
@@ -173451,7 +173451,7 @@ var require_getContract = __commonJS({
|
|
|
173451
173451
|
});
|
|
173452
173452
|
}
|
|
173453
173453
|
contract.address = address;
|
|
173454
|
-
contract.abi =
|
|
173454
|
+
contract.abi = abi33;
|
|
173455
173455
|
return contract;
|
|
173456
173456
|
}
|
|
173457
173457
|
function getFunctionParameters2(values) {
|
|
@@ -175062,7 +175062,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
175062
175062
|
const { address, factory, factoryData } = parameters;
|
|
175063
175063
|
try {
|
|
175064
175064
|
const [fields, name, version5, chainId, verifyingContract, salt, extensions] = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract, "readContract")({
|
|
175065
|
-
abi:
|
|
175065
|
+
abi: abi33,
|
|
175066
175066
|
address,
|
|
175067
175067
|
functionName: "eip712Domain",
|
|
175068
175068
|
factory,
|
|
@@ -175087,7 +175087,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
175087
175087
|
throw error;
|
|
175088
175088
|
}
|
|
175089
175089
|
}
|
|
175090
|
-
var
|
|
175090
|
+
var abi33 = [
|
|
175091
175091
|
{
|
|
175092
175092
|
inputs: [],
|
|
175093
175093
|
name: "eip712Domain",
|
|
@@ -179415,9 +179415,9 @@ var require_decodeFunctionData = __commonJS({
|
|
|
179415
179415
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
179416
179416
|
var formatAbiItem_js_1 = require_formatAbiItem3();
|
|
179417
179417
|
function decodeFunctionData2(parameters) {
|
|
179418
|
-
const { abi:
|
|
179418
|
+
const { abi: abi33, data } = parameters;
|
|
179419
179419
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
179420
|
-
const description =
|
|
179420
|
+
const description = abi33.find((x) => x.type === "function" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
179421
179421
|
if (!description)
|
|
179422
179422
|
throw new abi_js_1.AbiFunctionSignatureNotFoundError(signature, {
|
|
179423
179423
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -179444,10 +179444,10 @@ var require_encodeErrorResult = __commonJS({
|
|
|
179444
179444
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
179445
179445
|
var docsPath6 = "/docs/contract/encodeErrorResult";
|
|
179446
179446
|
function encodeErrorResult(parameters) {
|
|
179447
|
-
const { abi:
|
|
179448
|
-
let abiItem =
|
|
179447
|
+
const { abi: abi33, errorName, args } = parameters;
|
|
179448
|
+
let abiItem = abi33[0];
|
|
179449
179449
|
if (errorName) {
|
|
179450
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
179450
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, args, name: errorName });
|
|
179451
179451
|
if (!item)
|
|
179452
179452
|
throw new abi_js_1.AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });
|
|
179453
179453
|
abiItem = item;
|
|
@@ -179478,10 +179478,10 @@ var require_encodeFunctionResult = __commonJS({
|
|
|
179478
179478
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
179479
179479
|
var docsPath6 = "/docs/contract/encodeFunctionResult";
|
|
179480
179480
|
function encodeFunctionResult(parameters) {
|
|
179481
|
-
const { abi:
|
|
179482
|
-
let abiItem =
|
|
179481
|
+
const { abi: abi33, functionName, result } = parameters;
|
|
179482
|
+
let abiItem = abi33[0];
|
|
179483
179483
|
if (functionName) {
|
|
179484
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
179484
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi33, name: functionName });
|
|
179485
179485
|
if (!item)
|
|
179486
179486
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
179487
179487
|
abiItem = item;
|
|
@@ -181764,9 +181764,9 @@ var require_multicall2 = __commonJS({
|
|
|
181764
181764
|
let currentChunk = 0;
|
|
181765
181765
|
let currentChunkSize = 0;
|
|
181766
181766
|
for (let i = 0; i < contracts2.length; i++) {
|
|
181767
|
-
const { abi:
|
|
181767
|
+
const { abi: abi33, address, args, functionName } = contracts2[i];
|
|
181768
181768
|
try {
|
|
181769
|
-
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
181769
|
+
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi33, args, functionName });
|
|
181770
181770
|
currentChunkSize += (callData.length - 2) / 2;
|
|
181771
181771
|
if (batchSize > 0 && currentChunkSize > batchSize && chunkedCalls[currentChunk].length > 0) {
|
|
181772
181772
|
currentChunk++;
|
|
@@ -181783,7 +181783,7 @@ var require_multicall2 = __commonJS({
|
|
|
181783
181783
|
];
|
|
181784
181784
|
} catch (err) {
|
|
181785
181785
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
181786
|
-
abi:
|
|
181786
|
+
abi: abi33,
|
|
181787
181787
|
address,
|
|
181788
181788
|
args,
|
|
181789
181789
|
docsPath: "/docs/contract/multicall",
|
|
@@ -181829,14 +181829,14 @@ var require_multicall2 = __commonJS({
|
|
|
181829
181829
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
181830
181830
|
const { returnData, success } = aggregate3Result[j];
|
|
181831
181831
|
const { callData } = chunkedCalls[i][j];
|
|
181832
|
-
const { abi:
|
|
181832
|
+
const { abi: abi33, address, functionName, args } = contracts2[results.length];
|
|
181833
181833
|
try {
|
|
181834
181834
|
if (callData === "0x")
|
|
181835
181835
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
181836
181836
|
if (!success)
|
|
181837
181837
|
throw new contract_js_1.RawContractError({ data: returnData });
|
|
181838
181838
|
const result2 = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
181839
|
-
abi:
|
|
181839
|
+
abi: abi33,
|
|
181840
181840
|
args,
|
|
181841
181841
|
data: returnData,
|
|
181842
181842
|
functionName
|
|
@@ -181844,7 +181844,7 @@ var require_multicall2 = __commonJS({
|
|
|
181844
181844
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
181845
181845
|
} catch (err) {
|
|
181846
181846
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
181847
|
-
abi:
|
|
181847
|
+
abi: abi33,
|
|
181848
181848
|
address,
|
|
181849
181849
|
args,
|
|
181850
181850
|
docsPath: "/docs/contract/multicall",
|
|
@@ -183168,13 +183168,13 @@ var require_simulate = __commonJS({
|
|
|
183168
183168
|
return result.map((block2, i) => ({
|
|
183169
183169
|
...(0, block_js_1.formatBlock)(block2),
|
|
183170
183170
|
calls: block2.calls.map((call2, j) => {
|
|
183171
|
-
const { abi:
|
|
183171
|
+
const { abi: abi33, args, functionName, to } = blocks[i].calls[j];
|
|
183172
183172
|
const data = call2.error?.data ?? call2.returnData;
|
|
183173
183173
|
const gasUsed = BigInt(call2.gasUsed);
|
|
183174
183174
|
const logs = call2.logs?.map((log2) => (0, log_js_1.formatLog)(log2));
|
|
183175
183175
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
183176
|
-
const result2 =
|
|
183177
|
-
abi:
|
|
183176
|
+
const result2 = abi33 ? (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
183177
|
+
abi: abi33,
|
|
183178
183178
|
data,
|
|
183179
183179
|
functionName
|
|
183180
183180
|
}) : null;
|
|
@@ -183189,7 +183189,7 @@ var require_simulate = __commonJS({
|
|
|
183189
183189
|
if (!error2)
|
|
183190
183190
|
return void 0;
|
|
183191
183191
|
return (0, getContractError_js_1.getContractError)(error2, {
|
|
183192
|
-
abi:
|
|
183192
|
+
abi: abi33 ?? [],
|
|
183193
183193
|
address: to,
|
|
183194
183194
|
args,
|
|
183195
183195
|
functionName: functionName ?? "<unknown>"
|
|
@@ -184876,8 +184876,8 @@ var require_deployContract = __commonJS({
|
|
|
184876
184876
|
var encodeDeployData_js_1 = require_encodeDeployData();
|
|
184877
184877
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
184878
184878
|
function deployContract2(walletClient, parameters) {
|
|
184879
|
-
const { abi:
|
|
184880
|
-
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi:
|
|
184879
|
+
const { abi: abi33, args, bytecode, ...request } = parameters;
|
|
184880
|
+
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi: abi33, args, bytecode });
|
|
184881
184881
|
return (0, sendTransaction_js_1.sendTransaction)(walletClient, {
|
|
184882
184882
|
...request,
|
|
184883
184883
|
data: calldata
|
|
@@ -185312,10 +185312,10 @@ var require_decodeDeployData = __commonJS({
|
|
|
185312
185312
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
185313
185313
|
var docsPath6 = "/docs/contract/decodeDeployData";
|
|
185314
185314
|
function decodeDeployData(parameters) {
|
|
185315
|
-
const { abi:
|
|
185315
|
+
const { abi: abi33, bytecode, data } = parameters;
|
|
185316
185316
|
if (data === bytecode)
|
|
185317
185317
|
return { bytecode };
|
|
185318
|
-
const description =
|
|
185318
|
+
const description = abi33.find((x) => "type" in x && x.type === "constructor");
|
|
185319
185319
|
if (!description)
|
|
185320
185320
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
185321
185321
|
if (!("inputs" in description))
|
|
@@ -222358,6 +222358,45 @@ var require_swanSaturnTestnet = __commonJS({
|
|
|
222358
222358
|
}
|
|
222359
222359
|
});
|
|
222360
222360
|
|
|
222361
|
+
// ../../node_modules/viem/_cjs/chains/definitions/swellchain.js
|
|
222362
|
+
var require_swellchain = __commonJS({
|
|
222363
|
+
"../../node_modules/viem/_cjs/chains/definitions/swellchain.js"(exports2) {
|
|
222364
|
+
"use strict";
|
|
222365
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
222366
|
+
exports2.swellchain = void 0;
|
|
222367
|
+
var chainConfig_js_1 = require_chainConfig2();
|
|
222368
|
+
var defineChain_js_1 = require_defineChain();
|
|
222369
|
+
exports2.swellchain = (0, defineChain_js_1.defineChain)({
|
|
222370
|
+
...chainConfig_js_1.chainConfig,
|
|
222371
|
+
id: 1923,
|
|
222372
|
+
name: "Swellchain",
|
|
222373
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
222374
|
+
rpcUrls: {
|
|
222375
|
+
default: {
|
|
222376
|
+
http: [
|
|
222377
|
+
"https://swell-mainnet.alt.technology",
|
|
222378
|
+
"https://rpc.ankr.com/swell"
|
|
222379
|
+
]
|
|
222380
|
+
}
|
|
222381
|
+
},
|
|
222382
|
+
blockExplorers: {
|
|
222383
|
+
default: {
|
|
222384
|
+
name: "Swell Explorer",
|
|
222385
|
+
url: "https://explorer.swellnetwork.io",
|
|
222386
|
+
apiUrl: "https://explorer.swellnetwork.io/api"
|
|
222387
|
+
}
|
|
222388
|
+
},
|
|
222389
|
+
contracts: {
|
|
222390
|
+
...chainConfig_js_1.chainConfig.contracts,
|
|
222391
|
+
multicall3: {
|
|
222392
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
222393
|
+
blockCreated: 1
|
|
222394
|
+
}
|
|
222395
|
+
}
|
|
222396
|
+
});
|
|
222397
|
+
}
|
|
222398
|
+
});
|
|
222399
|
+
|
|
222361
222400
|
// ../../node_modules/viem/_cjs/chains/definitions/swissdlt.js
|
|
222362
222401
|
var require_swissdlt = __commonJS({
|
|
222363
222402
|
"../../node_modules/viem/_cjs/chains/definitions/swissdlt.js"(exports2) {
|
|
@@ -223188,6 +223227,35 @@ var require_ubiq = __commonJS({
|
|
|
223188
223227
|
}
|
|
223189
223228
|
});
|
|
223190
223229
|
|
|
223230
|
+
// ../../node_modules/viem/_cjs/chains/definitions/ultraTestnet.js
|
|
223231
|
+
var require_ultraTestnet = __commonJS({
|
|
223232
|
+
"../../node_modules/viem/_cjs/chains/definitions/ultraTestnet.js"(exports2) {
|
|
223233
|
+
"use strict";
|
|
223234
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
223235
|
+
exports2.ultraTestnet = void 0;
|
|
223236
|
+
var defineChain_js_1 = require_defineChain();
|
|
223237
|
+
exports2.ultraTestnet = (0, defineChain_js_1.defineChain)({
|
|
223238
|
+
id: 18881,
|
|
223239
|
+
name: "Ultra EVM Testnet",
|
|
223240
|
+
nativeCurrency: {
|
|
223241
|
+
decimals: 18,
|
|
223242
|
+
name: "Ultra Token",
|
|
223243
|
+
symbol: "UOS"
|
|
223244
|
+
},
|
|
223245
|
+
rpcUrls: {
|
|
223246
|
+
default: { http: ["https://evm.test.ultra.eosusa.io"] }
|
|
223247
|
+
},
|
|
223248
|
+
blockExplorers: {
|
|
223249
|
+
default: {
|
|
223250
|
+
name: "Ultra EVM Testnet Explorer",
|
|
223251
|
+
url: "https://evmexplorer.testnet.ultra.io"
|
|
223252
|
+
}
|
|
223253
|
+
},
|
|
223254
|
+
testnet: true
|
|
223255
|
+
});
|
|
223256
|
+
}
|
|
223257
|
+
});
|
|
223258
|
+
|
|
223191
223259
|
// ../../node_modules/viem/_cjs/chains/definitions/ultron.js
|
|
223192
223260
|
var require_ultron = __commonJS({
|
|
223193
223261
|
"../../node_modules/viem/_cjs/chains/definitions/ultron.js"(exports2) {
|
|
@@ -225111,9 +225179,9 @@ var require_chains2 = __commonJS({
|
|
|
225111
225179
|
exports2.neoxT4 = exports2.neoxMainnet = exports2.neonMainnet = exports2.neonDevnet = exports2.nearTestnet = exports2.near = exports2.nautilus = exports2.nahmii = exports2.morphSepolia = exports2.morphHolesky = exports2.morph = exports2.moonriver = exports2.moonbeamDev = exports2.moonbeam = exports2.moonbaseAlpha = exports2.modeTestnet = exports2.mode = exports2.mitosisTestnet = exports2.mintSepoliaTestnet = exports2.mint = exports2.mevTestnet = exports2.mev = exports2.metisGoerli = exports2.metis = exports2.meterTestnet = exports2.meter = exports2.metalL2 = exports2.metadium = exports2.metachainIstanbul = exports2.metachain = exports2.merlin = exports2.meld = exports2.mekong = exports2.mchVerse = exports2.matchainTestnet = exports2.matchain = exports2.mapProtocol = exports2.mantleTestnet = exports2.mantleSepoliaTestnet = exports2.mantle = exports2.mantaTestnet = exports2.mantaSepoliaTestnet = exports2.manta = exports2.mandala = exports2.mainnet = exports2.lyra = exports2.lycan = exports2.lumiaTestnet = exports2.lumiaMainnet = exports2.luksoTestnet = void 0;
|
|
225112
225180
|
exports2.rollux = exports2.rivalz = exports2.reyaNetwork = exports2.rei = exports2.redstone = exports2.redbellyTestnet = exports2.redbellyMainnet = exports2.real = exports2.qTestnet = exports2.qMainnet = exports2.ql1 = exports2.pulsechainV4 = exports2.pulsechain = exports2.polygonZkEvmTestnet = exports2.polygonZkEvmCardona = exports2.polygonZkEvm = exports2.polygonMumbai = exports2.polygonAmoy = exports2.polygon = exports2.polterTestnet = exports2.plumeTestnet = exports2.plumeDevnet = exports2.plume = exports2.plinga = exports2.playfiAlbireo = exports2.planq = exports2.phoenix = exports2.pgnTestnet = exports2.pgn = exports2.palmTestnet = exports2.palm = exports2.otimDevnet = exports2.orderlySepolia = exports2.orderly = exports2.optopiaTestnet = exports2.optopia = exports2.optimismSepolia = exports2.optimismGoerli = exports2.optimism = exports2.opBNBTestnet = exports2.opBNB = exports2.oortMainnetDev = exports2.oneWorld = exports2.omax = exports2.okc = exports2.odysseyTestnet = exports2.oasys = exports2.oasisTestnet = exports2.nexilix = exports2.nexi = void 0;
|
|
225113
225181
|
exports2.soneium = exports2.snaxTestnet = exports2.snax = exports2.sketchpad = exports2.skaleTitanTestnet = exports2.skaleTitan = exports2.skaleRazor = exports2.skaleNebulaTestnet = exports2.skaleNebula = exports2.skaleHumanProtocol = exports2.skaleExorde = exports2.skaleEuropaTestnet = exports2.skaleEuropa = exports2.skaleCryptoColosseum = exports2.skaleCryptoBlades = exports2.skaleCalypsoTestnet = exports2.skaleCalypso = exports2.skaleBlockBrawlers = exports2.sixProtocol = exports2.siliconSepolia = exports2.silicon = exports2.shimmerTestnet = exports2.shimmer = exports2.shiden = exports2.shibariumTestnet = exports2.shibarium = exports2.shardeumSphinx = exports2.shapeSepolia = exports2.shape = exports2.sepolia = exports2.seiTestnet = exports2.seiDevnet = exports2.sei = exports2.scrollSepolia = exports2.satoshiVMTestnet = exports2.satoshiVM = exports2.sapphireTestnet = exports2.sapphire = exports2.sanko = exports2.saigon = exports2.saga = exports2.saakuru = exports2.rss3Sepolia = exports2.rss3 = exports2.rootstockTestnet = exports2.rootstock = exports2.rootPorcini = exports2.root = exports2.ronin = exports2.rolluxTestnet = void 0;
|
|
225114
|
-
exports2.
|
|
225115
|
-
exports2.
|
|
225116
|
-
exports2.zoraTestnet = exports2.zoraSepolia = exports2.zora = exports2.zksyncSepoliaTestnet = exports2.zkSyncSepoliaTestnet = exports2.zksyncLocalNode = void 0;
|
|
225182
|
+
exports2.ultronTestnet = exports2.ultron = exports2.ultraTestnet = exports2.ubiq = exports2.tron = exports2.treasureTopaz = exports2.treasure = exports2.tomb = exports2.tiktrixTestnet = exports2.thunderTestnet = exports2.thunderCore = exports2.thetaTestnet = exports2.theta = exports2.that = exports2.thaiChain = exports2.ternoa = exports2.tenet = exports2.telosTestnet = exports2.telos = exports2.telcoinTestnet = exports2.taraxaTestnet = exports2.taraxa = exports2.taikoTestnetSepolia = exports2.taikoKatla = exports2.taikoJolnir = exports2.taikoHekla = exports2.taiko = exports2.syscoinTestnet = exports2.syscoin = exports2.swissdlt = exports2.swellchain = exports2.swanSaturnTestnet = exports2.swanProximaTestnet = exports2.swan = exports2.superseedSepolia = exports2.superseed = exports2.superposition = exports2.superlumio = exports2.stratis = exports2.storyTestnet = exports2.storyOdyssey = exports2.step = exports2.spicy = exports2.sophonTestnet = exports2.sophon = exports2.songbirdTestnet = exports2.songbird = exports2.sonicTestnet = exports2.sonic = exports2.soneiumMinato = void 0;
|
|
225183
|
+
exports2.zksyncLocalHyperchain = exports2.zksyncLocalCustomHyperchain = exports2.zksyncInMemoryNode = exports2.zkSyncInMemoryNode = exports2.zksync = exports2.zkSync = exports2.zkLinkNovaSepoliaTestnet = exports2.zkLinkNova = exports2.zkFairTestnet = exports2.zkFair = exports2.zircuitTestnet = exports2.zircuit = exports2.zilliqaTestnet = exports2.zilliqa = exports2.zhejiang = exports2.zetachainAthensTestnet = exports2.zetachain = exports2.zeniq = exports2.zenchainTestnet = exports2.yooldoVerseTestnet = exports2.yooldoVerse = exports2.xrSepolia = exports2.xrOne = exports2.xLayerTestnet = exports2.x1Testnet = exports2.xLayer = exports2.xdcTestnet = exports2.xdc = exports2.xaiTestnet = exports2.xai = exports2.worldLand = exports2.worldchainSepolia = exports2.worldchain = exports2.wemixTestnet = exports2.wemix = exports2.weaveVMAlphanet = exports2.wanchainTestnet = exports2.wanchain = exports2.visionTestnet = exports2.vision = exports2.victionTestnet = exports2.viction = exports2.velas = exports2.vechain = exports2.vanar = exports2.unreal = exports2.uniqueQuartz = exports2.uniqueOpal = exports2.unique = exports2.unichainSepolia = void 0;
|
|
225184
|
+
exports2.zoraTestnet = exports2.zoraSepolia = exports2.zora = exports2.zksyncSepoliaTestnet = exports2.zkSyncSepoliaTestnet = exports2.zksyncLocalNode = exports2.zkSyncLocalNode = exports2.zksyncLocalHyperchainL1 = void 0;
|
|
225117
225185
|
var abey_js_1 = require_abey();
|
|
225118
225186
|
Object.defineProperty(exports2, "abey", { enumerable: true, get: function() {
|
|
225119
225187
|
return abey_js_1.abey;
|
|
@@ -226794,6 +226862,10 @@ var require_chains2 = __commonJS({
|
|
|
226794
226862
|
Object.defineProperty(exports2, "swanSaturnTestnet", { enumerable: true, get: function() {
|
|
226795
226863
|
return swanSaturnTestnet_js_1.swanSaturnTestnet;
|
|
226796
226864
|
} });
|
|
226865
|
+
var swellchain_js_1 = require_swellchain();
|
|
226866
|
+
Object.defineProperty(exports2, "swellchain", { enumerable: true, get: function() {
|
|
226867
|
+
return swellchain_js_1.swellchain;
|
|
226868
|
+
} });
|
|
226797
226869
|
var swissdlt_js_1 = require_swissdlt();
|
|
226798
226870
|
Object.defineProperty(exports2, "swissdlt", { enumerable: true, get: function() {
|
|
226799
226871
|
return swissdlt_js_1.swissdlt;
|
|
@@ -226902,6 +226974,10 @@ var require_chains2 = __commonJS({
|
|
|
226902
226974
|
Object.defineProperty(exports2, "ubiq", { enumerable: true, get: function() {
|
|
226903
226975
|
return ubiq_js_1.ubiq;
|
|
226904
226976
|
} });
|
|
226977
|
+
var ultraTestnet_js_1 = require_ultraTestnet();
|
|
226978
|
+
Object.defineProperty(exports2, "ultraTestnet", { enumerable: true, get: function() {
|
|
226979
|
+
return ultraTestnet_js_1.ultraTestnet;
|
|
226980
|
+
} });
|
|
226905
226981
|
var ultron_js_1 = require_ultron();
|
|
226906
226982
|
Object.defineProperty(exports2, "ultron", { enumerable: true, get: function() {
|
|
226907
226983
|
return ultron_js_1.ultron;
|
|
@@ -227847,21 +227923,21 @@ var require_BaseContract2 = __commonJS({
|
|
|
227847
227923
|
return this.contractAddress;
|
|
227848
227924
|
};
|
|
227849
227925
|
this.encode = (functionToEncode, args) => {
|
|
227850
|
-
const
|
|
227926
|
+
const abi33 = this.contractAbi;
|
|
227851
227927
|
const functionName = functionToEncode;
|
|
227852
227928
|
const params = args;
|
|
227853
227929
|
return (0, viem_1.encodeFunctionData)({
|
|
227854
|
-
abi:
|
|
227930
|
+
abi: abi33,
|
|
227855
227931
|
functionName,
|
|
227856
227932
|
args: params
|
|
227857
227933
|
});
|
|
227858
227934
|
};
|
|
227859
227935
|
this.estimateGas = async (functionToEstimate, args, options = {}) => {
|
|
227860
227936
|
const contractOptions = this.convertOptions(options);
|
|
227861
|
-
const
|
|
227937
|
+
const abi33 = this.contractAbi;
|
|
227862
227938
|
const params = args;
|
|
227863
227939
|
return (0, actions_1.estimateContractGas)(this.runner, {
|
|
227864
|
-
abi:
|
|
227940
|
+
abi: abi33,
|
|
227865
227941
|
functionName: functionToEstimate,
|
|
227866
227942
|
address: this.getAddress(),
|
|
227867
227943
|
args: params,
|
|
@@ -282132,17 +282208,17 @@ var require_interface3 = __commonJS({
|
|
|
282132
282208
|
* Create a new Interface for the %%fragments%%.
|
|
282133
282209
|
*/
|
|
282134
282210
|
constructor(fragments) {
|
|
282135
|
-
let
|
|
282211
|
+
let abi33 = [];
|
|
282136
282212
|
if (typeof fragments === "string") {
|
|
282137
|
-
|
|
282213
|
+
abi33 = JSON.parse(fragments);
|
|
282138
282214
|
} else {
|
|
282139
|
-
|
|
282215
|
+
abi33 = fragments;
|
|
282140
282216
|
}
|
|
282141
282217
|
this.#functions = /* @__PURE__ */ new Map();
|
|
282142
282218
|
this.#errors = /* @__PURE__ */ new Map();
|
|
282143
282219
|
this.#events = /* @__PURE__ */ new Map();
|
|
282144
282220
|
const frags = [];
|
|
282145
|
-
for (const a of
|
|
282221
|
+
for (const a of abi33) {
|
|
282146
282222
|
try {
|
|
282147
282223
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
282148
282224
|
} catch (error) {
|
|
@@ -282206,16 +282282,16 @@ var require_interface3 = __commonJS({
|
|
|
282206
282282
|
*/
|
|
282207
282283
|
format(minimal) {
|
|
282208
282284
|
const format = minimal ? "minimal" : "full";
|
|
282209
|
-
const
|
|
282210
|
-
return
|
|
282285
|
+
const abi33 = this.fragments.map((f) => f.format(format));
|
|
282286
|
+
return abi33;
|
|
282211
282287
|
}
|
|
282212
282288
|
/**
|
|
282213
282289
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
282214
282290
|
* returns.
|
|
282215
282291
|
*/
|
|
282216
282292
|
formatJson() {
|
|
282217
|
-
const
|
|
282218
|
-
return JSON.stringify(
|
|
282293
|
+
const abi33 = this.fragments.map((f) => f.format("json"));
|
|
282294
|
+
return JSON.stringify(abi33.map((j) => JSON.parse(j)));
|
|
282219
282295
|
}
|
|
282220
282296
|
/**
|
|
282221
282297
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -284983,12 +285059,12 @@ var require_contract5 = __commonJS({
|
|
|
284983
285059
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
284984
285060
|
* of.
|
|
284985
285061
|
*/
|
|
284986
|
-
constructor(target,
|
|
285062
|
+
constructor(target, abi33, runner, _deployTx) {
|
|
284987
285063
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
284988
285064
|
if (runner == null) {
|
|
284989
285065
|
runner = null;
|
|
284990
285066
|
}
|
|
284991
|
-
const iface = index_js_1.Interface.from(
|
|
285067
|
+
const iface = index_js_1.Interface.from(abi33);
|
|
284992
285068
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
284993
285069
|
Object.defineProperty(this, internal, { value: {} });
|
|
284994
285070
|
let addrPromise;
|
|
@@ -285351,10 +285427,10 @@ var require_contract5 = __commonJS({
|
|
|
285351
285427
|
/**
|
|
285352
285428
|
* Create a new Class for the %%abi%%.
|
|
285353
285429
|
*/
|
|
285354
|
-
static buildClass(
|
|
285430
|
+
static buildClass(abi33) {
|
|
285355
285431
|
class CustomContract extends _BaseContract {
|
|
285356
285432
|
constructor(address, runner = null) {
|
|
285357
|
-
super(address,
|
|
285433
|
+
super(address, abi33, runner);
|
|
285358
285434
|
}
|
|
285359
285435
|
}
|
|
285360
285436
|
return CustomContract;
|
|
@@ -285362,11 +285438,11 @@ var require_contract5 = __commonJS({
|
|
|
285362
285438
|
/**
|
|
285363
285439
|
* Create a new BaseContract with a specified Interface.
|
|
285364
285440
|
*/
|
|
285365
|
-
static from(target,
|
|
285441
|
+
static from(target, abi33, runner) {
|
|
285366
285442
|
if (runner == null) {
|
|
285367
285443
|
runner = null;
|
|
285368
285444
|
}
|
|
285369
|
-
const contract = new this(target,
|
|
285445
|
+
const contract = new this(target, abi33, runner);
|
|
285370
285446
|
return contract;
|
|
285371
285447
|
}
|
|
285372
285448
|
};
|
|
@@ -285410,8 +285486,8 @@ var require_factory2 = __commonJS({
|
|
|
285410
285486
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
285411
285487
|
* standard Solidity JSON output.
|
|
285412
285488
|
*/
|
|
285413
|
-
constructor(
|
|
285414
|
-
const iface = index_js_1.Interface.from(
|
|
285489
|
+
constructor(abi33, bytecode, runner) {
|
|
285490
|
+
const iface = index_js_1.Interface.from(abi33);
|
|
285415
285491
|
if (bytecode instanceof Uint8Array) {
|
|
285416
285492
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
285417
285493
|
} else {
|
|
@@ -285481,14 +285557,14 @@ var require_factory2 = __commonJS({
|
|
|
285481
285557
|
if (typeof output === "string") {
|
|
285482
285558
|
output = JSON.parse(output);
|
|
285483
285559
|
}
|
|
285484
|
-
const
|
|
285560
|
+
const abi33 = output.abi;
|
|
285485
285561
|
let bytecode = "";
|
|
285486
285562
|
if (output.bytecode) {
|
|
285487
285563
|
bytecode = output.bytecode;
|
|
285488
285564
|
} else if (output.evm && output.evm.bytecode) {
|
|
285489
285565
|
bytecode = output.evm.bytecode;
|
|
285490
285566
|
}
|
|
285491
|
-
return new this(
|
|
285567
|
+
return new this(abi33, bytecode, runner);
|
|
285492
285568
|
}
|
|
285493
285569
|
};
|
|
285494
285570
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -290438,8 +290514,8 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
290438
290514
|
action: "getabi",
|
|
290439
290515
|
address
|
|
290440
290516
|
});
|
|
290441
|
-
const
|
|
290442
|
-
return new index_js_2.Contract(address,
|
|
290517
|
+
const abi33 = JSON.parse(resp);
|
|
290518
|
+
return new index_js_2.Contract(address, abi33, this);
|
|
290443
290519
|
} catch (error) {
|
|
290444
290520
|
return null;
|
|
290445
290521
|
}
|
|
@@ -340453,10 +340529,10 @@ init_formatAbiItem2();
|
|
|
340453
340529
|
init_getAbiItem();
|
|
340454
340530
|
var docsPath = "/docs/contract/encodeEventTopics";
|
|
340455
340531
|
function encodeEventTopics(parameters) {
|
|
340456
|
-
const { abi:
|
|
340457
|
-
let abiItem =
|
|
340532
|
+
const { abi: abi33, eventName, args } = parameters;
|
|
340533
|
+
let abiItem = abi33[0];
|
|
340458
340534
|
if (eventName) {
|
|
340459
|
-
const item = getAbiItem({ abi:
|
|
340535
|
+
const item = getAbiItem({ abi: abi33, name: eventName });
|
|
340460
340536
|
if (!item)
|
|
340461
340537
|
throw new AbiEventNotFoundError(eventName, { docsPath });
|
|
340462
340538
|
abiItem = item;
|
|
@@ -340503,12 +340579,12 @@ function createFilterRequestScope(client, { method }) {
|
|
|
340503
340579
|
|
|
340504
340580
|
// ../../node_modules/viem/_esm/actions/public/createContractEventFilter.js
|
|
340505
340581
|
async function createContractEventFilter(client, parameters) {
|
|
340506
|
-
const { address, abi:
|
|
340582
|
+
const { address, abi: abi33, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
340507
340583
|
const getRequest = createFilterRequestScope(client, {
|
|
340508
340584
|
method: "eth_newFilter"
|
|
340509
340585
|
});
|
|
340510
340586
|
const topics = eventName ? encodeEventTopics({
|
|
340511
|
-
abi:
|
|
340587
|
+
abi: abi33,
|
|
340512
340588
|
args,
|
|
340513
340589
|
eventName
|
|
340514
340590
|
}) : void 0;
|
|
@@ -340524,7 +340600,7 @@ async function createContractEventFilter(client, parameters) {
|
|
|
340524
340600
|
]
|
|
340525
340601
|
});
|
|
340526
340602
|
return {
|
|
340527
|
-
abi:
|
|
340603
|
+
abi: abi33,
|
|
340528
340604
|
args,
|
|
340529
340605
|
eventName,
|
|
340530
340606
|
id,
|
|
@@ -340545,7 +340621,7 @@ init_contract();
|
|
|
340545
340621
|
init_request();
|
|
340546
340622
|
init_rpc();
|
|
340547
340623
|
var EXECUTION_REVERTED_ERROR_CODE = 3;
|
|
340548
|
-
function getContractError(err, { abi:
|
|
340624
|
+
function getContractError(err, { abi: abi33, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
340549
340625
|
const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
340550
340626
|
const { code, data, details, message, shortMessage } = error;
|
|
340551
340627
|
const cause = (() => {
|
|
@@ -340553,7 +340629,7 @@ function getContractError(err, { abi: abi32, address, args, docsPath: docsPath6,
|
|
|
340553
340629
|
return new ContractFunctionZeroDataError({ functionName });
|
|
340554
340630
|
if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
340555
340631
|
return new ContractFunctionRevertedError({
|
|
340556
|
-
abi:
|
|
340632
|
+
abi: abi33,
|
|
340557
340633
|
data: typeof data === "object" ? data.data : data,
|
|
340558
340634
|
functionName,
|
|
340559
340635
|
message: error instanceof RpcRequestError ? details : shortMessage ?? message
|
|
@@ -340562,7 +340638,7 @@ function getContractError(err, { abi: abi32, address, args, docsPath: docsPath6,
|
|
|
340562
340638
|
return err;
|
|
340563
340639
|
})();
|
|
340564
340640
|
return new ContractFunctionExecutionError(cause, {
|
|
340565
|
-
abi:
|
|
340641
|
+
abi: abi33,
|
|
340566
340642
|
args,
|
|
340567
340643
|
contractAddress: address,
|
|
340568
340644
|
docsPath: docsPath6,
|
|
@@ -341761,9 +341837,9 @@ async function estimateGas(client, args) {
|
|
|
341761
341837
|
|
|
341762
341838
|
// ../../node_modules/viem/_esm/actions/public/estimateContractGas.js
|
|
341763
341839
|
async function estimateContractGas(client, parameters) {
|
|
341764
|
-
const { abi:
|
|
341840
|
+
const { abi: abi33, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
341765
341841
|
const data = encodeFunctionData({
|
|
341766
|
-
abi:
|
|
341842
|
+
abi: abi33,
|
|
341767
341843
|
args,
|
|
341768
341844
|
functionName
|
|
341769
341845
|
});
|
|
@@ -341777,7 +341853,7 @@ async function estimateContractGas(client, parameters) {
|
|
|
341777
341853
|
} catch (error) {
|
|
341778
341854
|
const account = request.account ? parseAccount(request.account) : void 0;
|
|
341779
341855
|
throw getContractError(error, {
|
|
341780
|
-
abi:
|
|
341856
|
+
abi: abi33,
|
|
341781
341857
|
address,
|
|
341782
341858
|
args,
|
|
341783
341859
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -341806,15 +341882,15 @@ init_decodeAbiParameters();
|
|
|
341806
341882
|
init_formatAbiItem2();
|
|
341807
341883
|
var docsPath3 = "/docs/contract/decodeEventLog";
|
|
341808
341884
|
function decodeEventLog(parameters) {
|
|
341809
|
-
const { abi:
|
|
341885
|
+
const { abi: abi33, data, strict: strict_, topics } = parameters;
|
|
341810
341886
|
const strict = strict_ ?? true;
|
|
341811
341887
|
const [signature, ...argTopics] = topics;
|
|
341812
341888
|
if (!signature)
|
|
341813
341889
|
throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
|
|
341814
341890
|
const abiItem = (() => {
|
|
341815
|
-
if (
|
|
341816
|
-
return
|
|
341817
|
-
return
|
|
341891
|
+
if (abi33.length === 1)
|
|
341892
|
+
return abi33[0];
|
|
341893
|
+
return abi33.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem2(x)));
|
|
341818
341894
|
})();
|
|
341819
341895
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
341820
341896
|
throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });
|
|
@@ -341881,7 +341957,7 @@ function decodeTopic({ param, value }) {
|
|
|
341881
341957
|
|
|
341882
341958
|
// ../../node_modules/viem/_esm/utils/abi/parseEventLogs.js
|
|
341883
341959
|
function parseEventLogs(parameters) {
|
|
341884
|
-
const { abi:
|
|
341960
|
+
const { abi: abi33, args, logs, strict = true } = parameters;
|
|
341885
341961
|
const eventName = (() => {
|
|
341886
341962
|
if (!parameters.eventName)
|
|
341887
341963
|
return void 0;
|
|
@@ -341891,7 +341967,7 @@ function parseEventLogs(parameters) {
|
|
|
341891
341967
|
})();
|
|
341892
341968
|
return logs.map((log2) => {
|
|
341893
341969
|
try {
|
|
341894
|
-
const abiItem =
|
|
341970
|
+
const abiItem = abi33.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
|
|
341895
341971
|
if (!abiItem)
|
|
341896
341972
|
return null;
|
|
341897
341973
|
const event = decodeEventLog({
|
|
@@ -342027,9 +342103,9 @@ async function getLogs(client, { address, blockHash, fromBlock, toBlock, event,
|
|
|
342027
342103
|
|
|
342028
342104
|
// ../../node_modules/viem/_esm/actions/public/getContractEvents.js
|
|
342029
342105
|
async function getContractEvents(client, parameters) {
|
|
342030
|
-
const { abi:
|
|
342031
|
-
const event = eventName ? getAbiItem({ abi:
|
|
342032
|
-
const events = !event ?
|
|
342106
|
+
const { abi: abi33, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
342107
|
+
const event = eventName ? getAbiItem({ abi: abi33, name: eventName }) : void 0;
|
|
342108
|
+
const events = !event ? abi33.filter((x) => x.type === "event") : void 0;
|
|
342033
342109
|
return getAction(client, getLogs, "getLogs")({
|
|
342034
342110
|
address,
|
|
342035
342111
|
args,
|
|
@@ -342047,9 +342123,9 @@ init_decodeFunctionResult();
|
|
|
342047
342123
|
init_encodeFunctionData();
|
|
342048
342124
|
init_call();
|
|
342049
342125
|
async function readContract(client, parameters) {
|
|
342050
|
-
const { abi:
|
|
342126
|
+
const { abi: abi33, address, args, functionName, ...rest2 } = parameters;
|
|
342051
342127
|
const calldata = encodeFunctionData({
|
|
342052
|
-
abi:
|
|
342128
|
+
abi: abi33,
|
|
342053
342129
|
args,
|
|
342054
342130
|
functionName
|
|
342055
342131
|
});
|
|
@@ -342060,14 +342136,14 @@ async function readContract(client, parameters) {
|
|
|
342060
342136
|
to: address
|
|
342061
342137
|
});
|
|
342062
342138
|
return decodeFunctionResult({
|
|
342063
|
-
abi:
|
|
342139
|
+
abi: abi33,
|
|
342064
342140
|
args,
|
|
342065
342141
|
functionName,
|
|
342066
342142
|
data: data || "0x"
|
|
342067
342143
|
});
|
|
342068
342144
|
} catch (error) {
|
|
342069
342145
|
throw getContractError(error, {
|
|
342070
|
-
abi:
|
|
342146
|
+
abi: abi33,
|
|
342071
342147
|
address,
|
|
342072
342148
|
args,
|
|
342073
342149
|
docsPath: "/docs/contract/readContract",
|
|
@@ -342082,9 +342158,9 @@ init_decodeFunctionResult();
|
|
|
342082
342158
|
init_encodeFunctionData();
|
|
342083
342159
|
init_call();
|
|
342084
342160
|
async function simulateContract(client, parameters) {
|
|
342085
|
-
const { abi:
|
|
342161
|
+
const { abi: abi33, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
342086
342162
|
const account = callRequest.account ? parseAccount(callRequest.account) : client.account;
|
|
342087
|
-
const calldata = encodeFunctionData({ abi:
|
|
342163
|
+
const calldata = encodeFunctionData({ abi: abi33, args, functionName });
|
|
342088
342164
|
try {
|
|
342089
342165
|
const { data } = await getAction(client, call, "call")({
|
|
342090
342166
|
batch: false,
|
|
@@ -342094,12 +342170,12 @@ async function simulateContract(client, parameters) {
|
|
|
342094
342170
|
account
|
|
342095
342171
|
});
|
|
342096
342172
|
const result = decodeFunctionResult({
|
|
342097
|
-
abi:
|
|
342173
|
+
abi: abi33,
|
|
342098
342174
|
args,
|
|
342099
342175
|
functionName,
|
|
342100
342176
|
data: data || "0x"
|
|
342101
342177
|
});
|
|
342102
|
-
const minimizedAbi =
|
|
342178
|
+
const minimizedAbi = abi33.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
342103
342179
|
return {
|
|
342104
342180
|
result,
|
|
342105
342181
|
request: {
|
|
@@ -342114,7 +342190,7 @@ async function simulateContract(client, parameters) {
|
|
|
342114
342190
|
};
|
|
342115
342191
|
} catch (error) {
|
|
342116
342192
|
throw getContractError(error, {
|
|
342117
|
-
abi:
|
|
342193
|
+
abi: abi33,
|
|
342118
342194
|
address,
|
|
342119
342195
|
args,
|
|
342120
342196
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -342282,7 +342358,7 @@ async function uninstallFilter(_client, { filter }) {
|
|
|
342282
342358
|
|
|
342283
342359
|
// ../../node_modules/viem/_esm/actions/public/watchContractEvent.js
|
|
342284
342360
|
function watchContractEvent(client, parameters) {
|
|
342285
|
-
const { abi:
|
|
342361
|
+
const { abi: abi33, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
342286
342362
|
const enablePolling = (() => {
|
|
342287
342363
|
if (typeof poll_ !== "undefined")
|
|
342288
342364
|
return poll_;
|
|
@@ -342317,7 +342393,7 @@ function watchContractEvent(client, parameters) {
|
|
|
342317
342393
|
if (!initialized) {
|
|
342318
342394
|
try {
|
|
342319
342395
|
filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
|
|
342320
|
-
abi:
|
|
342396
|
+
abi: abi33,
|
|
342321
342397
|
address,
|
|
342322
342398
|
args,
|
|
342323
342399
|
eventName,
|
|
@@ -342337,7 +342413,7 @@ function watchContractEvent(client, parameters) {
|
|
|
342337
342413
|
const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
|
|
342338
342414
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
342339
342415
|
logs = await getAction(client, getContractEvents, "getContractEvents")({
|
|
342340
|
-
abi:
|
|
342416
|
+
abi: abi33,
|
|
342341
342417
|
address,
|
|
342342
342418
|
args,
|
|
342343
342419
|
eventName,
|
|
@@ -342401,7 +342477,7 @@ function watchContractEvent(client, parameters) {
|
|
|
342401
342477
|
return client.transport;
|
|
342402
342478
|
})();
|
|
342403
342479
|
const topics = eventName ? encodeEventTopics({
|
|
342404
|
-
abi:
|
|
342480
|
+
abi: abi33,
|
|
342405
342481
|
eventName,
|
|
342406
342482
|
args
|
|
342407
342483
|
}) : [];
|
|
@@ -342413,7 +342489,7 @@ function watchContractEvent(client, parameters) {
|
|
|
342413
342489
|
const log2 = data.result;
|
|
342414
342490
|
try {
|
|
342415
342491
|
const { eventName: eventName2, args: args2 } = decodeEventLog({
|
|
342416
|
-
abi:
|
|
342492
|
+
abi: abi33,
|
|
342417
342493
|
data: log2.data,
|
|
342418
342494
|
topics: log2.topics,
|
|
342419
342495
|
strict: strict_
|
|
@@ -342664,14 +342740,14 @@ async function sendTransaction(client, parameters) {
|
|
|
342664
342740
|
|
|
342665
342741
|
// ../../node_modules/viem/_esm/actions/wallet/writeContract.js
|
|
342666
342742
|
async function writeContract(client, parameters) {
|
|
342667
|
-
const { abi:
|
|
342743
|
+
const { abi: abi33, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
342668
342744
|
if (typeof account_ === "undefined")
|
|
342669
342745
|
throw new AccountNotFoundError({
|
|
342670
342746
|
docsPath: "/docs/contract/writeContract"
|
|
342671
342747
|
});
|
|
342672
342748
|
const account = account_ ? parseAccount(account_) : null;
|
|
342673
342749
|
const data = encodeFunctionData({
|
|
342674
|
-
abi:
|
|
342750
|
+
abi: abi33,
|
|
342675
342751
|
args,
|
|
342676
342752
|
functionName
|
|
342677
342753
|
});
|
|
@@ -342684,7 +342760,7 @@ async function writeContract(client, parameters) {
|
|
|
342684
342760
|
});
|
|
342685
342761
|
} catch (error) {
|
|
342686
342762
|
throw getContractError(error, {
|
|
342687
|
-
abi:
|
|
342763
|
+
abi: abi33,
|
|
342688
342764
|
address,
|
|
342689
342765
|
args,
|
|
342690
342766
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -342695,7 +342771,7 @@ async function writeContract(client, parameters) {
|
|
|
342695
342771
|
}
|
|
342696
342772
|
|
|
342697
342773
|
// ../../node_modules/viem/_esm/actions/getContract.js
|
|
342698
|
-
function getContract({ abi:
|
|
342774
|
+
function getContract({ abi: abi33, address, client: client_ }) {
|
|
342699
342775
|
const client = client_;
|
|
342700
342776
|
const [publicClient, walletClient] = (() => {
|
|
342701
342777
|
if (!client)
|
|
@@ -342714,7 +342790,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342714
342790
|
let hasReadFunction = false;
|
|
342715
342791
|
let hasWriteFunction = false;
|
|
342716
342792
|
let hasEvent = false;
|
|
342717
|
-
for (const item of
|
|
342793
|
+
for (const item of abi33) {
|
|
342718
342794
|
if (item.type === "function")
|
|
342719
342795
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
342720
342796
|
hasReadFunction = true;
|
|
@@ -342732,7 +342808,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342732
342808
|
return (...parameters) => {
|
|
342733
342809
|
const { args, options } = getFunctionParameters(parameters);
|
|
342734
342810
|
return getAction(publicClient, readContract, "readContract")({
|
|
342735
|
-
abi:
|
|
342811
|
+
abi: abi33,
|
|
342736
342812
|
address,
|
|
342737
342813
|
functionName,
|
|
342738
342814
|
args,
|
|
@@ -342747,7 +342823,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342747
342823
|
return (...parameters) => {
|
|
342748
342824
|
const { args, options } = getFunctionParameters(parameters);
|
|
342749
342825
|
return getAction(publicClient, simulateContract, "simulateContract")({
|
|
342750
|
-
abi:
|
|
342826
|
+
abi: abi33,
|
|
342751
342827
|
address,
|
|
342752
342828
|
functionName,
|
|
342753
342829
|
args,
|
|
@@ -342760,10 +342836,10 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342760
342836
|
contract.createEventFilter = new Proxy({}, {
|
|
342761
342837
|
get(_, eventName) {
|
|
342762
342838
|
return (...parameters) => {
|
|
342763
|
-
const abiEvent =
|
|
342839
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
342764
342840
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
342765
342841
|
return getAction(publicClient, createContractEventFilter, "createContractEventFilter")({
|
|
342766
|
-
abi:
|
|
342842
|
+
abi: abi33,
|
|
342767
342843
|
address,
|
|
342768
342844
|
eventName,
|
|
342769
342845
|
args,
|
|
@@ -342775,10 +342851,10 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342775
342851
|
contract.getEvents = new Proxy({}, {
|
|
342776
342852
|
get(_, eventName) {
|
|
342777
342853
|
return (...parameters) => {
|
|
342778
|
-
const abiEvent =
|
|
342854
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
342779
342855
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
342780
342856
|
return getAction(publicClient, getContractEvents, "getContractEvents")({
|
|
342781
|
-
abi:
|
|
342857
|
+
abi: abi33,
|
|
342782
342858
|
address,
|
|
342783
342859
|
eventName,
|
|
342784
342860
|
args,
|
|
@@ -342790,10 +342866,10 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342790
342866
|
contract.watchEvent = new Proxy({}, {
|
|
342791
342867
|
get(_, eventName) {
|
|
342792
342868
|
return (...parameters) => {
|
|
342793
|
-
const abiEvent =
|
|
342869
|
+
const abiEvent = abi33.find((x) => x.type === "event" && x.name === eventName);
|
|
342794
342870
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
342795
342871
|
return getAction(publicClient, watchContractEvent, "watchContractEvent")({
|
|
342796
|
-
abi:
|
|
342872
|
+
abi: abi33,
|
|
342797
342873
|
address,
|
|
342798
342874
|
eventName,
|
|
342799
342875
|
args,
|
|
@@ -342811,7 +342887,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342811
342887
|
return (...parameters) => {
|
|
342812
342888
|
const { args, options } = getFunctionParameters(parameters);
|
|
342813
342889
|
return getAction(walletClient, writeContract, "writeContract")({
|
|
342814
|
-
abi:
|
|
342890
|
+
abi: abi33,
|
|
342815
342891
|
address,
|
|
342816
342892
|
functionName,
|
|
342817
342893
|
args,
|
|
@@ -342829,7 +342905,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342829
342905
|
const { args, options } = getFunctionParameters(parameters);
|
|
342830
342906
|
const client2 = publicClient ?? walletClient;
|
|
342831
342907
|
return getAction(client2, estimateContractGas, "estimateContractGas")({
|
|
342832
|
-
abi:
|
|
342908
|
+
abi: abi33,
|
|
342833
342909
|
address,
|
|
342834
342910
|
functionName,
|
|
342835
342911
|
args,
|
|
@@ -342841,7 +342917,7 @@ function getContract({ abi: abi32, address, client: client_ }) {
|
|
|
342841
342917
|
});
|
|
342842
342918
|
}
|
|
342843
342919
|
contract.address = address;
|
|
342844
|
-
contract.abi =
|
|
342920
|
+
contract.abi = abi33;
|
|
342845
342921
|
return contract;
|
|
342846
342922
|
}
|
|
342847
342923
|
function getFunctionParameters(values) {
|
|
@@ -344536,9 +344612,9 @@ init_toFunctionSelector();
|
|
|
344536
344612
|
init_decodeAbiParameters();
|
|
344537
344613
|
init_formatAbiItem2();
|
|
344538
344614
|
function decodeFunctionData(parameters) {
|
|
344539
|
-
const { abi:
|
|
344615
|
+
const { abi: abi33, data } = parameters;
|
|
344540
344616
|
const signature = slice(data, 0, 4);
|
|
344541
|
-
const description =
|
|
344617
|
+
const description = abi33.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
344542
344618
|
if (!description)
|
|
344543
344619
|
throw new AbiFunctionSignatureNotFoundError(signature, {
|
|
344544
344620
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -345182,9 +345258,9 @@ async function multicall(client, parameters) {
|
|
|
345182
345258
|
let currentChunk = 0;
|
|
345183
345259
|
let currentChunkSize = 0;
|
|
345184
345260
|
for (let i = 0; i < contracts2.length; i++) {
|
|
345185
|
-
const { abi:
|
|
345261
|
+
const { abi: abi33, address, args, functionName } = contracts2[i];
|
|
345186
345262
|
try {
|
|
345187
|
-
const callData = encodeFunctionData({ abi:
|
|
345263
|
+
const callData = encodeFunctionData({ abi: abi33, args, functionName });
|
|
345188
345264
|
currentChunkSize += (callData.length - 2) / 2;
|
|
345189
345265
|
if (
|
|
345190
345266
|
// Check if batching is enabled.
|
|
@@ -345206,7 +345282,7 @@ async function multicall(client, parameters) {
|
|
|
345206
345282
|
];
|
|
345207
345283
|
} catch (err) {
|
|
345208
345284
|
const error = getContractError(err, {
|
|
345209
|
-
abi:
|
|
345285
|
+
abi: abi33,
|
|
345210
345286
|
address,
|
|
345211
345287
|
args,
|
|
345212
345288
|
docsPath: "/docs/contract/multicall",
|
|
@@ -345252,14 +345328,14 @@ async function multicall(client, parameters) {
|
|
|
345252
345328
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
345253
345329
|
const { returnData, success } = aggregate3Result[j];
|
|
345254
345330
|
const { callData } = chunkedCalls[i][j];
|
|
345255
|
-
const { abi:
|
|
345331
|
+
const { abi: abi33, address, functionName, args } = contracts2[results.length];
|
|
345256
345332
|
try {
|
|
345257
345333
|
if (callData === "0x")
|
|
345258
345334
|
throw new AbiDecodingZeroDataError();
|
|
345259
345335
|
if (!success)
|
|
345260
345336
|
throw new RawContractError({ data: returnData });
|
|
345261
345337
|
const result2 = decodeFunctionResult({
|
|
345262
|
-
abi:
|
|
345338
|
+
abi: abi33,
|
|
345263
345339
|
args,
|
|
345264
345340
|
data: returnData,
|
|
345265
345341
|
functionName
|
|
@@ -345267,7 +345343,7 @@ async function multicall(client, parameters) {
|
|
|
345267
345343
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
345268
345344
|
} catch (err) {
|
|
345269
345345
|
const error = getContractError(err, {
|
|
345270
|
-
abi:
|
|
345346
|
+
abi: abi33,
|
|
345271
345347
|
address,
|
|
345272
345348
|
args,
|
|
345273
345349
|
docsPath: "/docs/contract/multicall",
|
|
@@ -345542,13 +345618,13 @@ async function simulate(client, parameters) {
|
|
|
345542
345618
|
return result.map((block2, i) => ({
|
|
345543
345619
|
...formatBlock(block2),
|
|
345544
345620
|
calls: block2.calls.map((call2, j) => {
|
|
345545
|
-
const { abi:
|
|
345621
|
+
const { abi: abi33, args, functionName, to } = blocks[i].calls[j];
|
|
345546
345622
|
const data = call2.error?.data ?? call2.returnData;
|
|
345547
345623
|
const gasUsed = BigInt(call2.gasUsed);
|
|
345548
345624
|
const logs = call2.logs?.map((log2) => formatLog(log2));
|
|
345549
345625
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
345550
|
-
const result2 =
|
|
345551
|
-
abi:
|
|
345626
|
+
const result2 = abi33 ? decodeFunctionResult({
|
|
345627
|
+
abi: abi33,
|
|
345552
345628
|
data,
|
|
345553
345629
|
functionName
|
|
345554
345630
|
}) : null;
|
|
@@ -345563,7 +345639,7 @@ async function simulate(client, parameters) {
|
|
|
345563
345639
|
if (!error2)
|
|
345564
345640
|
return void 0;
|
|
345565
345641
|
return getContractError(error2, {
|
|
345566
|
-
abi:
|
|
345642
|
+
abi: abi33 ?? [],
|
|
345567
345643
|
address: to,
|
|
345568
345644
|
args,
|
|
345569
345645
|
functionName: functionName ?? "<unknown>"
|
|
@@ -346783,8 +346859,8 @@ function createTestClient(parameters) {
|
|
|
346783
346859
|
// ../../node_modules/viem/_esm/actions/wallet/deployContract.js
|
|
346784
346860
|
init_encodeDeployData();
|
|
346785
346861
|
function deployContract(walletClient, parameters) {
|
|
346786
|
-
const { abi:
|
|
346787
|
-
const calldata = encodeDeployData({ abi:
|
|
346862
|
+
const { abi: abi33, args, bytecode, ...request } = parameters;
|
|
346863
|
+
const calldata = encodeDeployData({ abi: abi33, args, bytecode });
|
|
346788
346864
|
return sendTransaction(walletClient, {
|
|
346789
346865
|
...request,
|
|
346790
346866
|
data: calldata
|
|
@@ -367416,6 +367492,142 @@ var iMellowVaultAdapterAbi = [
|
|
|
367416
367492
|
]
|
|
367417
367493
|
}
|
|
367418
367494
|
];
|
|
367495
|
+
var iErc4626AdapterAbi = [
|
|
367496
|
+
{
|
|
367497
|
+
type: "function",
|
|
367498
|
+
name: "_gearboxAdapterType",
|
|
367499
|
+
inputs: [],
|
|
367500
|
+
outputs: [{ name: "", type: "uint8", internalType: "enum AdapterType" }],
|
|
367501
|
+
stateMutability: "view"
|
|
367502
|
+
},
|
|
367503
|
+
{
|
|
367504
|
+
type: "function",
|
|
367505
|
+
name: "_gearboxAdapterVersion",
|
|
367506
|
+
inputs: [],
|
|
367507
|
+
outputs: [{ name: "", type: "uint16", internalType: "uint16" }],
|
|
367508
|
+
stateMutability: "view"
|
|
367509
|
+
},
|
|
367510
|
+
{
|
|
367511
|
+
type: "function",
|
|
367512
|
+
name: "addressProvider",
|
|
367513
|
+
inputs: [],
|
|
367514
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
367515
|
+
stateMutability: "view"
|
|
367516
|
+
},
|
|
367517
|
+
{
|
|
367518
|
+
type: "function",
|
|
367519
|
+
name: "asset",
|
|
367520
|
+
inputs: [],
|
|
367521
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
367522
|
+
stateMutability: "view"
|
|
367523
|
+
},
|
|
367524
|
+
{
|
|
367525
|
+
type: "function",
|
|
367526
|
+
name: "assetMask",
|
|
367527
|
+
inputs: [],
|
|
367528
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
367529
|
+
stateMutability: "view"
|
|
367530
|
+
},
|
|
367531
|
+
{
|
|
367532
|
+
type: "function",
|
|
367533
|
+
name: "creditManager",
|
|
367534
|
+
inputs: [],
|
|
367535
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
367536
|
+
stateMutability: "view"
|
|
367537
|
+
},
|
|
367538
|
+
{
|
|
367539
|
+
type: "function",
|
|
367540
|
+
name: "deposit",
|
|
367541
|
+
inputs: [
|
|
367542
|
+
{ name: "assets", type: "uint256", internalType: "uint256" },
|
|
367543
|
+
{ name: "", type: "address", internalType: "address" }
|
|
367544
|
+
],
|
|
367545
|
+
outputs: [
|
|
367546
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367547
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367548
|
+
],
|
|
367549
|
+
stateMutability: "nonpayable"
|
|
367550
|
+
},
|
|
367551
|
+
{
|
|
367552
|
+
type: "function",
|
|
367553
|
+
name: "depositDiff",
|
|
367554
|
+
inputs: [
|
|
367555
|
+
{ name: "leftoverAmount", type: "uint256", internalType: "uint256" }
|
|
367556
|
+
],
|
|
367557
|
+
outputs: [
|
|
367558
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367559
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367560
|
+
],
|
|
367561
|
+
stateMutability: "nonpayable"
|
|
367562
|
+
},
|
|
367563
|
+
{
|
|
367564
|
+
type: "function",
|
|
367565
|
+
name: "mint",
|
|
367566
|
+
inputs: [
|
|
367567
|
+
{ name: "shares", type: "uint256", internalType: "uint256" },
|
|
367568
|
+
{ name: "", type: "address", internalType: "address" }
|
|
367569
|
+
],
|
|
367570
|
+
outputs: [
|
|
367571
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367572
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367573
|
+
],
|
|
367574
|
+
stateMutability: "nonpayable"
|
|
367575
|
+
},
|
|
367576
|
+
{
|
|
367577
|
+
type: "function",
|
|
367578
|
+
name: "redeem",
|
|
367579
|
+
inputs: [
|
|
367580
|
+
{ name: "shares", type: "uint256", internalType: "uint256" },
|
|
367581
|
+
{ name: "", type: "address", internalType: "address" },
|
|
367582
|
+
{ name: "", type: "address", internalType: "address" }
|
|
367583
|
+
],
|
|
367584
|
+
outputs: [
|
|
367585
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367586
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367587
|
+
],
|
|
367588
|
+
stateMutability: "nonpayable"
|
|
367589
|
+
},
|
|
367590
|
+
{
|
|
367591
|
+
type: "function",
|
|
367592
|
+
name: "redeemDiff",
|
|
367593
|
+
inputs: [
|
|
367594
|
+
{ name: "leftoverAmount", type: "uint256", internalType: "uint256" }
|
|
367595
|
+
],
|
|
367596
|
+
outputs: [
|
|
367597
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367598
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367599
|
+
],
|
|
367600
|
+
stateMutability: "nonpayable"
|
|
367601
|
+
},
|
|
367602
|
+
{
|
|
367603
|
+
type: "function",
|
|
367604
|
+
name: "sharesMask",
|
|
367605
|
+
inputs: [],
|
|
367606
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
367607
|
+
stateMutability: "view"
|
|
367608
|
+
},
|
|
367609
|
+
{
|
|
367610
|
+
type: "function",
|
|
367611
|
+
name: "targetContract",
|
|
367612
|
+
inputs: [],
|
|
367613
|
+
outputs: [{ name: "", type: "address", internalType: "address" }],
|
|
367614
|
+
stateMutability: "view"
|
|
367615
|
+
},
|
|
367616
|
+
{
|
|
367617
|
+
type: "function",
|
|
367618
|
+
name: "withdraw",
|
|
367619
|
+
inputs: [
|
|
367620
|
+
{ name: "assets", type: "uint256", internalType: "uint256" },
|
|
367621
|
+
{ name: "", type: "address", internalType: "address" },
|
|
367622
|
+
{ name: "", type: "address", internalType: "address" }
|
|
367623
|
+
],
|
|
367624
|
+
outputs: [
|
|
367625
|
+
{ name: "tokensToEnable", type: "uint256", internalType: "uint256" },
|
|
367626
|
+
{ name: "tokensToDisable", type: "uint256", internalType: "uint256" }
|
|
367627
|
+
],
|
|
367628
|
+
stateMutability: "nonpayable"
|
|
367629
|
+
}
|
|
367630
|
+
];
|
|
367419
367631
|
var iPendleRouterAdapterAbi = [
|
|
367420
367632
|
{
|
|
367421
367633
|
type: "function",
|
|
@@ -374491,12 +374703,12 @@ var json_parse = (s) => {
|
|
|
374491
374703
|
function createRawTx(to, parameters, description) {
|
|
374492
374704
|
const { args } = parameters;
|
|
374493
374705
|
const fname = parameters.functionName;
|
|
374494
|
-
const { abi:
|
|
374706
|
+
const { abi: abi33, functionName } = (() => {
|
|
374495
374707
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
374496
374708
|
return parameters;
|
|
374497
374709
|
return prepareEncodeFunctionData(parameters);
|
|
374498
374710
|
})();
|
|
374499
|
-
const abiItem =
|
|
374711
|
+
const abiItem = abi33[0];
|
|
374500
374712
|
const signature = functionName;
|
|
374501
374713
|
const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
374502
374714
|
const functionEncodedData = concatHex([signature, data ?? "0x"]);
|
|
@@ -374954,8 +375166,8 @@ var CurveV1StableNGAdapterContract = class extends AbstractAdapterContract {
|
|
|
374954
375166
|
});
|
|
374955
375167
|
}
|
|
374956
375168
|
};
|
|
374957
|
-
var abi13 =
|
|
374958
|
-
var
|
|
375169
|
+
var abi13 = iErc4626AdapterAbi;
|
|
375170
|
+
var MellowERC4626VaultAdapterContract = class extends AbstractAdapterContract {
|
|
374959
375171
|
constructor(sdk, args) {
|
|
374960
375172
|
super(sdk, {
|
|
374961
375173
|
...args,
|
|
@@ -374963,8 +375175,8 @@ var MellowVaultAdapterContract = class extends AbstractAdapterContract {
|
|
|
374963
375175
|
});
|
|
374964
375176
|
}
|
|
374965
375177
|
};
|
|
374966
|
-
var abi14 =
|
|
374967
|
-
var
|
|
375178
|
+
var abi14 = iMellowVaultAdapterAbi;
|
|
375179
|
+
var MellowVaultAdapterContract = class extends AbstractAdapterContract {
|
|
374968
375180
|
constructor(sdk, args) {
|
|
374969
375181
|
super(sdk, {
|
|
374970
375182
|
...args,
|
|
@@ -374972,8 +375184,8 @@ var PendleRouterAdapterContract = class extends AbstractAdapterContract {
|
|
|
374972
375184
|
});
|
|
374973
375185
|
}
|
|
374974
375186
|
};
|
|
374975
|
-
var abi15 =
|
|
374976
|
-
var
|
|
375187
|
+
var abi15 = iPendleRouterAdapterAbi;
|
|
375188
|
+
var PendleRouterAdapterContract = class extends AbstractAdapterContract {
|
|
374977
375189
|
constructor(sdk, args) {
|
|
374978
375190
|
super(sdk, {
|
|
374979
375191
|
...args,
|
|
@@ -374981,8 +375193,8 @@ var StakingRewardsAdapterContract = class extends AbstractAdapterContract {
|
|
|
374981
375193
|
});
|
|
374982
375194
|
}
|
|
374983
375195
|
};
|
|
374984
|
-
var abi16 =
|
|
374985
|
-
var
|
|
375196
|
+
var abi16 = iStakingRewardsAdapterAbi;
|
|
375197
|
+
var StakingRewardsAdapterContract = class extends AbstractAdapterContract {
|
|
374986
375198
|
constructor(sdk, args) {
|
|
374987
375199
|
super(sdk, {
|
|
374988
375200
|
...args,
|
|
@@ -374990,14 +375202,23 @@ var UniswapV2AdapterContract = class extends AbstractAdapterContract {
|
|
|
374990
375202
|
});
|
|
374991
375203
|
}
|
|
374992
375204
|
};
|
|
374993
|
-
var abi17 =
|
|
374994
|
-
var
|
|
375205
|
+
var abi17 = uniswapV2AdapterAbi;
|
|
375206
|
+
var UniswapV2AdapterContract = class extends AbstractAdapterContract {
|
|
374995
375207
|
constructor(sdk, args) {
|
|
374996
375208
|
super(sdk, {
|
|
374997
375209
|
...args,
|
|
374998
375210
|
abi: abi17
|
|
374999
375211
|
});
|
|
375000
375212
|
}
|
|
375213
|
+
};
|
|
375214
|
+
var abi18 = uniswapV3AdapterAbi;
|
|
375215
|
+
var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
375216
|
+
constructor(sdk, args) {
|
|
375217
|
+
super(sdk, {
|
|
375218
|
+
...args,
|
|
375219
|
+
abi: abi18
|
|
375220
|
+
});
|
|
375221
|
+
}
|
|
375001
375222
|
parseFunctionParams(params) {
|
|
375002
375223
|
switch (params.functionName) {
|
|
375003
375224
|
case "exactInputSingle": {
|
|
@@ -375114,30 +375335,30 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
375114
375335
|
return result;
|
|
375115
375336
|
}
|
|
375116
375337
|
};
|
|
375117
|
-
var
|
|
375338
|
+
var abi19 = velodromeV2RouterAdapterAbi;
|
|
375118
375339
|
var VelodromeV2RouterAdapterContract = class extends AbstractAdapterContract {
|
|
375119
375340
|
constructor(sdk, args) {
|
|
375120
375341
|
super(sdk, {
|
|
375121
375342
|
...args,
|
|
375122
|
-
abi:
|
|
375343
|
+
abi: abi19
|
|
375123
375344
|
});
|
|
375124
375345
|
}
|
|
375125
375346
|
};
|
|
375126
|
-
var
|
|
375347
|
+
var abi20 = wstEthv1AdapterAbi;
|
|
375127
375348
|
var WstETHV1AdapterContract = class extends AbstractAdapterContract {
|
|
375128
375349
|
constructor(sdk, args) {
|
|
375129
375350
|
super(sdk, {
|
|
375130
375351
|
...args,
|
|
375131
|
-
abi:
|
|
375352
|
+
abi: abi20
|
|
375132
375353
|
});
|
|
375133
375354
|
}
|
|
375134
375355
|
};
|
|
375135
|
-
var
|
|
375356
|
+
var abi21 = yearnV2AdapterAbi;
|
|
375136
375357
|
var YearnV2RouterAdapterContract = class extends AbstractAdapterContract {
|
|
375137
375358
|
constructor(sdk, args) {
|
|
375138
375359
|
super(sdk, {
|
|
375139
375360
|
...args,
|
|
375140
|
-
abi:
|
|
375361
|
+
abi: abi21
|
|
375141
375362
|
});
|
|
375142
375363
|
}
|
|
375143
375364
|
};
|
|
@@ -375180,6 +375401,8 @@ function createAdapter(sdk, args) {
|
|
|
375180
375401
|
return new YearnV2RouterAdapterContract(sdk, args);
|
|
375181
375402
|
case "AD_MELLOW_LRT_VAULT":
|
|
375182
375403
|
return new MellowVaultAdapterContract(sdk, args);
|
|
375404
|
+
case "AD_MELLOW_ERC4626_VAULT":
|
|
375405
|
+
return new MellowERC4626VaultAdapterContract(sdk, args);
|
|
375183
375406
|
case "AD_PENDLE_ROUTER":
|
|
375184
375407
|
return new PendleRouterAdapterContract(sdk, args);
|
|
375185
375408
|
case "AD_DAI_USDS_EXCHANGE":
|
|
@@ -375192,7 +375415,7 @@ function createAdapter(sdk, args) {
|
|
|
375192
375415
|
);
|
|
375193
375416
|
}
|
|
375194
375417
|
}
|
|
375195
|
-
var
|
|
375418
|
+
var abi222 = creditConfiguratorV3Abi;
|
|
375196
375419
|
var CreditConfiguratorV300Contract = class extends BaseContract {
|
|
375197
375420
|
adapters = [];
|
|
375198
375421
|
isPaused = false;
|
|
@@ -375200,7 +375423,7 @@ var CreditConfiguratorV300Contract = class extends BaseContract {
|
|
|
375200
375423
|
super(sdk, {
|
|
375201
375424
|
...creditConfigurator.baseParams,
|
|
375202
375425
|
name: `CreditConfigurator(${creditManager.name})`,
|
|
375203
|
-
abi:
|
|
375426
|
+
abi: abi222
|
|
375204
375427
|
});
|
|
375205
375428
|
}
|
|
375206
375429
|
processLog(log2) {
|
|
@@ -375299,7 +375522,7 @@ var CreditConfiguratorV300Contract = class extends BaseContract {
|
|
|
375299
375522
|
}
|
|
375300
375523
|
}
|
|
375301
375524
|
};
|
|
375302
|
-
var
|
|
375525
|
+
var abi23 = iCreditConfiguratorV310Abi;
|
|
375303
375526
|
var CreditConfiguratorV310Contract = class extends BaseContract {
|
|
375304
375527
|
adapters = [];
|
|
375305
375528
|
isPaused = false;
|
|
@@ -375307,7 +375530,7 @@ var CreditConfiguratorV310Contract = class extends BaseContract {
|
|
|
375307
375530
|
super(sdk, {
|
|
375308
375531
|
...creditConfigurator.baseParams,
|
|
375309
375532
|
name: `CreditConfigurator(${creditManager.name})`,
|
|
375310
|
-
abi:
|
|
375533
|
+
abi: abi23
|
|
375311
375534
|
});
|
|
375312
375535
|
}
|
|
375313
375536
|
processLog(log2) {
|
|
@@ -375393,7 +375616,7 @@ var CreditConfiguratorV310Contract = class extends BaseContract {
|
|
|
375393
375616
|
}
|
|
375394
375617
|
}
|
|
375395
375618
|
};
|
|
375396
|
-
var
|
|
375619
|
+
var abi24 = [...creditFacadeV3Abi, ...iCreditFacadeV3MulticallAbi];
|
|
375397
375620
|
var CreditFacadeV300Contract = class extends BaseContract {
|
|
375398
375621
|
underlying;
|
|
375399
375622
|
constructor(sdk, { creditFacade, creditManager }) {
|
|
@@ -375401,7 +375624,7 @@ var CreditFacadeV300Contract = class extends BaseContract {
|
|
|
375401
375624
|
super(sdk, {
|
|
375402
375625
|
...baseParams,
|
|
375403
375626
|
name: `CreditFacadeV3(${creditManager.name})`,
|
|
375404
|
-
abi:
|
|
375627
|
+
abi: abi24
|
|
375405
375628
|
});
|
|
375406
375629
|
Object.assign(this, rest2);
|
|
375407
375630
|
this.underlying = creditManager.underlying;
|
|
@@ -375529,7 +375752,7 @@ var CreditFacadeV300Contract = class extends BaseContract {
|
|
|
375529
375752
|
}
|
|
375530
375753
|
}
|
|
375531
375754
|
};
|
|
375532
|
-
var
|
|
375755
|
+
var abi25 = [...iCreditFacadeV310Abi, ...iCreditFacadeV310MulticallAbi];
|
|
375533
375756
|
var CreditFacadeV310Contract = class extends BaseContract {
|
|
375534
375757
|
underlying;
|
|
375535
375758
|
constructor(sdk, { creditFacade, creditManager }) {
|
|
@@ -375537,7 +375760,7 @@ var CreditFacadeV310Contract = class extends BaseContract {
|
|
|
375537
375760
|
super(sdk, {
|
|
375538
375761
|
...baseParams,
|
|
375539
375762
|
name: `CreditFacadeV310(${creditManager.name})`,
|
|
375540
|
-
abi:
|
|
375763
|
+
abi: abi25
|
|
375541
375764
|
});
|
|
375542
375765
|
Object.assign(this, rest2);
|
|
375543
375766
|
this.underlying = creditManager.underlying;
|
|
@@ -375655,7 +375878,7 @@ var CreditFacadeV310Contract = class extends BaseContract {
|
|
|
375655
375878
|
}
|
|
375656
375879
|
}
|
|
375657
375880
|
};
|
|
375658
|
-
var
|
|
375881
|
+
var abi26 = creditManagerV3Abi;
|
|
375659
375882
|
var CreditManagerV300Contract = class extends BaseContract {
|
|
375660
375883
|
/**
|
|
375661
375884
|
* Mapping targetContract => adapter
|
|
@@ -375670,7 +375893,7 @@ var CreditManagerV300Contract = class extends BaseContract {
|
|
|
375670
375893
|
super(sdk, {
|
|
375671
375894
|
...baseParams,
|
|
375672
375895
|
name: `CreditManagerV300(${creditManager.name})`,
|
|
375673
|
-
abi:
|
|
375896
|
+
abi: abi26
|
|
375674
375897
|
});
|
|
375675
375898
|
Object.assign(this, rest2);
|
|
375676
375899
|
this.liquidationThresholds = new AddressMap(
|
|
@@ -375734,7 +375957,7 @@ var CreditManagerV300Contract = class extends BaseContract {
|
|
|
375734
375957
|
}
|
|
375735
375958
|
}
|
|
375736
375959
|
};
|
|
375737
|
-
var
|
|
375960
|
+
var abi27 = iCreditManagerV310Abi;
|
|
375738
375961
|
var CreditManagerV310Contract = class extends BaseContract {
|
|
375739
375962
|
/**
|
|
375740
375963
|
* Mapping targetContract => adapter
|
|
@@ -375749,7 +375972,7 @@ var CreditManagerV310Contract = class extends BaseContract {
|
|
|
375749
375972
|
super(sdk, {
|
|
375750
375973
|
...baseParams,
|
|
375751
375974
|
name: `CreditManagerV310(${creditManager.name})`,
|
|
375752
|
-
abi:
|
|
375975
|
+
abi: abi27
|
|
375753
375976
|
});
|
|
375754
375977
|
Object.assign(this, rest2);
|
|
375755
375978
|
this.liquidationThresholds = new AddressMap(
|
|
@@ -376139,9 +376362,9 @@ async function simulateMulticall(client, parameters) {
|
|
|
376139
376362
|
let currentChunk = 0;
|
|
376140
376363
|
let currentChunkSize = 0;
|
|
376141
376364
|
for (const contract of contracts2) {
|
|
376142
|
-
const { abi:
|
|
376365
|
+
const { abi: abi33, address, args, functionName } = contract;
|
|
376143
376366
|
try {
|
|
376144
|
-
const callData = encodeFunctionData({ abi:
|
|
376367
|
+
const callData = encodeFunctionData({ abi: abi33, args, functionName });
|
|
376145
376368
|
currentChunkSize += (callData.length - 2) / 2;
|
|
376146
376369
|
if (
|
|
376147
376370
|
// Check if batching is enabled.
|
|
@@ -376163,7 +376386,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
376163
376386
|
];
|
|
376164
376387
|
} catch (err) {
|
|
376165
376388
|
const error = getContractError(err, {
|
|
376166
|
-
abi:
|
|
376389
|
+
abi: abi33,
|
|
376167
376390
|
address,
|
|
376168
376391
|
args,
|
|
376169
376392
|
docsPath: "/docs/contract/multicall",
|
|
@@ -376220,12 +376443,12 @@ async function simulateMulticall(client, parameters) {
|
|
|
376220
376443
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
376221
376444
|
const { returnData, success } = aggregate3Result[j];
|
|
376222
376445
|
const { callData } = chunkedCalls[i][j];
|
|
376223
|
-
const { abi:
|
|
376446
|
+
const { abi: abi33, address, functionName, args } = contracts2[results.length];
|
|
376224
376447
|
try {
|
|
376225
376448
|
if (callData === "0x") throw new AbiDecodingZeroDataError();
|
|
376226
376449
|
if (!success) throw new RawContractError({ data: returnData });
|
|
376227
376450
|
const result2 = decodeFunctionResult({
|
|
376228
|
-
abi:
|
|
376451
|
+
abi: abi33,
|
|
376229
376452
|
args,
|
|
376230
376453
|
data: returnData,
|
|
376231
376454
|
functionName
|
|
@@ -376233,7 +376456,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
376233
376456
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
376234
376457
|
} catch (err) {
|
|
376235
376458
|
const error = getContractError(err, {
|
|
376236
|
-
abi:
|
|
376459
|
+
abi: abi33,
|
|
376237
376460
|
address,
|
|
376238
376461
|
args,
|
|
376239
376462
|
docsPath: "/docs/contract/multicall",
|
|
@@ -376248,11 +376471,11 @@ async function simulateMulticall(client, parameters) {
|
|
|
376248
376471
|
throw new BaseError2("multicall results mismatch");
|
|
376249
376472
|
return results;
|
|
376250
376473
|
}
|
|
376251
|
-
var
|
|
376474
|
+
var abi28 = iMarketConfiguratorV310Abi;
|
|
376252
376475
|
var MarketConfiguratorContract = class extends BaseContract {
|
|
376253
376476
|
constructor(sdk, address) {
|
|
376254
376477
|
super(sdk, {
|
|
376255
|
-
abi:
|
|
376478
|
+
abi: abi28,
|
|
376256
376479
|
addr: address,
|
|
376257
376480
|
contractType: AP_MARKET_CONFIGURATOR,
|
|
376258
376481
|
version: 0
|
|
@@ -376271,7 +376494,7 @@ var MarketConfiguratorContract = class extends BaseContract {
|
|
|
376271
376494
|
}
|
|
376272
376495
|
}
|
|
376273
376496
|
};
|
|
376274
|
-
var
|
|
376497
|
+
var abi29 = poolV3Abi;
|
|
376275
376498
|
var PoolContract = class extends BaseContract {
|
|
376276
376499
|
creditManagerDebtParams;
|
|
376277
376500
|
constructor(sdk, data) {
|
|
@@ -376279,7 +376502,7 @@ var PoolContract = class extends BaseContract {
|
|
|
376279
376502
|
super(sdk, {
|
|
376280
376503
|
...data.baseParams,
|
|
376281
376504
|
name: `PoolV3(${data.name})`,
|
|
376282
|
-
abi:
|
|
376505
|
+
abi: abi29
|
|
376283
376506
|
});
|
|
376284
376507
|
Object.assign(this, rest2);
|
|
376285
376508
|
this.creditManagerDebtParams = new AddressMap(
|
|
@@ -378385,6 +378608,7 @@ var decimals = {
|
|
|
378385
378608
|
sUSDS: 18,
|
|
378386
378609
|
YieldETH: 18,
|
|
378387
378610
|
scrvUSD: 18,
|
|
378611
|
+
beraSTONE: 18,
|
|
378388
378612
|
rETH: 18,
|
|
378389
378613
|
rETH_f: 18,
|
|
378390
378614
|
stkUSDS: 18,
|
|
@@ -379059,6 +379283,14 @@ var normalTokens = {
|
|
|
379059
379283
|
/* NORMAL_TOKEN */
|
|
379060
379284
|
}
|
|
379061
379285
|
},
|
|
379286
|
+
beraSTONE: {
|
|
379287
|
+
name: "Berachain STONE",
|
|
379288
|
+
symbol: "beraSTONE",
|
|
379289
|
+
type: {
|
|
379290
|
+
AllNetworks: 1
|
|
379291
|
+
/* NORMAL_TOKEN */
|
|
379292
|
+
}
|
|
379293
|
+
},
|
|
379062
379294
|
frxETH: {
|
|
379063
379295
|
name: "Frax ETH",
|
|
379064
379296
|
symbol: "frxETH",
|
|
@@ -379686,6 +379918,7 @@ var tokenDataByNetwork = {
|
|
|
379686
379918
|
sUSDe: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497",
|
|
379687
379919
|
sUSDS: "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD",
|
|
379688
379920
|
scrvUSD: "0x0655977FEb2f289A4aB78af67BAB0d17aAb84367",
|
|
379921
|
+
beraSTONE: "0x97Ad75064b20fb2B2447feD4fa953bF7F007a706",
|
|
379689
379922
|
// AAVE
|
|
379690
379923
|
aUSDC: "0xBcca60bB61934080951369a648Fb03DF4F96263C",
|
|
379691
379924
|
aDAI: "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
|
|
@@ -379980,6 +380213,7 @@ var tokenDataByNetwork = {
|
|
|
379980
380213
|
sUSDe: NOT_DEPLOYED,
|
|
379981
380214
|
sUSDS: NOT_DEPLOYED,
|
|
379982
380215
|
scrvUSD: NOT_DEPLOYED,
|
|
380216
|
+
beraSTONE: NOT_DEPLOYED,
|
|
379983
380217
|
// ZIRCUIT
|
|
379984
380218
|
zpufETH: NOT_DEPLOYED,
|
|
379985
380219
|
// SKY
|
|
@@ -380258,6 +380492,7 @@ var tokenDataByNetwork = {
|
|
|
380258
380492
|
sUSDe: NOT_DEPLOYED,
|
|
380259
380493
|
sUSDS: NOT_DEPLOYED,
|
|
380260
380494
|
scrvUSD: NOT_DEPLOYED,
|
|
380495
|
+
beraSTONE: NOT_DEPLOYED,
|
|
380261
380496
|
// ZIRCUIT
|
|
380262
380497
|
zpufETH: NOT_DEPLOYED,
|
|
380263
380498
|
// SKY
|
|
@@ -380538,6 +380773,7 @@ var tokenDataByNetwork = {
|
|
|
380538
380773
|
sUSDe: NOT_DEPLOYED,
|
|
380539
380774
|
sUSDS: NOT_DEPLOYED,
|
|
380540
380775
|
scrvUSD: NOT_DEPLOYED,
|
|
380776
|
+
beraSTONE: NOT_DEPLOYED,
|
|
380541
380777
|
GHO: NOT_DEPLOYED,
|
|
380542
380778
|
GHOUSDe: NOT_DEPLOYED,
|
|
380543
380779
|
GHO_USDT_USDC: NOT_DEPLOYED,
|
|
@@ -380643,6 +380879,15 @@ var tickerInfoTokensByNetwork = {
|
|
|
380643
380879
|
reserve: false
|
|
380644
380880
|
}
|
|
380645
380881
|
],
|
|
380882
|
+
beraSTONE: [
|
|
380883
|
+
{
|
|
380884
|
+
symbol: "beraSTONE/ETH",
|
|
380885
|
+
dataId: "beraETH_FUNDAMENTAL",
|
|
380886
|
+
address: "0x692072eE081c9Ded28d2CfD27513E578d895FD0d",
|
|
380887
|
+
priceFeed: "0xf12b7879713FA998B39b3C7C9c2631E40a0b9dfB",
|
|
380888
|
+
reserve: false
|
|
380889
|
+
}
|
|
380890
|
+
],
|
|
380646
380891
|
stkcvxcrvUSDUSDC: [
|
|
380647
380892
|
{
|
|
380648
380893
|
symbol: "crvUSD",
|
|
@@ -383168,7 +383413,7 @@ var MellowLRTPriceFeedContract = class extends AbstractLPPriceFeedContract {
|
|
|
383168
383413
|
return stack.totalValue * BigInt(1e18) / stack.totalSupply;
|
|
383169
383414
|
}
|
|
383170
383415
|
};
|
|
383171
|
-
var
|
|
383416
|
+
var abi30 = pendleTWAPPTPriceFeedAbi;
|
|
383172
383417
|
var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
|
|
383173
383418
|
market;
|
|
383174
383419
|
sy;
|
|
@@ -383180,7 +383425,7 @@ var PendleTWAPPTPriceFeed = class extends AbstractPriceFeedContract {
|
|
|
383180
383425
|
super(sdk, {
|
|
383181
383426
|
...args,
|
|
383182
383427
|
name: "PendleTWAPPTPriceFeed",
|
|
383183
|
-
abi:
|
|
383428
|
+
abi: abi30
|
|
383184
383429
|
});
|
|
383185
383430
|
const decoded = decodeAbiParameters(
|
|
383186
383431
|
[
|
|
@@ -383820,6 +384065,16 @@ var PriceOracleBaseContract = class extends BaseContract {
|
|
|
383820
384065
|
);
|
|
383821
384066
|
return result;
|
|
383822
384067
|
}
|
|
384068
|
+
/**
|
|
384069
|
+
* Returns true if oracle's price feed tree contains given price feed
|
|
384070
|
+
* @param priceFeed
|
|
384071
|
+
* @returns
|
|
384072
|
+
*/
|
|
384073
|
+
usesPriceFeed(priceFeed) {
|
|
384074
|
+
return this.#priceFeedTree.some(
|
|
384075
|
+
(node) => node.baseParams.addr.toLowerCase() === priceFeed.toLowerCase()
|
|
384076
|
+
);
|
|
384077
|
+
}
|
|
383823
384078
|
/**
|
|
383824
384079
|
* Tries to convert amount of token into underlying of current market
|
|
383825
384080
|
* @param token
|
|
@@ -384272,7 +384527,16 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
384272
384527
|
return market;
|
|
384273
384528
|
}
|
|
384274
384529
|
}
|
|
384275
|
-
throw new Error(`cannot find price oracle ${address}`);
|
|
384530
|
+
throw new Error(`cannot find market for price oracle ${address}`);
|
|
384531
|
+
}
|
|
384532
|
+
findByPool(address) {
|
|
384533
|
+
const addr = address.toLowerCase();
|
|
384534
|
+
for (const market of this.markets) {
|
|
384535
|
+
if (market.pool.pool.address.toLowerCase() === addr) {
|
|
384536
|
+
return market;
|
|
384537
|
+
}
|
|
384538
|
+
}
|
|
384539
|
+
throw new Error(`cannot find market for pool ${address}`);
|
|
384276
384540
|
}
|
|
384277
384541
|
get marketsMap() {
|
|
384278
384542
|
return this.#markets;
|
|
@@ -385502,7 +385766,7 @@ var AbstractAddressProviderContract = class extends BaseContract {
|
|
|
385502
385766
|
};
|
|
385503
385767
|
}
|
|
385504
385768
|
};
|
|
385505
|
-
var
|
|
385769
|
+
var abi31 = iAddressProviderV3_1Abi;
|
|
385506
385770
|
var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract {
|
|
385507
385771
|
constructor(sdk, address, addresses = {}) {
|
|
385508
385772
|
super(
|
|
@@ -385510,7 +385774,7 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
|
|
|
385510
385774
|
{
|
|
385511
385775
|
addr: address,
|
|
385512
385776
|
name: "AddressProviderV3_1",
|
|
385513
|
-
abi:
|
|
385777
|
+
abi: abi31,
|
|
385514
385778
|
version: 310
|
|
385515
385779
|
},
|
|
385516
385780
|
addresses
|
|
@@ -385560,7 +385824,7 @@ var AddressProviderContractV3_1 = class extends AbstractAddressProviderContract
|
|
|
385560
385824
|
}
|
|
385561
385825
|
}
|
|
385562
385826
|
};
|
|
385563
|
-
var
|
|
385827
|
+
var abi32 = iAddressProviderV3Abi;
|
|
385564
385828
|
var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
|
|
385565
385829
|
constructor(sdk, address, addresses = {}) {
|
|
385566
385830
|
super(
|
|
@@ -385568,7 +385832,7 @@ var AddressProviderContractV3 = class extends AbstractAddressProviderContract {
|
|
|
385568
385832
|
{
|
|
385569
385833
|
addr: address,
|
|
385570
385834
|
name: "AddressProviderV3",
|
|
385571
|
-
abi:
|
|
385835
|
+
abi: abi32,
|
|
385572
385836
|
version: 300
|
|
385573
385837
|
},
|
|
385574
385838
|
addresses
|
|
@@ -403176,7 +403440,7 @@ function normalizeTransactions(batch) {
|
|
|
403176
403440
|
});
|
|
403177
403441
|
}
|
|
403178
403442
|
function normalizeDirectTx(t) {
|
|
403179
|
-
const
|
|
403443
|
+
const abi33 = [
|
|
403180
403444
|
{
|
|
403181
403445
|
type: "function",
|
|
403182
403446
|
outputs: [],
|
|
@@ -403198,10 +403462,10 @@ function normalizeDirectTx(t) {
|
|
|
403198
403462
|
return {
|
|
403199
403463
|
target: t.to,
|
|
403200
403464
|
value: t.value,
|
|
403201
|
-
signature: formatAbiItem2(
|
|
403465
|
+
signature: formatAbiItem2(abi33[0], { includeName: false }),
|
|
403202
403466
|
parameters,
|
|
403203
403467
|
data: encodeFunctionData({
|
|
403204
|
-
abi:
|
|
403468
|
+
abi: abi33,
|
|
403205
403469
|
functionName: t.contractMethod.name,
|
|
403206
403470
|
args: values
|
|
403207
403471
|
})
|
|
@@ -413529,15 +413793,15 @@ function resolveStructs2(abiParameters, structs, ancestors = /* @__PURE__ */ new
|
|
|
413529
413793
|
// ../../node_modules/abitype/dist/esm/human-readable/parseAbi.js
|
|
413530
413794
|
function parseAbi2(signatures) {
|
|
413531
413795
|
const structs = parseStructs2(signatures);
|
|
413532
|
-
const
|
|
413796
|
+
const abi33 = [];
|
|
413533
413797
|
const length = signatures.length;
|
|
413534
413798
|
for (let i = 0; i < length; i++) {
|
|
413535
413799
|
const signature = signatures[i];
|
|
413536
413800
|
if (isStructSignature2(signature))
|
|
413537
413801
|
continue;
|
|
413538
|
-
|
|
413802
|
+
abi33.push(parseSignature2(signature, structs));
|
|
413539
413803
|
}
|
|
413540
|
-
return
|
|
413804
|
+
return abi33;
|
|
413541
413805
|
}
|
|
413542
413806
|
|
|
413543
413807
|
// ../../packages/node/dist/tree/visitors/ContractsRegisterVisitor.js
|
|
@@ -415041,9 +415305,9 @@ var AbstractParser = class {
|
|
|
415041
415305
|
};
|
|
415042
415306
|
}
|
|
415043
415307
|
parseConstructor(address, encodedArgs) {
|
|
415044
|
-
for (const { abi:
|
|
415308
|
+
for (const { abi: abi33, comment } of this.constructorAbis) {
|
|
415045
415309
|
try {
|
|
415046
|
-
return this.#parseConstructor(address, encodedArgs,
|
|
415310
|
+
return this.#parseConstructor(address, encodedArgs, abi33, comment);
|
|
415047
415311
|
} catch (e) {
|
|
415048
415312
|
this.logger.warn(`constructor ${comment} of ${address} failed to parse args: ${e}`);
|
|
415049
415313
|
}
|
|
@@ -415445,6 +415709,17 @@ var LidoWstethV1AdapterParser = class extends AbstractParser {
|
|
|
415445
415709
|
}
|
|
415446
415710
|
};
|
|
415447
415711
|
|
|
415712
|
+
// ../../packages/node/dist/parsers/adapters/MellowErc4626AdapterParser.js
|
|
415713
|
+
var MellowErc4626AdapterParser = class extends AbstractParser {
|
|
415714
|
+
constructor(contractType) {
|
|
415715
|
+
super(contractType, "constructor(address _creditManager, address _vault)");
|
|
415716
|
+
this._abi = ierc4626AdapterAbi;
|
|
415717
|
+
this.parameterParsers = {
|
|
415718
|
+
constructor: [parseAddress(), parseAddress()]
|
|
415719
|
+
};
|
|
415720
|
+
}
|
|
415721
|
+
};
|
|
415722
|
+
|
|
415448
415723
|
// ../../packages/node/dist/parsers/adapters/MellowVaultAdapterParser.js
|
|
415449
415724
|
var MellowVaultAdapterParser = class extends AbstractParser {
|
|
415450
415725
|
constructor(contractType) {
|
|
@@ -415629,6 +415904,8 @@ function adapterParser(contract, version5, contractName) {
|
|
|
415629
415904
|
return new PendlerRouterAdapterParser(contract);
|
|
415630
415905
|
case "ADAPTER_MELLOW_LRT_VAULT":
|
|
415631
415906
|
return new MellowVaultAdapterParser(contract);
|
|
415907
|
+
case "ADAPTER_MELLOW_ERC4626_VAULT":
|
|
415908
|
+
return new MellowErc4626AdapterParser(contract);
|
|
415632
415909
|
}
|
|
415633
415910
|
}
|
|
415634
415911
|
|
|
@@ -418852,7 +419129,7 @@ function getRenderer(opts) {
|
|
|
418852
419129
|
var package_default = {
|
|
418853
419130
|
name: "@gearbox-protocol/deploy-tools",
|
|
418854
419131
|
description: "Gearbox deploy tools",
|
|
418855
|
-
version: "5.5.
|
|
419132
|
+
version: "5.5.2",
|
|
418856
419133
|
homepage: "https://gearbox.fi",
|
|
418857
419134
|
keywords: [
|
|
418858
419135
|
"gearbox"
|
|
@@ -418895,7 +419172,7 @@ var package_default = {
|
|
|
418895
419172
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
418896
419173
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
418897
419174
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
418898
|
-
"@gearbox-protocol/sdk": "^3.0.0-vfour.
|
|
419175
|
+
"@gearbox-protocol/sdk": "^3.0.0-vfour.187",
|
|
418899
419176
|
"@gearbox-protocol/sdk-gov": "^2.33.2",
|
|
418900
419177
|
"@types/lodash-es": "^4.17.12",
|
|
418901
419178
|
"@types/node": "^22.10.6",
|
|
@@ -418917,7 +419194,7 @@ var package_default = {
|
|
|
418917
419194
|
"react-dom": "^19.0.0",
|
|
418918
419195
|
table: "^6.9.0",
|
|
418919
419196
|
tsx: "^4.19.2",
|
|
418920
|
-
viem: "^2.22.
|
|
419197
|
+
viem: "^2.22.11",
|
|
418921
419198
|
yaml: "^2.7.0",
|
|
418922
419199
|
zod: "^3.24.1"
|
|
418923
419200
|
},
|