@gearbox-protocol/deploy-tools 5.18.8 → 5.18.10
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 +761 -340
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -4168,15 +4168,15 @@ var init_structs = __esm({
|
|
|
4168
4168
|
// ../../node_modules/abitype/dist/esm/human-readable/parseAbi.js
|
|
4169
4169
|
function parseAbi(signatures) {
|
|
4170
4170
|
const structs = parseStructs(signatures);
|
|
4171
|
-
const
|
|
4171
|
+
const abi48 = [];
|
|
4172
4172
|
const length = signatures.length;
|
|
4173
4173
|
for (let i = 0; i < length; i++) {
|
|
4174
4174
|
const signature = signatures[i];
|
|
4175
4175
|
if (isStructSignature(signature))
|
|
4176
4176
|
continue;
|
|
4177
|
-
|
|
4177
|
+
abi48.push(parseSignature(signature, structs));
|
|
4178
4178
|
}
|
|
4179
|
-
return
|
|
4179
|
+
return abi48;
|
|
4180
4180
|
}
|
|
4181
4181
|
var init_parseAbi = __esm({
|
|
4182
4182
|
"../../node_modules/abitype/dist/esm/human-readable/parseAbi.js"() {
|
|
@@ -5893,9 +5893,9 @@ var init_toFunctionSelector = __esm({
|
|
|
5893
5893
|
|
|
5894
5894
|
// ../../node_modules/viem/_esm/utils/abi/getAbiItem.js
|
|
5895
5895
|
function getAbiItem(parameters) {
|
|
5896
|
-
const { abi:
|
|
5896
|
+
const { abi: abi48, args = [], name } = parameters;
|
|
5897
5897
|
const isSelector = isHex(name, { strict: false });
|
|
5898
|
-
const abiItems =
|
|
5898
|
+
const abiItems = abi48.filter((abiItem) => {
|
|
5899
5899
|
if (isSelector) {
|
|
5900
5900
|
if (abiItem.type === "function")
|
|
5901
5901
|
return toFunctionSelector(abiItem) === name;
|
|
@@ -6025,11 +6025,11 @@ var init_parseAccount = __esm({
|
|
|
6025
6025
|
|
|
6026
6026
|
// ../../node_modules/viem/_esm/utils/abi/prepareEncodeFunctionData.js
|
|
6027
6027
|
function prepareEncodeFunctionData(parameters) {
|
|
6028
|
-
const { abi:
|
|
6029
|
-
let abiItem =
|
|
6028
|
+
const { abi: abi48, args, functionName } = parameters;
|
|
6029
|
+
let abiItem = abi48[0];
|
|
6030
6030
|
if (functionName) {
|
|
6031
6031
|
const item = getAbiItem({
|
|
6032
|
-
abi:
|
|
6032
|
+
abi: abi48,
|
|
6033
6033
|
args,
|
|
6034
6034
|
name: functionName
|
|
6035
6035
|
});
|
|
@@ -6058,12 +6058,12 @@ var init_prepareEncodeFunctionData = __esm({
|
|
|
6058
6058
|
// ../../node_modules/viem/_esm/utils/abi/encodeFunctionData.js
|
|
6059
6059
|
function encodeFunctionData(parameters) {
|
|
6060
6060
|
const { args } = parameters;
|
|
6061
|
-
const { abi:
|
|
6061
|
+
const { abi: abi48, functionName } = (() => {
|
|
6062
6062
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
6063
6063
|
return parameters;
|
|
6064
6064
|
return prepareEncodeFunctionData(parameters);
|
|
6065
6065
|
})();
|
|
6066
|
-
const abiItem =
|
|
6066
|
+
const abiItem = abi48[0];
|
|
6067
6067
|
const signature = functionName;
|
|
6068
6068
|
const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
6069
6069
|
return concatHex([signature, data ?? "0x"]);
|
|
@@ -6558,11 +6558,11 @@ var init_decodeAbiParameters = __esm({
|
|
|
6558
6558
|
|
|
6559
6559
|
// ../../node_modules/viem/_esm/utils/abi/decodeErrorResult.js
|
|
6560
6560
|
function decodeErrorResult(parameters) {
|
|
6561
|
-
const { abi:
|
|
6561
|
+
const { abi: abi48, data } = parameters;
|
|
6562
6562
|
const signature = slice(data, 0, 4);
|
|
6563
6563
|
if (signature === "0x")
|
|
6564
6564
|
throw new AbiDecodingZeroDataError();
|
|
6565
|
-
const abi_ = [...
|
|
6565
|
+
const abi_ = [...abi48 || [], solidityError, solidityPanic];
|
|
6566
6566
|
const abiItem = abi_.find((x) => x.type === "error" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
6567
6567
|
if (!abiItem)
|
|
6568
6568
|
throw new AbiErrorSignatureNotFoundError(signature, {
|
|
@@ -6905,8 +6905,8 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6905
6905
|
}
|
|
6906
6906
|
};
|
|
6907
6907
|
ContractFunctionExecutionError = class extends BaseError2 {
|
|
6908
|
-
constructor(cause, { abi:
|
|
6909
|
-
const abiItem = getAbiItem({ abi:
|
|
6908
|
+
constructor(cause, { abi: abi48, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
6909
|
+
const abiItem = getAbiItem({ abi: abi48, args, name: functionName });
|
|
6910
6910
|
const formattedArgs = abiItem ? formatAbiItemWithArgs({
|
|
6911
6911
|
abiItem,
|
|
6912
6912
|
args,
|
|
@@ -6972,7 +6972,7 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6972
6972
|
writable: true,
|
|
6973
6973
|
value: void 0
|
|
6974
6974
|
});
|
|
6975
|
-
this.abi =
|
|
6975
|
+
this.abi = abi48;
|
|
6976
6976
|
this.args = args;
|
|
6977
6977
|
this.cause = cause;
|
|
6978
6978
|
this.contractAddress = contractAddress;
|
|
@@ -6981,14 +6981,14 @@ ${prettyStateOverride(stateOverride)}`;
|
|
|
6981
6981
|
}
|
|
6982
6982
|
};
|
|
6983
6983
|
ContractFunctionRevertedError = class extends BaseError2 {
|
|
6984
|
-
constructor({ abi:
|
|
6984
|
+
constructor({ abi: abi48, data, functionName, message }) {
|
|
6985
6985
|
let cause;
|
|
6986
6986
|
let decodedData = void 0;
|
|
6987
6987
|
let metaMessages;
|
|
6988
6988
|
let reason;
|
|
6989
6989
|
if (data && data !== "0x") {
|
|
6990
6990
|
try {
|
|
6991
|
-
decodedData = decodeErrorResult({ abi:
|
|
6991
|
+
decodedData = decodeErrorResult({ abi: abi48, data });
|
|
6992
6992
|
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
6993
6993
|
if (errorName === "Error") {
|
|
6994
6994
|
reason = errorArgs[0];
|
|
@@ -10595,10 +10595,10 @@ var init_isAddressEqual = __esm({
|
|
|
10595
10595
|
|
|
10596
10596
|
// ../../node_modules/viem/_esm/utils/abi/decodeFunctionResult.js
|
|
10597
10597
|
function decodeFunctionResult(parameters) {
|
|
10598
|
-
const { abi:
|
|
10599
|
-
let abiItem =
|
|
10598
|
+
const { abi: abi48, args, functionName, data } = parameters;
|
|
10599
|
+
let abiItem = abi48[0];
|
|
10600
10600
|
if (functionName) {
|
|
10601
|
-
const item = getAbiItem({ abi:
|
|
10601
|
+
const item = getAbiItem({ abi: abi48, args, name: functionName });
|
|
10602
10602
|
if (!item)
|
|
10603
10603
|
throw new AbiFunctionNotFoundError(functionName, { docsPath: docsPath4 });
|
|
10604
10604
|
abiItem = item;
|
|
@@ -11434,10 +11434,10 @@ var init_chain = __esm({
|
|
|
11434
11434
|
|
|
11435
11435
|
// ../../node_modules/viem/_esm/utils/abi/encodeDeployData.js
|
|
11436
11436
|
function encodeDeployData(parameters) {
|
|
11437
|
-
const { abi:
|
|
11437
|
+
const { abi: abi48, args, bytecode } = parameters;
|
|
11438
11438
|
if (!args || args.length === 0)
|
|
11439
11439
|
return bytecode;
|
|
11440
|
-
const description =
|
|
11440
|
+
const description = abi48.find((x) => "type" in x && x.type === "constructor");
|
|
11441
11441
|
if (!description)
|
|
11442
11442
|
throw new AbiConstructorNotFoundError({ docsPath: docsPath5 });
|
|
11443
11443
|
if (!("inputs" in description))
|
|
@@ -21294,13 +21294,13 @@ var require_interface = __commonJS({
|
|
|
21294
21294
|
function Interface2(fragments) {
|
|
21295
21295
|
var _newTarget = this.constructor;
|
|
21296
21296
|
var _this = this;
|
|
21297
|
-
var
|
|
21297
|
+
var abi48 = [];
|
|
21298
21298
|
if (typeof fragments === "string") {
|
|
21299
|
-
|
|
21299
|
+
abi48 = JSON.parse(fragments);
|
|
21300
21300
|
} else {
|
|
21301
|
-
|
|
21301
|
+
abi48 = fragments;
|
|
21302
21302
|
}
|
|
21303
|
-
(0, properties_1.defineReadOnly)(this, "fragments",
|
|
21303
|
+
(0, properties_1.defineReadOnly)(this, "fragments", abi48.map(function(fragment) {
|
|
21304
21304
|
return fragments_1.Fragment.from(fragment);
|
|
21305
21305
|
}).filter(function(fragment) {
|
|
21306
21306
|
return fragment != null;
|
|
@@ -21354,15 +21354,15 @@ var require_interface = __commonJS({
|
|
|
21354
21354
|
if (format === fragments_1.FormatTypes.sighash) {
|
|
21355
21355
|
logger2.throwArgumentError("interface does not support formatting sighash", "format", format);
|
|
21356
21356
|
}
|
|
21357
|
-
var
|
|
21357
|
+
var abi48 = this.fragments.map(function(fragment) {
|
|
21358
21358
|
return fragment.format(format);
|
|
21359
21359
|
});
|
|
21360
21360
|
if (format === fragments_1.FormatTypes.json) {
|
|
21361
|
-
return JSON.stringify(
|
|
21361
|
+
return JSON.stringify(abi48.map(function(j) {
|
|
21362
21362
|
return JSON.parse(j);
|
|
21363
21363
|
}));
|
|
21364
21364
|
}
|
|
21365
|
-
return
|
|
21365
|
+
return abi48;
|
|
21366
21366
|
};
|
|
21367
21367
|
Interface2.getAbiCoder = function() {
|
|
21368
21368
|
return abi_coder_1.defaultAbiCoder;
|
|
@@ -37104,14 +37104,14 @@ var require_lib29 = __commonJS({
|
|
|
37104
37104
|
if (typeof compilerOutput === "string") {
|
|
37105
37105
|
compilerOutput = JSON.parse(compilerOutput);
|
|
37106
37106
|
}
|
|
37107
|
-
var
|
|
37107
|
+
var abi48 = compilerOutput.abi;
|
|
37108
37108
|
var bytecode = null;
|
|
37109
37109
|
if (compilerOutput.bytecode) {
|
|
37110
37110
|
bytecode = compilerOutput.bytecode;
|
|
37111
37111
|
} else if (compilerOutput.evm && compilerOutput.evm.bytecode) {
|
|
37112
37112
|
bytecode = compilerOutput.evm.bytecode;
|
|
37113
37113
|
}
|
|
37114
|
-
return new this(
|
|
37114
|
+
return new this(abi48, bytecode, signer);
|
|
37115
37115
|
};
|
|
37116
37116
|
ContractFactory2.getInterface = function(contractInterface) {
|
|
37117
37117
|
return Contract.getInterface(contractInterface);
|
|
@@ -51169,7 +51169,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
51169
51169
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
51170
51170
|
var vars = process.config && process.config.variables || {};
|
|
51171
51171
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
51172
|
-
var
|
|
51172
|
+
var abi48 = process.versions.modules;
|
|
51173
51173
|
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
51174
51174
|
var arch = process.env.npm_config_arch || os2.arch();
|
|
51175
51175
|
var platform = process.env.npm_config_platform || os2.platform();
|
|
@@ -51201,7 +51201,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
51201
51201
|
"platform=" + platform,
|
|
51202
51202
|
"arch=" + arch,
|
|
51203
51203
|
"runtime=" + runtime,
|
|
51204
|
-
"abi=" +
|
|
51204
|
+
"abi=" + abi48,
|
|
51205
51205
|
"uv=" + uv,
|
|
51206
51206
|
armv ? "armv=" + armv : "",
|
|
51207
51207
|
"libc=" + libc,
|
|
@@ -51217,7 +51217,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
51217
51217
|
if (!tuple) return;
|
|
51218
51218
|
var prebuilds = path12.join(dir2, "prebuilds", tuple.name);
|
|
51219
51219
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
51220
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
51220
|
+
var candidates = parsed.filter(matchTags(runtime, abi48));
|
|
51221
51221
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
51222
51222
|
if (winner) return path12.join(prebuilds, winner.file);
|
|
51223
51223
|
}
|
|
@@ -51282,11 +51282,11 @@ var require_node_gyp_build = __commonJS({
|
|
|
51282
51282
|
}
|
|
51283
51283
|
return tags;
|
|
51284
51284
|
}
|
|
51285
|
-
function matchTags(runtime2,
|
|
51285
|
+
function matchTags(runtime2, abi49) {
|
|
51286
51286
|
return function(tags) {
|
|
51287
51287
|
if (tags == null) return false;
|
|
51288
51288
|
if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
51289
|
-
if (tags.abi && tags.abi !==
|
|
51289
|
+
if (tags.abi && tags.abi !== abi49 && !tags.napi) return false;
|
|
51290
51290
|
if (tags.uv && tags.uv !== uv) return false;
|
|
51291
51291
|
if (tags.armv && tags.armv !== armv) return false;
|
|
51292
51292
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -111126,17 +111126,17 @@ var require_interface2 = __commonJS({
|
|
|
111126
111126
|
* Create a new Interface for the %%fragments%%.
|
|
111127
111127
|
*/
|
|
111128
111128
|
constructor(fragments) {
|
|
111129
|
-
let
|
|
111129
|
+
let abi48 = [];
|
|
111130
111130
|
if (typeof fragments === "string") {
|
|
111131
|
-
|
|
111131
|
+
abi48 = JSON.parse(fragments);
|
|
111132
111132
|
} else {
|
|
111133
|
-
|
|
111133
|
+
abi48 = fragments;
|
|
111134
111134
|
}
|
|
111135
111135
|
this.#functions = /* @__PURE__ */ new Map();
|
|
111136
111136
|
this.#errors = /* @__PURE__ */ new Map();
|
|
111137
111137
|
this.#events = /* @__PURE__ */ new Map();
|
|
111138
111138
|
const frags = [];
|
|
111139
|
-
for (const a of
|
|
111139
|
+
for (const a of abi48) {
|
|
111140
111140
|
try {
|
|
111141
111141
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
111142
111142
|
} catch (error) {
|
|
@@ -111200,16 +111200,16 @@ var require_interface2 = __commonJS({
|
|
|
111200
111200
|
*/
|
|
111201
111201
|
format(minimal) {
|
|
111202
111202
|
const format = minimal ? "minimal" : "full";
|
|
111203
|
-
const
|
|
111204
|
-
return
|
|
111203
|
+
const abi48 = this.fragments.map((f) => f.format(format));
|
|
111204
|
+
return abi48;
|
|
111205
111205
|
}
|
|
111206
111206
|
/**
|
|
111207
111207
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
111208
111208
|
* returns.
|
|
111209
111209
|
*/
|
|
111210
111210
|
formatJson() {
|
|
111211
|
-
const
|
|
111212
|
-
return JSON.stringify(
|
|
111211
|
+
const abi48 = this.fragments.map((f) => f.format("json"));
|
|
111212
|
+
return JSON.stringify(abi48.map((j) => JSON.parse(j)));
|
|
111213
111213
|
}
|
|
111214
111214
|
/**
|
|
111215
111215
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -113977,12 +113977,12 @@ var require_contract = __commonJS({
|
|
|
113977
113977
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
113978
113978
|
* of.
|
|
113979
113979
|
*/
|
|
113980
|
-
constructor(target,
|
|
113980
|
+
constructor(target, abi48, runner, _deployTx) {
|
|
113981
113981
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
113982
113982
|
if (runner == null) {
|
|
113983
113983
|
runner = null;
|
|
113984
113984
|
}
|
|
113985
|
-
const iface = index_js_1.Interface.from(
|
|
113985
|
+
const iface = index_js_1.Interface.from(abi48);
|
|
113986
113986
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
113987
113987
|
Object.defineProperty(this, internal, { value: {} });
|
|
113988
113988
|
let addrPromise;
|
|
@@ -114345,10 +114345,10 @@ var require_contract = __commonJS({
|
|
|
114345
114345
|
/**
|
|
114346
114346
|
* Create a new Class for the %%abi%%.
|
|
114347
114347
|
*/
|
|
114348
|
-
static buildClass(
|
|
114348
|
+
static buildClass(abi48) {
|
|
114349
114349
|
class CustomContract extends _BaseContract {
|
|
114350
114350
|
constructor(address, runner = null) {
|
|
114351
|
-
super(address,
|
|
114351
|
+
super(address, abi48, runner);
|
|
114352
114352
|
}
|
|
114353
114353
|
}
|
|
114354
114354
|
return CustomContract;
|
|
@@ -114356,11 +114356,11 @@ var require_contract = __commonJS({
|
|
|
114356
114356
|
/**
|
|
114357
114357
|
* Create a new BaseContract with a specified Interface.
|
|
114358
114358
|
*/
|
|
114359
|
-
static from(target,
|
|
114359
|
+
static from(target, abi48, runner) {
|
|
114360
114360
|
if (runner == null) {
|
|
114361
114361
|
runner = null;
|
|
114362
114362
|
}
|
|
114363
|
-
const contract = new this(target,
|
|
114363
|
+
const contract = new this(target, abi48, runner);
|
|
114364
114364
|
return contract;
|
|
114365
114365
|
}
|
|
114366
114366
|
};
|
|
@@ -114404,8 +114404,8 @@ var require_factory = __commonJS({
|
|
|
114404
114404
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
114405
114405
|
* standard Solidity JSON output.
|
|
114406
114406
|
*/
|
|
114407
|
-
constructor(
|
|
114408
|
-
const iface = index_js_1.Interface.from(
|
|
114407
|
+
constructor(abi48, bytecode, runner) {
|
|
114408
|
+
const iface = index_js_1.Interface.from(abi48);
|
|
114409
114409
|
if (bytecode instanceof Uint8Array) {
|
|
114410
114410
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
114411
114411
|
} else {
|
|
@@ -114475,14 +114475,14 @@ var require_factory = __commonJS({
|
|
|
114475
114475
|
if (typeof output === "string") {
|
|
114476
114476
|
output = JSON.parse(output);
|
|
114477
114477
|
}
|
|
114478
|
-
const
|
|
114478
|
+
const abi48 = output.abi;
|
|
114479
114479
|
let bytecode = "";
|
|
114480
114480
|
if (output.bytecode) {
|
|
114481
114481
|
bytecode = output.bytecode;
|
|
114482
114482
|
} else if (output.evm && output.evm.bytecode) {
|
|
114483
114483
|
bytecode = output.evm.bytecode;
|
|
114484
114484
|
}
|
|
114485
|
-
return new this(
|
|
114485
|
+
return new this(abi48, bytecode, runner);
|
|
114486
114486
|
}
|
|
114487
114487
|
};
|
|
114488
114488
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -119410,8 +119410,8 @@ var require_provider_etherscan = __commonJS({
|
|
|
119410
119410
|
action: "getabi",
|
|
119411
119411
|
address
|
|
119412
119412
|
});
|
|
119413
|
-
const
|
|
119414
|
-
return new index_js_2.Contract(address,
|
|
119413
|
+
const abi48 = JSON.parse(resp);
|
|
119414
|
+
return new index_js_2.Contract(address, abi48, this);
|
|
119415
119415
|
} catch (error) {
|
|
119416
119416
|
return null;
|
|
119417
119417
|
}
|
|
@@ -145374,9 +145374,9 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145374
145374
|
var vars = process.config && process.config.variables || {};
|
|
145375
145375
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
145376
145376
|
var versions = process.versions;
|
|
145377
|
-
var
|
|
145377
|
+
var abi48 = versions.modules;
|
|
145378
145378
|
if (versions.deno || process.isBun) {
|
|
145379
|
-
|
|
145379
|
+
abi48 = "unsupported";
|
|
145380
145380
|
}
|
|
145381
145381
|
var runtime = isElectron() ? "electron" : "node";
|
|
145382
145382
|
var arch = process.arch;
|
|
@@ -145423,7 +145423,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145423
145423
|
"platform=" + platform,
|
|
145424
145424
|
"arch=" + arch,
|
|
145425
145425
|
"runtime=" + runtime,
|
|
145426
|
-
"abi=" +
|
|
145426
|
+
"abi=" + abi48,
|
|
145427
145427
|
"uv=" + uv,
|
|
145428
145428
|
armv ? "armv=" + armv : "",
|
|
145429
145429
|
"libc=" + libc,
|
|
@@ -145441,7 +145441,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145441
145441
|
}
|
|
145442
145442
|
function resolveFile(prebuilds) {
|
|
145443
145443
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
145444
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
145444
|
+
var candidates = parsed.filter(matchTags(runtime, abi48));
|
|
145445
145445
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
145446
145446
|
if (winner) return path12.join(prebuilds, winner.file);
|
|
145447
145447
|
}
|
|
@@ -145506,11 +145506,11 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
145506
145506
|
}
|
|
145507
145507
|
return tags;
|
|
145508
145508
|
}
|
|
145509
|
-
function matchTags(runtime2,
|
|
145509
|
+
function matchTags(runtime2, abi49) {
|
|
145510
145510
|
return function(tags) {
|
|
145511
145511
|
if (tags == null) return false;
|
|
145512
145512
|
if (tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
145513
|
-
if (tags.abi !==
|
|
145513
|
+
if (tags.abi !== abi49 && !tags.napi) return false;
|
|
145514
145514
|
if (tags.uv && tags.uv !== uv) return false;
|
|
145515
145515
|
if (tags.armv && tags.armv !== armv) return false;
|
|
145516
145516
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -151535,11 +151535,11 @@ var require_formatAbi = __commonJS({
|
|
|
151535
151535
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
151536
151536
|
exports2.formatAbi = formatAbi;
|
|
151537
151537
|
var formatAbiItem_js_1 = require_formatAbiItem();
|
|
151538
|
-
function formatAbi(
|
|
151538
|
+
function formatAbi(abi48) {
|
|
151539
151539
|
const signatures = [];
|
|
151540
|
-
const length =
|
|
151540
|
+
const length = abi48.length;
|
|
151541
151541
|
for (let i = 0; i < length; i++) {
|
|
151542
|
-
const abiItem =
|
|
151542
|
+
const abiItem = abi48[i];
|
|
151543
151543
|
const signature = (0, formatAbiItem_js_1.formatAbiItem)(abiItem);
|
|
151544
151544
|
signatures.push(signature);
|
|
151545
151545
|
}
|
|
@@ -152302,15 +152302,15 @@ var require_parseAbi = __commonJS({
|
|
|
152302
152302
|
var utils_js_1 = require_utils13();
|
|
152303
152303
|
function parseAbi2(signatures) {
|
|
152304
152304
|
const structs = (0, structs_js_1.parseStructs)(signatures);
|
|
152305
|
-
const
|
|
152305
|
+
const abi48 = [];
|
|
152306
152306
|
const length = signatures.length;
|
|
152307
152307
|
for (let i = 0; i < length; i++) {
|
|
152308
152308
|
const signature = signatures[i];
|
|
152309
152309
|
if ((0, signatures_js_1.isStructSignature)(signature))
|
|
152310
152310
|
continue;
|
|
152311
|
-
|
|
152311
|
+
abi48.push((0, utils_js_1.parseSignature)(signature, structs));
|
|
152312
152312
|
}
|
|
152313
|
-
return
|
|
152313
|
+
return abi48;
|
|
152314
152314
|
}
|
|
152315
152315
|
}
|
|
152316
152316
|
});
|
|
@@ -162102,9 +162102,9 @@ var require_getAbiItem = __commonJS({
|
|
|
162102
162102
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
162103
162103
|
var toFunctionSelector_js_1 = require_toFunctionSelector();
|
|
162104
162104
|
function getAbiItem2(parameters) {
|
|
162105
|
-
const { abi:
|
|
162105
|
+
const { abi: abi48, args = [], name } = parameters;
|
|
162106
162106
|
const isSelector = (0, isHex_js_1.isHex)(name, { strict: false });
|
|
162107
|
-
const abiItems =
|
|
162107
|
+
const abiItems = abi48.filter((abiItem) => {
|
|
162108
162108
|
if (isSelector) {
|
|
162109
162109
|
if (abiItem.type === "function")
|
|
162110
162110
|
return (0, toFunctionSelector_js_1.toFunctionSelector)(abiItem) === name;
|
|
@@ -162229,10 +162229,10 @@ var require_encodeEventTopics = __commonJS({
|
|
|
162229
162229
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
162230
162230
|
var docsPath6 = "/docs/contract/encodeEventTopics";
|
|
162231
162231
|
function encodeEventTopics2(parameters) {
|
|
162232
|
-
const { abi:
|
|
162233
|
-
let abiItem =
|
|
162232
|
+
const { abi: abi48, eventName, args } = parameters;
|
|
162233
|
+
let abiItem = abi48[0];
|
|
162234
162234
|
if (eventName) {
|
|
162235
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
162235
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, name: eventName });
|
|
162236
162236
|
if (!item)
|
|
162237
162237
|
throw new abi_js_1.AbiEventNotFoundError(eventName, { docsPath: docsPath6 });
|
|
162238
162238
|
abiItem = item;
|
|
@@ -162293,12 +162293,12 @@ var require_createContractEventFilter = __commonJS({
|
|
|
162293
162293
|
var toHex_js_1 = require_toHex();
|
|
162294
162294
|
var createFilterRequestScope_js_1 = require_createFilterRequestScope();
|
|
162295
162295
|
async function createContractEventFilter2(client, parameters) {
|
|
162296
|
-
const { address, abi:
|
|
162296
|
+
const { address, abi: abi48, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
162297
162297
|
const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
|
|
162298
162298
|
method: "eth_newFilter"
|
|
162299
162299
|
});
|
|
162300
162300
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
162301
|
-
abi:
|
|
162301
|
+
abi: abi48,
|
|
162302
162302
|
args,
|
|
162303
162303
|
eventName
|
|
162304
162304
|
}) : void 0;
|
|
@@ -162314,7 +162314,7 @@ var require_createContractEventFilter = __commonJS({
|
|
|
162314
162314
|
]
|
|
162315
162315
|
});
|
|
162316
162316
|
return {
|
|
162317
|
-
abi:
|
|
162317
|
+
abi: abi48,
|
|
162318
162318
|
args,
|
|
162319
162319
|
eventName,
|
|
162320
162320
|
id,
|
|
@@ -162352,11 +162352,11 @@ var require_prepareEncodeFunctionData = __commonJS({
|
|
|
162352
162352
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
162353
162353
|
var docsPath6 = "/docs/contract/encodeFunctionData";
|
|
162354
162354
|
function prepareEncodeFunctionData2(parameters) {
|
|
162355
|
-
const { abi:
|
|
162356
|
-
let abiItem =
|
|
162355
|
+
const { abi: abi48, args, functionName } = parameters;
|
|
162356
|
+
let abiItem = abi48[0];
|
|
162357
162357
|
if (functionName) {
|
|
162358
162358
|
const item = (0, getAbiItem_js_1.getAbiItem)({
|
|
162359
|
-
abi:
|
|
162359
|
+
abi: abi48,
|
|
162360
162360
|
args,
|
|
162361
162361
|
name: functionName
|
|
162362
162362
|
});
|
|
@@ -162385,12 +162385,12 @@ var require_encodeFunctionData = __commonJS({
|
|
|
162385
162385
|
var prepareEncodeFunctionData_js_1 = require_prepareEncodeFunctionData();
|
|
162386
162386
|
function encodeFunctionData2(parameters) {
|
|
162387
162387
|
const { args } = parameters;
|
|
162388
|
-
const { abi:
|
|
162388
|
+
const { abi: abi48, functionName } = (() => {
|
|
162389
162389
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
162390
162390
|
return parameters;
|
|
162391
162391
|
return (0, prepareEncodeFunctionData_js_1.prepareEncodeFunctionData)(parameters);
|
|
162392
162392
|
})();
|
|
162393
|
-
const abiItem =
|
|
162393
|
+
const abiItem = abi48[0];
|
|
162394
162394
|
const signature = functionName;
|
|
162395
162395
|
const data = "inputs" in abiItem && abiItem.inputs ? (0, encodeAbiParameters_js_1.encodeAbiParameters)(abiItem.inputs, args ?? []) : void 0;
|
|
162396
162396
|
return (0, concat_js_1.concatHex)([signature, data ?? "0x"]);
|
|
@@ -162922,11 +162922,11 @@ var require_decodeErrorResult = __commonJS({
|
|
|
162922
162922
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
162923
162923
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
162924
162924
|
function decodeErrorResult2(parameters) {
|
|
162925
|
-
const { abi:
|
|
162925
|
+
const { abi: abi48, data } = parameters;
|
|
162926
162926
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
162927
162927
|
if (signature === "0x")
|
|
162928
162928
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
162929
|
-
const abi_ = [...
|
|
162929
|
+
const abi_ = [...abi48 || [], solidity_js_1.solidityError, solidity_js_1.solidityPanic];
|
|
162930
162930
|
const abiItem = abi_.find((x) => x.type === "error" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
162931
162931
|
if (!abiItem)
|
|
162932
162932
|
throw new abi_js_1.AbiErrorSignatureNotFoundError(signature, {
|
|
@@ -163348,8 +163348,8 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
163348
163348
|
};
|
|
163349
163349
|
exports2.CallExecutionError = CallExecutionError2;
|
|
163350
163350
|
var ContractFunctionExecutionError2 = class extends base_js_1.BaseError {
|
|
163351
|
-
constructor(cause, { abi:
|
|
163352
|
-
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
163351
|
+
constructor(cause, { abi: abi48, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
163352
|
+
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, args, name: functionName });
|
|
163353
163353
|
const formattedArgs = abiItem ? (0, formatAbiItemWithArgs_js_1.formatAbiItemWithArgs)({
|
|
163354
163354
|
abiItem,
|
|
163355
163355
|
args,
|
|
@@ -163415,7 +163415,7 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
163415
163415
|
writable: true,
|
|
163416
163416
|
value: void 0
|
|
163417
163417
|
});
|
|
163418
|
-
this.abi =
|
|
163418
|
+
this.abi = abi48;
|
|
163419
163419
|
this.args = args;
|
|
163420
163420
|
this.cause = cause;
|
|
163421
163421
|
this.contractAddress = contractAddress;
|
|
@@ -163425,14 +163425,14 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
163425
163425
|
};
|
|
163426
163426
|
exports2.ContractFunctionExecutionError = ContractFunctionExecutionError2;
|
|
163427
163427
|
var ContractFunctionRevertedError2 = class extends base_js_1.BaseError {
|
|
163428
|
-
constructor({ abi:
|
|
163428
|
+
constructor({ abi: abi48, data, functionName, message }) {
|
|
163429
163429
|
let cause;
|
|
163430
163430
|
let decodedData = void 0;
|
|
163431
163431
|
let metaMessages;
|
|
163432
163432
|
let reason;
|
|
163433
163433
|
if (data && data !== "0x") {
|
|
163434
163434
|
try {
|
|
163435
|
-
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi:
|
|
163435
|
+
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi: abi48, data });
|
|
163436
163436
|
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
163437
163437
|
if (errorName === "Error") {
|
|
163438
163438
|
reason = errorArgs[0];
|
|
@@ -164032,7 +164032,7 @@ var require_getContractError = __commonJS({
|
|
|
164032
164032
|
var request_js_1 = require_request();
|
|
164033
164033
|
var rpc_js_1 = require_rpc();
|
|
164034
164034
|
var EXECUTION_REVERTED_ERROR_CODE2 = 3;
|
|
164035
|
-
function getContractError2(err, { abi:
|
|
164035
|
+
function getContractError2(err, { abi: abi48, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
164036
164036
|
const error = err instanceof contract_js_1.RawContractError ? err : err instanceof base_js_1.BaseError ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
164037
164037
|
const { code, data, details, message, shortMessage } = error;
|
|
164038
164038
|
const cause = (() => {
|
|
@@ -164040,7 +164040,7 @@ var require_getContractError = __commonJS({
|
|
|
164040
164040
|
return new contract_js_1.ContractFunctionZeroDataError({ functionName });
|
|
164041
164041
|
if ([EXECUTION_REVERTED_ERROR_CODE2, rpc_js_1.InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
164042
164042
|
return new contract_js_1.ContractFunctionRevertedError({
|
|
164043
|
-
abi:
|
|
164043
|
+
abi: abi48,
|
|
164044
164044
|
data: typeof data === "object" ? data.data : data,
|
|
164045
164045
|
functionName,
|
|
164046
164046
|
message: error instanceof request_js_1.RpcRequestError ? details : shortMessage ?? message
|
|
@@ -164049,7 +164049,7 @@ var require_getContractError = __commonJS({
|
|
|
164049
164049
|
return err;
|
|
164050
164050
|
})();
|
|
164051
164051
|
return new contract_js_1.ContractFunctionExecutionError(cause, {
|
|
164052
|
-
abi:
|
|
164052
|
+
abi: abi48,
|
|
164053
164053
|
args,
|
|
164054
164054
|
contractAddress: address,
|
|
164055
164055
|
docsPath: docsPath6,
|
|
@@ -168516,9 +168516,9 @@ var require_estimateContractGas = __commonJS({
|
|
|
168516
168516
|
var getAction_js_1 = require_getAction();
|
|
168517
168517
|
var estimateGas_js_1 = require_estimateGas2();
|
|
168518
168518
|
async function estimateContractGas2(client, parameters) {
|
|
168519
|
-
const { abi:
|
|
168519
|
+
const { abi: abi48, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
168520
168520
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
168521
|
-
abi:
|
|
168521
|
+
abi: abi48,
|
|
168522
168522
|
args,
|
|
168523
168523
|
functionName
|
|
168524
168524
|
});
|
|
@@ -168532,7 +168532,7 @@ var require_estimateContractGas = __commonJS({
|
|
|
168532
168532
|
} catch (error) {
|
|
168533
168533
|
const account = request.account ? (0, parseAccount_js_1.parseAccount)(request.account) : void 0;
|
|
168534
168534
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
168535
|
-
abi:
|
|
168535
|
+
abi: abi48,
|
|
168536
168536
|
address,
|
|
168537
168537
|
args,
|
|
168538
168538
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -168576,15 +168576,15 @@ var require_decodeEventLog = __commonJS({
|
|
|
168576
168576
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
168577
168577
|
var docsPath6 = "/docs/contract/decodeEventLog";
|
|
168578
168578
|
function decodeEventLog2(parameters) {
|
|
168579
|
-
const { abi:
|
|
168579
|
+
const { abi: abi48, data, strict: strict_, topics } = parameters;
|
|
168580
168580
|
const strict = strict_ ?? true;
|
|
168581
168581
|
const [signature, ...argTopics] = topics;
|
|
168582
168582
|
if (!signature)
|
|
168583
168583
|
throw new abi_js_1.AbiEventSignatureEmptyTopicsError({ docsPath: docsPath6 });
|
|
168584
168584
|
const abiItem = (() => {
|
|
168585
|
-
if (
|
|
168586
|
-
return
|
|
168587
|
-
return
|
|
168585
|
+
if (abi48.length === 1)
|
|
168586
|
+
return abi48[0];
|
|
168587
|
+
return abi48.find((x) => x.type === "event" && signature === (0, toEventSelector_js_1.toEventSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
168588
168588
|
})();
|
|
168589
168589
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
168590
168590
|
throw new abi_js_1.AbiEventSignatureNotFoundError(signature, { docsPath: docsPath6 });
|
|
@@ -168664,7 +168664,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
168664
168664
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
168665
168665
|
var decodeEventLog_js_1 = require_decodeEventLog();
|
|
168666
168666
|
function parseEventLogs2(parameters) {
|
|
168667
|
-
const { abi:
|
|
168667
|
+
const { abi: abi48, args, logs, strict = true } = parameters;
|
|
168668
168668
|
const eventName = (() => {
|
|
168669
168669
|
if (!parameters.eventName)
|
|
168670
168670
|
return void 0;
|
|
@@ -168674,7 +168674,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
168674
168674
|
})();
|
|
168675
168675
|
return logs.map((log2) => {
|
|
168676
168676
|
try {
|
|
168677
|
-
const abiItem =
|
|
168677
|
+
const abiItem = abi48.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === (0, toEventSelector_js_1.toEventSelector)(abiItem2));
|
|
168678
168678
|
if (!abiItem)
|
|
168679
168679
|
return null;
|
|
168680
168680
|
const event = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
@@ -168835,9 +168835,9 @@ var require_getContractEvents = __commonJS({
|
|
|
168835
168835
|
var getAction_js_1 = require_getAction();
|
|
168836
168836
|
var getLogs_js_1 = require_getLogs();
|
|
168837
168837
|
async function getContractEvents2(client, parameters) {
|
|
168838
|
-
const { abi:
|
|
168839
|
-
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
168840
|
-
const events = !event ?
|
|
168838
|
+
const { abi: abi48, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
168839
|
+
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, name: eventName }) : void 0;
|
|
168840
|
+
const events = !event ? abi48.filter((x) => x.type === "event") : void 0;
|
|
168841
168841
|
return (0, getAction_js_1.getAction)(client, getLogs_js_1.getLogs, "getLogs")({
|
|
168842
168842
|
address,
|
|
168843
168843
|
args,
|
|
@@ -168863,10 +168863,10 @@ var require_decodeFunctionResult = __commonJS({
|
|
|
168863
168863
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
168864
168864
|
var docsPath6 = "/docs/contract/decodeFunctionResult";
|
|
168865
168865
|
function decodeFunctionResult2(parameters) {
|
|
168866
|
-
const { abi:
|
|
168867
|
-
let abiItem =
|
|
168866
|
+
const { abi: abi48, args, functionName, data } = parameters;
|
|
168867
|
+
let abiItem = abi48[0];
|
|
168868
168868
|
if (functionName) {
|
|
168869
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
168869
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, args, name: functionName });
|
|
168870
168870
|
if (!item)
|
|
168871
168871
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
168872
168872
|
abiItem = item;
|
|
@@ -170421,10 +170421,10 @@ var require_encodeDeployData = __commonJS({
|
|
|
170421
170421
|
var encodeAbiParameters_js_1 = require_encodeAbiParameters();
|
|
170422
170422
|
var docsPath6 = "/docs/contract/encodeDeployData";
|
|
170423
170423
|
function encodeDeployData2(parameters) {
|
|
170424
|
-
const { abi:
|
|
170424
|
+
const { abi: abi48, args, bytecode } = parameters;
|
|
170425
170425
|
if (!args || args.length === 0)
|
|
170426
170426
|
return bytecode;
|
|
170427
|
-
const description =
|
|
170427
|
+
const description = abi48.find((x) => "type" in x && x.type === "constructor");
|
|
170428
170428
|
if (!description)
|
|
170429
170429
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
170430
170430
|
if (!("inputs" in description))
|
|
@@ -170963,9 +170963,9 @@ var require_readContract = __commonJS({
|
|
|
170963
170963
|
var getAction_js_1 = require_getAction();
|
|
170964
170964
|
var call_js_1 = require_call();
|
|
170965
170965
|
async function readContract2(client, parameters) {
|
|
170966
|
-
const { abi:
|
|
170966
|
+
const { abi: abi48, address, args, functionName, ...rest } = parameters;
|
|
170967
170967
|
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
170968
|
-
abi:
|
|
170968
|
+
abi: abi48,
|
|
170969
170969
|
args,
|
|
170970
170970
|
functionName
|
|
170971
170971
|
});
|
|
@@ -170976,14 +170976,14 @@ var require_readContract = __commonJS({
|
|
|
170976
170976
|
to: address
|
|
170977
170977
|
});
|
|
170978
170978
|
return (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
170979
|
-
abi:
|
|
170979
|
+
abi: abi48,
|
|
170980
170980
|
args,
|
|
170981
170981
|
functionName,
|
|
170982
170982
|
data: data || "0x"
|
|
170983
170983
|
});
|
|
170984
170984
|
} catch (error) {
|
|
170985
170985
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
170986
|
-
abi:
|
|
170986
|
+
abi: abi48,
|
|
170987
170987
|
address,
|
|
170988
170988
|
args,
|
|
170989
170989
|
docsPath: "/docs/contract/readContract",
|
|
@@ -171007,9 +171007,9 @@ var require_simulateContract = __commonJS({
|
|
|
171007
171007
|
var getAction_js_1 = require_getAction();
|
|
171008
171008
|
var call_js_1 = require_call();
|
|
171009
171009
|
async function simulateContract2(client, parameters) {
|
|
171010
|
-
const { abi:
|
|
171010
|
+
const { abi: abi48, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
171011
171011
|
const account = callRequest.account ? (0, parseAccount_js_1.parseAccount)(callRequest.account) : client.account;
|
|
171012
|
-
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
171012
|
+
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi48, args, functionName });
|
|
171013
171013
|
try {
|
|
171014
171014
|
const { data } = await (0, getAction_js_1.getAction)(client, call_js_1.call, "call")({
|
|
171015
171015
|
batch: false,
|
|
@@ -171019,12 +171019,12 @@ var require_simulateContract = __commonJS({
|
|
|
171019
171019
|
account
|
|
171020
171020
|
});
|
|
171021
171021
|
const result = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
171022
|
-
abi:
|
|
171022
|
+
abi: abi48,
|
|
171023
171023
|
args,
|
|
171024
171024
|
functionName,
|
|
171025
171025
|
data: data || "0x"
|
|
171026
171026
|
});
|
|
171027
|
-
const minimizedAbi =
|
|
171027
|
+
const minimizedAbi = abi48.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
171028
171028
|
return {
|
|
171029
171029
|
result,
|
|
171030
171030
|
request: {
|
|
@@ -171039,7 +171039,7 @@ var require_simulateContract = __commonJS({
|
|
|
171039
171039
|
};
|
|
171040
171040
|
} catch (error) {
|
|
171041
171041
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
171042
|
-
abi:
|
|
171042
|
+
abi: abi48,
|
|
171043
171043
|
address,
|
|
171044
171044
|
args,
|
|
171045
171045
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -171281,7 +171281,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
171281
171281
|
var getFilterChanges_js_1 = require_getFilterChanges();
|
|
171282
171282
|
var uninstallFilter_js_1 = require_uninstallFilter();
|
|
171283
171283
|
function watchContractEvent2(client, parameters) {
|
|
171284
|
-
const { abi:
|
|
171284
|
+
const { abi: abi48, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
171285
171285
|
const enablePolling = (() => {
|
|
171286
171286
|
if (typeof poll_ !== "undefined")
|
|
171287
171287
|
return poll_;
|
|
@@ -171316,7 +171316,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
171316
171316
|
if (!initialized) {
|
|
171317
171317
|
try {
|
|
171318
171318
|
filter = await (0, getAction_js_1.getAction)(client, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
171319
|
-
abi:
|
|
171319
|
+
abi: abi48,
|
|
171320
171320
|
address,
|
|
171321
171321
|
args,
|
|
171322
171322
|
eventName,
|
|
@@ -171336,7 +171336,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
171336
171336
|
const blockNumber = await (0, getAction_js_1.getAction)(client, getBlockNumber_js_1.getBlockNumber, "getBlockNumber")({});
|
|
171337
171337
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
171338
171338
|
logs = await (0, getAction_js_1.getAction)(client, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
171339
|
-
abi:
|
|
171339
|
+
abi: abi48,
|
|
171340
171340
|
address,
|
|
171341
171341
|
args,
|
|
171342
171342
|
eventName,
|
|
@@ -171400,7 +171400,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
171400
171400
|
return client.transport;
|
|
171401
171401
|
})();
|
|
171402
171402
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
171403
|
-
abi:
|
|
171403
|
+
abi: abi48,
|
|
171404
171404
|
eventName,
|
|
171405
171405
|
args
|
|
171406
171406
|
}) : [];
|
|
@@ -171412,7 +171412,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
171412
171412
|
const log2 = data.result;
|
|
171413
171413
|
try {
|
|
171414
171414
|
const { eventName: eventName2, args: args2 } = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
171415
|
-
abi:
|
|
171415
|
+
abi: abi48,
|
|
171416
171416
|
data: log2.data,
|
|
171417
171417
|
topics: log2.topics,
|
|
171418
171418
|
strict: strict_
|
|
@@ -171712,14 +171712,14 @@ var require_writeContract = __commonJS({
|
|
|
171712
171712
|
var getAction_js_1 = require_getAction();
|
|
171713
171713
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
171714
171714
|
async function writeContract2(client, parameters) {
|
|
171715
|
-
const { abi:
|
|
171715
|
+
const { abi: abi48, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
171716
171716
|
if (typeof account_ === "undefined")
|
|
171717
171717
|
throw new account_js_1.AccountNotFoundError({
|
|
171718
171718
|
docsPath: "/docs/contract/writeContract"
|
|
171719
171719
|
});
|
|
171720
171720
|
const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : null;
|
|
171721
171721
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
171722
|
-
abi:
|
|
171722
|
+
abi: abi48,
|
|
171723
171723
|
args,
|
|
171724
171724
|
functionName
|
|
171725
171725
|
});
|
|
@@ -171732,7 +171732,7 @@ var require_writeContract = __commonJS({
|
|
|
171732
171732
|
});
|
|
171733
171733
|
} catch (error) {
|
|
171734
171734
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
171735
|
-
abi:
|
|
171735
|
+
abi: abi48,
|
|
171736
171736
|
address,
|
|
171737
171737
|
args,
|
|
171738
171738
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -171760,7 +171760,7 @@ var require_getContract = __commonJS({
|
|
|
171760
171760
|
var simulateContract_js_1 = require_simulateContract();
|
|
171761
171761
|
var watchContractEvent_js_1 = require_watchContractEvent();
|
|
171762
171762
|
var writeContract_js_1 = require_writeContract();
|
|
171763
|
-
function getContract2({ abi:
|
|
171763
|
+
function getContract2({ abi: abi48, address, client: client_ }) {
|
|
171764
171764
|
const client = client_;
|
|
171765
171765
|
const [publicClient, walletClient] = (() => {
|
|
171766
171766
|
if (!client)
|
|
@@ -171779,7 +171779,7 @@ var require_getContract = __commonJS({
|
|
|
171779
171779
|
let hasReadFunction = false;
|
|
171780
171780
|
let hasWriteFunction = false;
|
|
171781
171781
|
let hasEvent = false;
|
|
171782
|
-
for (const item of
|
|
171782
|
+
for (const item of abi48) {
|
|
171783
171783
|
if (item.type === "function")
|
|
171784
171784
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
171785
171785
|
hasReadFunction = true;
|
|
@@ -171797,7 +171797,7 @@ var require_getContract = __commonJS({
|
|
|
171797
171797
|
return (...parameters) => {
|
|
171798
171798
|
const { args, options } = getFunctionParameters2(parameters);
|
|
171799
171799
|
return (0, getAction_js_1.getAction)(publicClient, readContract_js_1.readContract, "readContract")({
|
|
171800
|
-
abi:
|
|
171800
|
+
abi: abi48,
|
|
171801
171801
|
address,
|
|
171802
171802
|
functionName,
|
|
171803
171803
|
args,
|
|
@@ -171812,7 +171812,7 @@ var require_getContract = __commonJS({
|
|
|
171812
171812
|
return (...parameters) => {
|
|
171813
171813
|
const { args, options } = getFunctionParameters2(parameters);
|
|
171814
171814
|
return (0, getAction_js_1.getAction)(publicClient, simulateContract_js_1.simulateContract, "simulateContract")({
|
|
171815
|
-
abi:
|
|
171815
|
+
abi: abi48,
|
|
171816
171816
|
address,
|
|
171817
171817
|
functionName,
|
|
171818
171818
|
args,
|
|
@@ -171825,10 +171825,10 @@ var require_getContract = __commonJS({
|
|
|
171825
171825
|
contract.createEventFilter = new Proxy({}, {
|
|
171826
171826
|
get(_, eventName) {
|
|
171827
171827
|
return (...parameters) => {
|
|
171828
|
-
const abiEvent =
|
|
171828
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
171829
171829
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
171830
171830
|
return (0, getAction_js_1.getAction)(publicClient, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
171831
|
-
abi:
|
|
171831
|
+
abi: abi48,
|
|
171832
171832
|
address,
|
|
171833
171833
|
eventName,
|
|
171834
171834
|
args,
|
|
@@ -171840,10 +171840,10 @@ var require_getContract = __commonJS({
|
|
|
171840
171840
|
contract.getEvents = new Proxy({}, {
|
|
171841
171841
|
get(_, eventName) {
|
|
171842
171842
|
return (...parameters) => {
|
|
171843
|
-
const abiEvent =
|
|
171843
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
171844
171844
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
171845
171845
|
return (0, getAction_js_1.getAction)(publicClient, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
171846
|
-
abi:
|
|
171846
|
+
abi: abi48,
|
|
171847
171847
|
address,
|
|
171848
171848
|
eventName,
|
|
171849
171849
|
args,
|
|
@@ -171855,10 +171855,10 @@ var require_getContract = __commonJS({
|
|
|
171855
171855
|
contract.watchEvent = new Proxy({}, {
|
|
171856
171856
|
get(_, eventName) {
|
|
171857
171857
|
return (...parameters) => {
|
|
171858
|
-
const abiEvent =
|
|
171858
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
171859
171859
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
171860
171860
|
return (0, getAction_js_1.getAction)(publicClient, watchContractEvent_js_1.watchContractEvent, "watchContractEvent")({
|
|
171861
|
-
abi:
|
|
171861
|
+
abi: abi48,
|
|
171862
171862
|
address,
|
|
171863
171863
|
eventName,
|
|
171864
171864
|
args,
|
|
@@ -171876,7 +171876,7 @@ var require_getContract = __commonJS({
|
|
|
171876
171876
|
return (...parameters) => {
|
|
171877
171877
|
const { args, options } = getFunctionParameters2(parameters);
|
|
171878
171878
|
return (0, getAction_js_1.getAction)(walletClient, writeContract_js_1.writeContract, "writeContract")({
|
|
171879
|
-
abi:
|
|
171879
|
+
abi: abi48,
|
|
171880
171880
|
address,
|
|
171881
171881
|
functionName,
|
|
171882
171882
|
args,
|
|
@@ -171894,7 +171894,7 @@ var require_getContract = __commonJS({
|
|
|
171894
171894
|
const { args, options } = getFunctionParameters2(parameters);
|
|
171895
171895
|
const client2 = publicClient ?? walletClient;
|
|
171896
171896
|
return (0, getAction_js_1.getAction)(client2, estimateContractGas_js_1.estimateContractGas, "estimateContractGas")({
|
|
171897
|
-
abi:
|
|
171897
|
+
abi: abi48,
|
|
171898
171898
|
address,
|
|
171899
171899
|
functionName,
|
|
171900
171900
|
args,
|
|
@@ -171906,7 +171906,7 @@ var require_getContract = __commonJS({
|
|
|
171906
171906
|
});
|
|
171907
171907
|
}
|
|
171908
171908
|
contract.address = address;
|
|
171909
|
-
contract.abi =
|
|
171909
|
+
contract.abi = abi48;
|
|
171910
171910
|
return contract;
|
|
171911
171911
|
}
|
|
171912
171912
|
function getFunctionParameters2(values) {
|
|
@@ -173532,7 +173532,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
173532
173532
|
const { address, factory, factoryData } = parameters;
|
|
173533
173533
|
try {
|
|
173534
173534
|
const [fields, name, version4, chainId, verifyingContract, salt, extensions] = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract, "readContract")({
|
|
173535
|
-
abi:
|
|
173535
|
+
abi: abi48,
|
|
173536
173536
|
address,
|
|
173537
173537
|
functionName: "eip712Domain",
|
|
173538
173538
|
factory,
|
|
@@ -173557,7 +173557,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
173557
173557
|
throw error;
|
|
173558
173558
|
}
|
|
173559
173559
|
}
|
|
173560
|
-
var
|
|
173560
|
+
var abi48 = [
|
|
173561
173561
|
{
|
|
173562
173562
|
inputs: [],
|
|
173563
173563
|
name: "eip712Domain",
|
|
@@ -177892,9 +177892,9 @@ var require_decodeFunctionData = __commonJS({
|
|
|
177892
177892
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
177893
177893
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
177894
177894
|
function decodeFunctionData2(parameters) {
|
|
177895
|
-
const { abi:
|
|
177895
|
+
const { abi: abi48, data } = parameters;
|
|
177896
177896
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
177897
|
-
const description =
|
|
177897
|
+
const description = abi48.find((x) => x.type === "function" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
177898
177898
|
if (!description)
|
|
177899
177899
|
throw new abi_js_1.AbiFunctionSignatureNotFoundError(signature, {
|
|
177900
177900
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -177921,10 +177921,10 @@ var require_encodeErrorResult = __commonJS({
|
|
|
177921
177921
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
177922
177922
|
var docsPath6 = "/docs/contract/encodeErrorResult";
|
|
177923
177923
|
function encodeErrorResult(parameters) {
|
|
177924
|
-
const { abi:
|
|
177925
|
-
let abiItem =
|
|
177924
|
+
const { abi: abi48, errorName, args } = parameters;
|
|
177925
|
+
let abiItem = abi48[0];
|
|
177926
177926
|
if (errorName) {
|
|
177927
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
177927
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, args, name: errorName });
|
|
177928
177928
|
if (!item)
|
|
177929
177929
|
throw new abi_js_1.AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });
|
|
177930
177930
|
abiItem = item;
|
|
@@ -177955,10 +177955,10 @@ var require_encodeFunctionResult = __commonJS({
|
|
|
177955
177955
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
177956
177956
|
var docsPath6 = "/docs/contract/encodeFunctionResult";
|
|
177957
177957
|
function encodeFunctionResult(parameters) {
|
|
177958
|
-
const { abi:
|
|
177959
|
-
let abiItem =
|
|
177958
|
+
const { abi: abi48, functionName, result } = parameters;
|
|
177959
|
+
let abiItem = abi48[0];
|
|
177960
177960
|
if (functionName) {
|
|
177961
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
177961
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi48, name: functionName });
|
|
177962
177962
|
if (!item)
|
|
177963
177963
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
177964
177964
|
abiItem = item;
|
|
@@ -180247,9 +180247,9 @@ var require_multicall2 = __commonJS({
|
|
|
180247
180247
|
let currentChunk = 0;
|
|
180248
180248
|
let currentChunkSize = 0;
|
|
180249
180249
|
for (let i = 0; i < contracts2.length; i++) {
|
|
180250
|
-
const { abi:
|
|
180250
|
+
const { abi: abi48, address, args, functionName } = contracts2[i];
|
|
180251
180251
|
try {
|
|
180252
|
-
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
180252
|
+
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi48, args, functionName });
|
|
180253
180253
|
currentChunkSize += (callData.length - 2) / 2;
|
|
180254
180254
|
if (batchSize > 0 && currentChunkSize > batchSize && chunkedCalls[currentChunk].length > 0) {
|
|
180255
180255
|
currentChunk++;
|
|
@@ -180266,7 +180266,7 @@ var require_multicall2 = __commonJS({
|
|
|
180266
180266
|
];
|
|
180267
180267
|
} catch (err) {
|
|
180268
180268
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
180269
|
-
abi:
|
|
180269
|
+
abi: abi48,
|
|
180270
180270
|
address,
|
|
180271
180271
|
args,
|
|
180272
180272
|
docsPath: "/docs/contract/multicall",
|
|
@@ -180312,14 +180312,14 @@ var require_multicall2 = __commonJS({
|
|
|
180312
180312
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
180313
180313
|
const { returnData, success } = aggregate3Result[j];
|
|
180314
180314
|
const { callData } = chunkedCalls[i][j];
|
|
180315
|
-
const { abi:
|
|
180315
|
+
const { abi: abi48, address, functionName, args } = contracts2[results.length];
|
|
180316
180316
|
try {
|
|
180317
180317
|
if (callData === "0x")
|
|
180318
180318
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
180319
180319
|
if (!success)
|
|
180320
180320
|
throw new contract_js_1.RawContractError({ data: returnData });
|
|
180321
180321
|
const result2 = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
180322
|
-
abi:
|
|
180322
|
+
abi: abi48,
|
|
180323
180323
|
args,
|
|
180324
180324
|
data: returnData,
|
|
180325
180325
|
functionName
|
|
@@ -180327,7 +180327,7 @@ var require_multicall2 = __commonJS({
|
|
|
180327
180327
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
180328
180328
|
} catch (err) {
|
|
180329
180329
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
180330
|
-
abi:
|
|
180330
|
+
abi: abi48,
|
|
180331
180331
|
address,
|
|
180332
180332
|
args,
|
|
180333
180333
|
docsPath: "/docs/contract/multicall",
|
|
@@ -181379,13 +181379,13 @@ var require_simulateBlocks = __commonJS({
|
|
|
181379
181379
|
return result.map((block2, i) => ({
|
|
181380
181380
|
...(0, block_js_1.formatBlock)(block2),
|
|
181381
181381
|
calls: block2.calls.map((call2, j) => {
|
|
181382
|
-
const { abi:
|
|
181382
|
+
const { abi: abi48, args, functionName, to } = blocks[i].calls[j];
|
|
181383
181383
|
const data = call2.error?.data ?? call2.returnData;
|
|
181384
181384
|
const gasUsed = BigInt(call2.gasUsed);
|
|
181385
181385
|
const logs = call2.logs?.map((log2) => (0, log_js_1.formatLog)(log2));
|
|
181386
181386
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
181387
|
-
const result2 =
|
|
181388
|
-
abi:
|
|
181387
|
+
const result2 = abi48 && status === "success" && data !== "0x" ? (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
181388
|
+
abi: abi48,
|
|
181389
181389
|
data,
|
|
181390
181390
|
functionName
|
|
181391
181391
|
}) : null;
|
|
@@ -181400,7 +181400,7 @@ var require_simulateBlocks = __commonJS({
|
|
|
181400
181400
|
if (!error2)
|
|
181401
181401
|
return void 0;
|
|
181402
181402
|
return (0, getContractError_js_1.getContractError)(error2, {
|
|
181403
|
-
abi:
|
|
181403
|
+
abi: abi48 ?? [],
|
|
181404
181404
|
address: to,
|
|
181405
181405
|
args,
|
|
181406
181406
|
functionName: functionName ?? "<unknown>"
|
|
@@ -181980,10 +181980,10 @@ var require_AbiItem = __commonJS({
|
|
|
181980
181980
|
...prepare ? { hash: getSignatureHash2(item) } : {}
|
|
181981
181981
|
};
|
|
181982
181982
|
}
|
|
181983
|
-
function fromAbi3(
|
|
181983
|
+
function fromAbi3(abi48, name, options) {
|
|
181984
181984
|
const { args = [], prepare = true } = options ?? {};
|
|
181985
181985
|
const isSelector = Hex.validate(name, { strict: false });
|
|
181986
|
-
const abiItems =
|
|
181986
|
+
const abiItems = abi48.filter((abiItem2) => {
|
|
181987
181987
|
if (isSelector) {
|
|
181988
181988
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
181989
181989
|
return getSelector3(abiItem2) === Hex.slice(name, 0, 4);
|
|
@@ -183126,8 +183126,8 @@ var require_AbiConstructor = __commonJS({
|
|
|
183126
183126
|
function from5(abiConstructor) {
|
|
183127
183127
|
return AbiItem.from(abiConstructor);
|
|
183128
183128
|
}
|
|
183129
|
-
function fromAbi3(
|
|
183130
|
-
const item =
|
|
183129
|
+
function fromAbi3(abi48) {
|
|
183130
|
+
const item = abi48.find((item2) => item2.type === "constructor");
|
|
183131
183131
|
if (!item)
|
|
183132
183132
|
throw new AbiItem.NotFoundError({ name: "constructor" });
|
|
183133
183133
|
return item;
|
|
@@ -183202,8 +183202,8 @@ var require_AbiFunction = __commonJS({
|
|
|
183202
183202
|
function from5(abiFunction, options = {}) {
|
|
183203
183203
|
return AbiItem.from(abiFunction, options);
|
|
183204
183204
|
}
|
|
183205
|
-
function fromAbi3(
|
|
183206
|
-
const item = AbiItem.fromAbi(
|
|
183205
|
+
function fromAbi3(abi48, name, options) {
|
|
183206
|
+
const item = AbiItem.fromAbi(abi48, name, options);
|
|
183207
183207
|
if (item.type !== "function")
|
|
183208
183208
|
throw new AbiItem.NotFoundError({ name, type: "function" });
|
|
183209
183209
|
return item;
|
|
@@ -185103,8 +185103,8 @@ var require_deployContract = __commonJS({
|
|
|
185103
185103
|
var encodeDeployData_js_1 = require_encodeDeployData();
|
|
185104
185104
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
185105
185105
|
function deployContract2(walletClient, parameters) {
|
|
185106
|
-
const { abi:
|
|
185107
|
-
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi:
|
|
185106
|
+
const { abi: abi48, args, bytecode, ...request } = parameters;
|
|
185107
|
+
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi: abi48, args, bytecode });
|
|
185108
185108
|
return (0, sendTransaction_js_1.sendTransaction)(walletClient, {
|
|
185109
185109
|
...request,
|
|
185110
185110
|
...request.authorizationList ? { to: null } : {},
|
|
@@ -185528,10 +185528,10 @@ var require_decodeDeployData = __commonJS({
|
|
|
185528
185528
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
185529
185529
|
var docsPath6 = "/docs/contract/decodeDeployData";
|
|
185530
185530
|
function decodeDeployData(parameters) {
|
|
185531
|
-
const { abi:
|
|
185531
|
+
const { abi: abi48, bytecode, data } = parameters;
|
|
185532
185532
|
if (data === bytecode)
|
|
185533
185533
|
return { bytecode };
|
|
185534
|
-
const description =
|
|
185534
|
+
const description = abi48.find((x) => "type" in x && x.type === "constructor");
|
|
185535
185535
|
if (!description)
|
|
185536
185536
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
185537
185537
|
if (!("inputs" in description))
|
|
@@ -230513,21 +230513,21 @@ var require_BaseContract2 = __commonJS({
|
|
|
230513
230513
|
return this.contractAddress;
|
|
230514
230514
|
};
|
|
230515
230515
|
this.encode = (functionToEncode, args) => {
|
|
230516
|
-
const
|
|
230516
|
+
const abi48 = this.contractAbi;
|
|
230517
230517
|
const functionName = functionToEncode;
|
|
230518
230518
|
const params = args;
|
|
230519
230519
|
return (0, viem_1.encodeFunctionData)({
|
|
230520
|
-
abi:
|
|
230520
|
+
abi: abi48,
|
|
230521
230521
|
functionName,
|
|
230522
230522
|
args: params
|
|
230523
230523
|
});
|
|
230524
230524
|
};
|
|
230525
230525
|
this.estimateGas = async (functionToEstimate, args, options = {}) => {
|
|
230526
230526
|
const contractOptions = this.convertOptions(options);
|
|
230527
|
-
const
|
|
230527
|
+
const abi48 = this.contractAbi;
|
|
230528
230528
|
const params = args;
|
|
230529
230529
|
return (0, actions_1.estimateContractGas)(this.runner, {
|
|
230530
|
-
abi:
|
|
230530
|
+
abi: abi48,
|
|
230531
230531
|
functionName: functionToEstimate,
|
|
230532
230532
|
address: this.getAddress(),
|
|
230533
230533
|
args: params,
|
|
@@ -278135,17 +278135,17 @@ var require_interface3 = __commonJS({
|
|
|
278135
278135
|
* Create a new Interface for the %%fragments%%.
|
|
278136
278136
|
*/
|
|
278137
278137
|
constructor(fragments) {
|
|
278138
|
-
let
|
|
278138
|
+
let abi48 = [];
|
|
278139
278139
|
if (typeof fragments === "string") {
|
|
278140
|
-
|
|
278140
|
+
abi48 = JSON.parse(fragments);
|
|
278141
278141
|
} else {
|
|
278142
|
-
|
|
278142
|
+
abi48 = fragments;
|
|
278143
278143
|
}
|
|
278144
278144
|
this.#functions = /* @__PURE__ */ new Map();
|
|
278145
278145
|
this.#errors = /* @__PURE__ */ new Map();
|
|
278146
278146
|
this.#events = /* @__PURE__ */ new Map();
|
|
278147
278147
|
const frags = [];
|
|
278148
|
-
for (const a of
|
|
278148
|
+
for (const a of abi48) {
|
|
278149
278149
|
try {
|
|
278150
278150
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
278151
278151
|
} catch (error) {
|
|
@@ -278209,16 +278209,16 @@ var require_interface3 = __commonJS({
|
|
|
278209
278209
|
*/
|
|
278210
278210
|
format(minimal) {
|
|
278211
278211
|
const format = minimal ? "minimal" : "full";
|
|
278212
|
-
const
|
|
278213
|
-
return
|
|
278212
|
+
const abi48 = this.fragments.map((f) => f.format(format));
|
|
278213
|
+
return abi48;
|
|
278214
278214
|
}
|
|
278215
278215
|
/**
|
|
278216
278216
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
278217
278217
|
* returns.
|
|
278218
278218
|
*/
|
|
278219
278219
|
formatJson() {
|
|
278220
|
-
const
|
|
278221
|
-
return JSON.stringify(
|
|
278220
|
+
const abi48 = this.fragments.map((f) => f.format("json"));
|
|
278221
|
+
return JSON.stringify(abi48.map((j) => JSON.parse(j)));
|
|
278222
278222
|
}
|
|
278223
278223
|
/**
|
|
278224
278224
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -280986,12 +280986,12 @@ var require_contract5 = __commonJS({
|
|
|
280986
280986
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
280987
280987
|
* of.
|
|
280988
280988
|
*/
|
|
280989
|
-
constructor(target,
|
|
280989
|
+
constructor(target, abi48, runner, _deployTx) {
|
|
280990
280990
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
280991
280991
|
if (runner == null) {
|
|
280992
280992
|
runner = null;
|
|
280993
280993
|
}
|
|
280994
|
-
const iface = index_js_1.Interface.from(
|
|
280994
|
+
const iface = index_js_1.Interface.from(abi48);
|
|
280995
280995
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
280996
280996
|
Object.defineProperty(this, internal, { value: {} });
|
|
280997
280997
|
let addrPromise;
|
|
@@ -281354,10 +281354,10 @@ var require_contract5 = __commonJS({
|
|
|
281354
281354
|
/**
|
|
281355
281355
|
* Create a new Class for the %%abi%%.
|
|
281356
281356
|
*/
|
|
281357
|
-
static buildClass(
|
|
281357
|
+
static buildClass(abi48) {
|
|
281358
281358
|
class CustomContract extends _BaseContract {
|
|
281359
281359
|
constructor(address, runner = null) {
|
|
281360
|
-
super(address,
|
|
281360
|
+
super(address, abi48, runner);
|
|
281361
281361
|
}
|
|
281362
281362
|
}
|
|
281363
281363
|
return CustomContract;
|
|
@@ -281365,11 +281365,11 @@ var require_contract5 = __commonJS({
|
|
|
281365
281365
|
/**
|
|
281366
281366
|
* Create a new BaseContract with a specified Interface.
|
|
281367
281367
|
*/
|
|
281368
|
-
static from(target,
|
|
281368
|
+
static from(target, abi48, runner) {
|
|
281369
281369
|
if (runner == null) {
|
|
281370
281370
|
runner = null;
|
|
281371
281371
|
}
|
|
281372
|
-
const contract = new this(target,
|
|
281372
|
+
const contract = new this(target, abi48, runner);
|
|
281373
281373
|
return contract;
|
|
281374
281374
|
}
|
|
281375
281375
|
};
|
|
@@ -281413,8 +281413,8 @@ var require_factory2 = __commonJS({
|
|
|
281413
281413
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
281414
281414
|
* standard Solidity JSON output.
|
|
281415
281415
|
*/
|
|
281416
|
-
constructor(
|
|
281417
|
-
const iface = index_js_1.Interface.from(
|
|
281416
|
+
constructor(abi48, bytecode, runner) {
|
|
281417
|
+
const iface = index_js_1.Interface.from(abi48);
|
|
281418
281418
|
if (bytecode instanceof Uint8Array) {
|
|
281419
281419
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
281420
281420
|
} else {
|
|
@@ -281484,14 +281484,14 @@ var require_factory2 = __commonJS({
|
|
|
281484
281484
|
if (typeof output === "string") {
|
|
281485
281485
|
output = JSON.parse(output);
|
|
281486
281486
|
}
|
|
281487
|
-
const
|
|
281487
|
+
const abi48 = output.abi;
|
|
281488
281488
|
let bytecode = "";
|
|
281489
281489
|
if (output.bytecode) {
|
|
281490
281490
|
bytecode = output.bytecode;
|
|
281491
281491
|
} else if (output.evm && output.evm.bytecode) {
|
|
281492
281492
|
bytecode = output.evm.bytecode;
|
|
281493
281493
|
}
|
|
281494
|
-
return new this(
|
|
281494
|
+
return new this(abi48, bytecode, runner);
|
|
281495
281495
|
}
|
|
281496
281496
|
};
|
|
281497
281497
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -286441,8 +286441,8 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
286441
286441
|
action: "getabi",
|
|
286442
286442
|
address
|
|
286443
286443
|
});
|
|
286444
|
-
const
|
|
286445
|
-
return new index_js_2.Contract(address,
|
|
286444
|
+
const abi48 = JSON.parse(resp);
|
|
286445
|
+
return new index_js_2.Contract(address, abi48, this);
|
|
286446
286446
|
} catch (error) {
|
|
286447
286447
|
return null;
|
|
286448
286448
|
}
|
|
@@ -311265,13 +311265,13 @@ var require_interface4 = __commonJS({
|
|
|
311265
311265
|
function Interface2(fragments) {
|
|
311266
311266
|
var _newTarget = this.constructor;
|
|
311267
311267
|
var _this = this;
|
|
311268
|
-
var
|
|
311268
|
+
var abi48 = [];
|
|
311269
311269
|
if (typeof fragments === "string") {
|
|
311270
|
-
|
|
311270
|
+
abi48 = JSON.parse(fragments);
|
|
311271
311271
|
} else {
|
|
311272
|
-
|
|
311272
|
+
abi48 = fragments;
|
|
311273
311273
|
}
|
|
311274
|
-
(0, properties_1.defineReadOnly)(this, "fragments",
|
|
311274
|
+
(0, properties_1.defineReadOnly)(this, "fragments", abi48.map(function(fragment) {
|
|
311275
311275
|
return fragments_1.Fragment.from(fragment);
|
|
311276
311276
|
}).filter(function(fragment) {
|
|
311277
311277
|
return fragment != null;
|
|
@@ -311325,15 +311325,15 @@ var require_interface4 = __commonJS({
|
|
|
311325
311325
|
if (format === fragments_1.FormatTypes.sighash) {
|
|
311326
311326
|
logger2.throwArgumentError("interface does not support formatting sighash", "format", format);
|
|
311327
311327
|
}
|
|
311328
|
-
var
|
|
311328
|
+
var abi48 = this.fragments.map(function(fragment) {
|
|
311329
311329
|
return fragment.format(format);
|
|
311330
311330
|
});
|
|
311331
311331
|
if (format === fragments_1.FormatTypes.json) {
|
|
311332
|
-
return JSON.stringify(
|
|
311332
|
+
return JSON.stringify(abi48.map(function(j) {
|
|
311333
311333
|
return JSON.parse(j);
|
|
311334
311334
|
}));
|
|
311335
311335
|
}
|
|
311336
|
-
return
|
|
311336
|
+
return abi48;
|
|
311337
311337
|
};
|
|
311338
311338
|
Interface2.getAbiCoder = function() {
|
|
311339
311339
|
return abi_coder_1.defaultAbiCoder;
|
|
@@ -342190,10 +342190,10 @@ init_formatAbiItem2();
|
|
|
342190
342190
|
init_getAbiItem();
|
|
342191
342191
|
var docsPath = "/docs/contract/encodeEventTopics";
|
|
342192
342192
|
function encodeEventTopics(parameters) {
|
|
342193
|
-
const { abi:
|
|
342194
|
-
let abiItem =
|
|
342193
|
+
const { abi: abi48, eventName, args } = parameters;
|
|
342194
|
+
let abiItem = abi48[0];
|
|
342195
342195
|
if (eventName) {
|
|
342196
|
-
const item = getAbiItem({ abi:
|
|
342196
|
+
const item = getAbiItem({ abi: abi48, name: eventName });
|
|
342197
342197
|
if (!item)
|
|
342198
342198
|
throw new AbiEventNotFoundError(eventName, { docsPath });
|
|
342199
342199
|
abiItem = item;
|
|
@@ -342240,12 +342240,12 @@ function createFilterRequestScope(client, { method }) {
|
|
|
342240
342240
|
|
|
342241
342241
|
// ../../node_modules/viem/_esm/actions/public/createContractEventFilter.js
|
|
342242
342242
|
async function createContractEventFilter(client, parameters) {
|
|
342243
|
-
const { address, abi:
|
|
342243
|
+
const { address, abi: abi48, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
342244
342244
|
const getRequest = createFilterRequestScope(client, {
|
|
342245
342245
|
method: "eth_newFilter"
|
|
342246
342246
|
});
|
|
342247
342247
|
const topics = eventName ? encodeEventTopics({
|
|
342248
|
-
abi:
|
|
342248
|
+
abi: abi48,
|
|
342249
342249
|
args,
|
|
342250
342250
|
eventName
|
|
342251
342251
|
}) : void 0;
|
|
@@ -342261,7 +342261,7 @@ async function createContractEventFilter(client, parameters) {
|
|
|
342261
342261
|
]
|
|
342262
342262
|
});
|
|
342263
342263
|
return {
|
|
342264
|
-
abi:
|
|
342264
|
+
abi: abi48,
|
|
342265
342265
|
args,
|
|
342266
342266
|
eventName,
|
|
342267
342267
|
id,
|
|
@@ -342282,7 +342282,7 @@ init_contract();
|
|
|
342282
342282
|
init_request();
|
|
342283
342283
|
init_rpc();
|
|
342284
342284
|
var EXECUTION_REVERTED_ERROR_CODE = 3;
|
|
342285
|
-
function getContractError(err, { abi:
|
|
342285
|
+
function getContractError(err, { abi: abi48, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
342286
342286
|
const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
342287
342287
|
const { code, data, details, message, shortMessage } = error;
|
|
342288
342288
|
const cause = (() => {
|
|
@@ -342290,7 +342290,7 @@ function getContractError(err, { abi: abi46, address, args, docsPath: docsPath6,
|
|
|
342290
342290
|
return new ContractFunctionZeroDataError({ functionName });
|
|
342291
342291
|
if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
342292
342292
|
return new ContractFunctionRevertedError({
|
|
342293
|
-
abi:
|
|
342293
|
+
abi: abi48,
|
|
342294
342294
|
data: typeof data === "object" ? data.data : data,
|
|
342295
342295
|
functionName,
|
|
342296
342296
|
message: error instanceof RpcRequestError ? details : shortMessage ?? message
|
|
@@ -342299,7 +342299,7 @@ function getContractError(err, { abi: abi46, address, args, docsPath: docsPath6,
|
|
|
342299
342299
|
return err;
|
|
342300
342300
|
})();
|
|
342301
342301
|
return new ContractFunctionExecutionError(cause, {
|
|
342302
|
-
abi:
|
|
342302
|
+
abi: abi48,
|
|
342303
342303
|
args,
|
|
342304
342304
|
contractAddress: address,
|
|
342305
342305
|
docsPath: docsPath6,
|
|
@@ -343252,9 +343252,9 @@ async function estimateGas(client, args) {
|
|
|
343252
343252
|
|
|
343253
343253
|
// ../../node_modules/viem/_esm/actions/public/estimateContractGas.js
|
|
343254
343254
|
async function estimateContractGas(client, parameters) {
|
|
343255
|
-
const { abi:
|
|
343255
|
+
const { abi: abi48, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
343256
343256
|
const data = encodeFunctionData({
|
|
343257
|
-
abi:
|
|
343257
|
+
abi: abi48,
|
|
343258
343258
|
args,
|
|
343259
343259
|
functionName
|
|
343260
343260
|
});
|
|
@@ -343268,7 +343268,7 @@ async function estimateContractGas(client, parameters) {
|
|
|
343268
343268
|
} catch (error) {
|
|
343269
343269
|
const account = request.account ? parseAccount(request.account) : void 0;
|
|
343270
343270
|
throw getContractError(error, {
|
|
343271
|
-
abi:
|
|
343271
|
+
abi: abi48,
|
|
343272
343272
|
address,
|
|
343273
343273
|
args,
|
|
343274
343274
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -343297,15 +343297,15 @@ init_decodeAbiParameters();
|
|
|
343297
343297
|
init_formatAbiItem2();
|
|
343298
343298
|
var docsPath3 = "/docs/contract/decodeEventLog";
|
|
343299
343299
|
function decodeEventLog(parameters) {
|
|
343300
|
-
const { abi:
|
|
343300
|
+
const { abi: abi48, data, strict: strict_, topics } = parameters;
|
|
343301
343301
|
const strict = strict_ ?? true;
|
|
343302
343302
|
const [signature, ...argTopics] = topics;
|
|
343303
343303
|
if (!signature)
|
|
343304
343304
|
throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
|
|
343305
343305
|
const abiItem = (() => {
|
|
343306
|
-
if (
|
|
343307
|
-
return
|
|
343308
|
-
return
|
|
343306
|
+
if (abi48.length === 1)
|
|
343307
|
+
return abi48[0];
|
|
343308
|
+
return abi48.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem2(x)));
|
|
343309
343309
|
})();
|
|
343310
343310
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
343311
343311
|
throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });
|
|
@@ -343372,7 +343372,7 @@ function decodeTopic({ param, value }) {
|
|
|
343372
343372
|
|
|
343373
343373
|
// ../../node_modules/viem/_esm/utils/abi/parseEventLogs.js
|
|
343374
343374
|
function parseEventLogs(parameters) {
|
|
343375
|
-
const { abi:
|
|
343375
|
+
const { abi: abi48, args, logs, strict = true } = parameters;
|
|
343376
343376
|
const eventName = (() => {
|
|
343377
343377
|
if (!parameters.eventName)
|
|
343378
343378
|
return void 0;
|
|
@@ -343382,7 +343382,7 @@ function parseEventLogs(parameters) {
|
|
|
343382
343382
|
})();
|
|
343383
343383
|
return logs.map((log2) => {
|
|
343384
343384
|
try {
|
|
343385
|
-
const abiItem =
|
|
343385
|
+
const abiItem = abi48.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
|
|
343386
343386
|
if (!abiItem)
|
|
343387
343387
|
return null;
|
|
343388
343388
|
const event = decodeEventLog({
|
|
@@ -343518,9 +343518,9 @@ async function getLogs(client, { address, blockHash, fromBlock, toBlock, event,
|
|
|
343518
343518
|
|
|
343519
343519
|
// ../../node_modules/viem/_esm/actions/public/getContractEvents.js
|
|
343520
343520
|
async function getContractEvents(client, parameters) {
|
|
343521
|
-
const { abi:
|
|
343522
|
-
const event = eventName ? getAbiItem({ abi:
|
|
343523
|
-
const events = !event ?
|
|
343521
|
+
const { abi: abi48, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
343522
|
+
const event = eventName ? getAbiItem({ abi: abi48, name: eventName }) : void 0;
|
|
343523
|
+
const events = !event ? abi48.filter((x) => x.type === "event") : void 0;
|
|
343524
343524
|
return getAction(client, getLogs, "getLogs")({
|
|
343525
343525
|
address,
|
|
343526
343526
|
args,
|
|
@@ -343538,9 +343538,9 @@ init_decodeFunctionResult();
|
|
|
343538
343538
|
init_encodeFunctionData();
|
|
343539
343539
|
init_call();
|
|
343540
343540
|
async function readContract(client, parameters) {
|
|
343541
|
-
const { abi:
|
|
343541
|
+
const { abi: abi48, address, args, functionName, ...rest } = parameters;
|
|
343542
343542
|
const calldata = encodeFunctionData({
|
|
343543
|
-
abi:
|
|
343543
|
+
abi: abi48,
|
|
343544
343544
|
args,
|
|
343545
343545
|
functionName
|
|
343546
343546
|
});
|
|
@@ -343551,14 +343551,14 @@ async function readContract(client, parameters) {
|
|
|
343551
343551
|
to: address
|
|
343552
343552
|
});
|
|
343553
343553
|
return decodeFunctionResult({
|
|
343554
|
-
abi:
|
|
343554
|
+
abi: abi48,
|
|
343555
343555
|
args,
|
|
343556
343556
|
functionName,
|
|
343557
343557
|
data: data || "0x"
|
|
343558
343558
|
});
|
|
343559
343559
|
} catch (error) {
|
|
343560
343560
|
throw getContractError(error, {
|
|
343561
|
-
abi:
|
|
343561
|
+
abi: abi48,
|
|
343562
343562
|
address,
|
|
343563
343563
|
args,
|
|
343564
343564
|
docsPath: "/docs/contract/readContract",
|
|
@@ -343573,9 +343573,9 @@ init_decodeFunctionResult();
|
|
|
343573
343573
|
init_encodeFunctionData();
|
|
343574
343574
|
init_call();
|
|
343575
343575
|
async function simulateContract(client, parameters) {
|
|
343576
|
-
const { abi:
|
|
343576
|
+
const { abi: abi48, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
343577
343577
|
const account = callRequest.account ? parseAccount(callRequest.account) : client.account;
|
|
343578
|
-
const calldata = encodeFunctionData({ abi:
|
|
343578
|
+
const calldata = encodeFunctionData({ abi: abi48, args, functionName });
|
|
343579
343579
|
try {
|
|
343580
343580
|
const { data } = await getAction(client, call, "call")({
|
|
343581
343581
|
batch: false,
|
|
@@ -343585,12 +343585,12 @@ async function simulateContract(client, parameters) {
|
|
|
343585
343585
|
account
|
|
343586
343586
|
});
|
|
343587
343587
|
const result = decodeFunctionResult({
|
|
343588
|
-
abi:
|
|
343588
|
+
abi: abi48,
|
|
343589
343589
|
args,
|
|
343590
343590
|
functionName,
|
|
343591
343591
|
data: data || "0x"
|
|
343592
343592
|
});
|
|
343593
|
-
const minimizedAbi =
|
|
343593
|
+
const minimizedAbi = abi48.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
343594
343594
|
return {
|
|
343595
343595
|
result,
|
|
343596
343596
|
request: {
|
|
@@ -343605,7 +343605,7 @@ async function simulateContract(client, parameters) {
|
|
|
343605
343605
|
};
|
|
343606
343606
|
} catch (error) {
|
|
343607
343607
|
throw getContractError(error, {
|
|
343608
|
-
abi:
|
|
343608
|
+
abi: abi48,
|
|
343609
343609
|
address,
|
|
343610
343610
|
args,
|
|
343611
343611
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -343773,7 +343773,7 @@ async function uninstallFilter(_client, { filter }) {
|
|
|
343773
343773
|
|
|
343774
343774
|
// ../../node_modules/viem/_esm/actions/public/watchContractEvent.js
|
|
343775
343775
|
function watchContractEvent(client, parameters) {
|
|
343776
|
-
const { abi:
|
|
343776
|
+
const { abi: abi48, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
343777
343777
|
const enablePolling = (() => {
|
|
343778
343778
|
if (typeof poll_ !== "undefined")
|
|
343779
343779
|
return poll_;
|
|
@@ -343808,7 +343808,7 @@ function watchContractEvent(client, parameters) {
|
|
|
343808
343808
|
if (!initialized) {
|
|
343809
343809
|
try {
|
|
343810
343810
|
filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
|
|
343811
|
-
abi:
|
|
343811
|
+
abi: abi48,
|
|
343812
343812
|
address,
|
|
343813
343813
|
args,
|
|
343814
343814
|
eventName,
|
|
@@ -343828,7 +343828,7 @@ function watchContractEvent(client, parameters) {
|
|
|
343828
343828
|
const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
|
|
343829
343829
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
343830
343830
|
logs = await getAction(client, getContractEvents, "getContractEvents")({
|
|
343831
|
-
abi:
|
|
343831
|
+
abi: abi48,
|
|
343832
343832
|
address,
|
|
343833
343833
|
args,
|
|
343834
343834
|
eventName,
|
|
@@ -343892,7 +343892,7 @@ function watchContractEvent(client, parameters) {
|
|
|
343892
343892
|
return client.transport;
|
|
343893
343893
|
})();
|
|
343894
343894
|
const topics = eventName ? encodeEventTopics({
|
|
343895
|
-
abi:
|
|
343895
|
+
abi: abi48,
|
|
343896
343896
|
eventName,
|
|
343897
343897
|
args
|
|
343898
343898
|
}) : [];
|
|
@@ -343904,7 +343904,7 @@ function watchContractEvent(client, parameters) {
|
|
|
343904
343904
|
const log2 = data.result;
|
|
343905
343905
|
try {
|
|
343906
343906
|
const { eventName: eventName2, args: args2 } = decodeEventLog({
|
|
343907
|
-
abi:
|
|
343907
|
+
abi: abi48,
|
|
343908
343908
|
data: log2.data,
|
|
343909
343909
|
topics: log2.topics,
|
|
343910
343910
|
strict: strict_
|
|
@@ -344157,14 +344157,14 @@ async function sendTransaction(client, parameters) {
|
|
|
344157
344157
|
|
|
344158
344158
|
// ../../node_modules/viem/_esm/actions/wallet/writeContract.js
|
|
344159
344159
|
async function writeContract(client, parameters) {
|
|
344160
|
-
const { abi:
|
|
344160
|
+
const { abi: abi48, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
344161
344161
|
if (typeof account_ === "undefined")
|
|
344162
344162
|
throw new AccountNotFoundError({
|
|
344163
344163
|
docsPath: "/docs/contract/writeContract"
|
|
344164
344164
|
});
|
|
344165
344165
|
const account = account_ ? parseAccount(account_) : null;
|
|
344166
344166
|
const data = encodeFunctionData({
|
|
344167
|
-
abi:
|
|
344167
|
+
abi: abi48,
|
|
344168
344168
|
args,
|
|
344169
344169
|
functionName
|
|
344170
344170
|
});
|
|
@@ -344177,7 +344177,7 @@ async function writeContract(client, parameters) {
|
|
|
344177
344177
|
});
|
|
344178
344178
|
} catch (error) {
|
|
344179
344179
|
throw getContractError(error, {
|
|
344180
|
-
abi:
|
|
344180
|
+
abi: abi48,
|
|
344181
344181
|
address,
|
|
344182
344182
|
args,
|
|
344183
344183
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -344188,7 +344188,7 @@ async function writeContract(client, parameters) {
|
|
|
344188
344188
|
}
|
|
344189
344189
|
|
|
344190
344190
|
// ../../node_modules/viem/_esm/actions/getContract.js
|
|
344191
|
-
function getContract({ abi:
|
|
344191
|
+
function getContract({ abi: abi48, address, client: client_ }) {
|
|
344192
344192
|
const client = client_;
|
|
344193
344193
|
const [publicClient, walletClient] = (() => {
|
|
344194
344194
|
if (!client)
|
|
@@ -344207,7 +344207,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344207
344207
|
let hasReadFunction = false;
|
|
344208
344208
|
let hasWriteFunction = false;
|
|
344209
344209
|
let hasEvent = false;
|
|
344210
|
-
for (const item of
|
|
344210
|
+
for (const item of abi48) {
|
|
344211
344211
|
if (item.type === "function")
|
|
344212
344212
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
344213
344213
|
hasReadFunction = true;
|
|
@@ -344225,7 +344225,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344225
344225
|
return (...parameters) => {
|
|
344226
344226
|
const { args, options } = getFunctionParameters(parameters);
|
|
344227
344227
|
return getAction(publicClient, readContract, "readContract")({
|
|
344228
|
-
abi:
|
|
344228
|
+
abi: abi48,
|
|
344229
344229
|
address,
|
|
344230
344230
|
functionName,
|
|
344231
344231
|
args,
|
|
@@ -344240,7 +344240,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344240
344240
|
return (...parameters) => {
|
|
344241
344241
|
const { args, options } = getFunctionParameters(parameters);
|
|
344242
344242
|
return getAction(publicClient, simulateContract, "simulateContract")({
|
|
344243
|
-
abi:
|
|
344243
|
+
abi: abi48,
|
|
344244
344244
|
address,
|
|
344245
344245
|
functionName,
|
|
344246
344246
|
args,
|
|
@@ -344253,10 +344253,10 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344253
344253
|
contract.createEventFilter = new Proxy({}, {
|
|
344254
344254
|
get(_, eventName) {
|
|
344255
344255
|
return (...parameters) => {
|
|
344256
|
-
const abiEvent =
|
|
344256
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
344257
344257
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
344258
344258
|
return getAction(publicClient, createContractEventFilter, "createContractEventFilter")({
|
|
344259
|
-
abi:
|
|
344259
|
+
abi: abi48,
|
|
344260
344260
|
address,
|
|
344261
344261
|
eventName,
|
|
344262
344262
|
args,
|
|
@@ -344268,10 +344268,10 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344268
344268
|
contract.getEvents = new Proxy({}, {
|
|
344269
344269
|
get(_, eventName) {
|
|
344270
344270
|
return (...parameters) => {
|
|
344271
|
-
const abiEvent =
|
|
344271
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
344272
344272
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
344273
344273
|
return getAction(publicClient, getContractEvents, "getContractEvents")({
|
|
344274
|
-
abi:
|
|
344274
|
+
abi: abi48,
|
|
344275
344275
|
address,
|
|
344276
344276
|
eventName,
|
|
344277
344277
|
args,
|
|
@@ -344283,10 +344283,10 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344283
344283
|
contract.watchEvent = new Proxy({}, {
|
|
344284
344284
|
get(_, eventName) {
|
|
344285
344285
|
return (...parameters) => {
|
|
344286
|
-
const abiEvent =
|
|
344286
|
+
const abiEvent = abi48.find((x) => x.type === "event" && x.name === eventName);
|
|
344287
344287
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
344288
344288
|
return getAction(publicClient, watchContractEvent, "watchContractEvent")({
|
|
344289
|
-
abi:
|
|
344289
|
+
abi: abi48,
|
|
344290
344290
|
address,
|
|
344291
344291
|
eventName,
|
|
344292
344292
|
args,
|
|
@@ -344304,7 +344304,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344304
344304
|
return (...parameters) => {
|
|
344305
344305
|
const { args, options } = getFunctionParameters(parameters);
|
|
344306
344306
|
return getAction(walletClient, writeContract, "writeContract")({
|
|
344307
|
-
abi:
|
|
344307
|
+
abi: abi48,
|
|
344308
344308
|
address,
|
|
344309
344309
|
functionName,
|
|
344310
344310
|
args,
|
|
@@ -344322,7 +344322,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344322
344322
|
const { args, options } = getFunctionParameters(parameters);
|
|
344323
344323
|
const client2 = publicClient ?? walletClient;
|
|
344324
344324
|
return getAction(client2, estimateContractGas, "estimateContractGas")({
|
|
344325
|
-
abi:
|
|
344325
|
+
abi: abi48,
|
|
344326
344326
|
address,
|
|
344327
344327
|
functionName,
|
|
344328
344328
|
args,
|
|
@@ -344334,7 +344334,7 @@ function getContract({ abi: abi46, address, client: client_ }) {
|
|
|
344334
344334
|
});
|
|
344335
344335
|
}
|
|
344336
344336
|
contract.address = address;
|
|
344337
|
-
contract.abi =
|
|
344337
|
+
contract.abi = abi48;
|
|
344338
344338
|
return contract;
|
|
344339
344339
|
}
|
|
344340
344340
|
function getFunctionParameters(values) {
|
|
@@ -346043,9 +346043,9 @@ init_toFunctionSelector();
|
|
|
346043
346043
|
init_decodeAbiParameters();
|
|
346044
346044
|
init_formatAbiItem2();
|
|
346045
346045
|
function decodeFunctionData(parameters) {
|
|
346046
|
-
const { abi:
|
|
346046
|
+
const { abi: abi48, data } = parameters;
|
|
346047
346047
|
const signature = slice(data, 0, 4);
|
|
346048
|
-
const description =
|
|
346048
|
+
const description = abi48.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
346049
346049
|
if (!description)
|
|
346050
346050
|
throw new AbiFunctionSignatureNotFoundError(signature, {
|
|
346051
346051
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -346689,9 +346689,9 @@ async function multicall(client, parameters) {
|
|
|
346689
346689
|
let currentChunk = 0;
|
|
346690
346690
|
let currentChunkSize = 0;
|
|
346691
346691
|
for (let i = 0; i < contracts2.length; i++) {
|
|
346692
|
-
const { abi:
|
|
346692
|
+
const { abi: abi48, address, args, functionName } = contracts2[i];
|
|
346693
346693
|
try {
|
|
346694
|
-
const callData = encodeFunctionData({ abi:
|
|
346694
|
+
const callData = encodeFunctionData({ abi: abi48, args, functionName });
|
|
346695
346695
|
currentChunkSize += (callData.length - 2) / 2;
|
|
346696
346696
|
if (
|
|
346697
346697
|
// Check if batching is enabled.
|
|
@@ -346713,7 +346713,7 @@ async function multicall(client, parameters) {
|
|
|
346713
346713
|
];
|
|
346714
346714
|
} catch (err) {
|
|
346715
346715
|
const error = getContractError(err, {
|
|
346716
|
-
abi:
|
|
346716
|
+
abi: abi48,
|
|
346717
346717
|
address,
|
|
346718
346718
|
args,
|
|
346719
346719
|
docsPath: "/docs/contract/multicall",
|
|
@@ -346759,14 +346759,14 @@ async function multicall(client, parameters) {
|
|
|
346759
346759
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
346760
346760
|
const { returnData, success } = aggregate3Result[j];
|
|
346761
346761
|
const { callData } = chunkedCalls[i][j];
|
|
346762
|
-
const { abi:
|
|
346762
|
+
const { abi: abi48, address, functionName, args } = contracts2[results.length];
|
|
346763
346763
|
try {
|
|
346764
346764
|
if (callData === "0x")
|
|
346765
346765
|
throw new AbiDecodingZeroDataError();
|
|
346766
346766
|
if (!success)
|
|
346767
346767
|
throw new RawContractError({ data: returnData });
|
|
346768
346768
|
const result2 = decodeFunctionResult({
|
|
346769
|
-
abi:
|
|
346769
|
+
abi: abi48,
|
|
346770
346770
|
args,
|
|
346771
346771
|
data: returnData,
|
|
346772
346772
|
functionName
|
|
@@ -346774,7 +346774,7 @@ async function multicall(client, parameters) {
|
|
|
346774
346774
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
346775
346775
|
} catch (err) {
|
|
346776
346776
|
const error = getContractError(err, {
|
|
346777
|
-
abi:
|
|
346777
|
+
abi: abi48,
|
|
346778
346778
|
address,
|
|
346779
346779
|
args,
|
|
346780
346780
|
docsPath: "/docs/contract/multicall",
|
|
@@ -347313,13 +347313,13 @@ async function simulateBlocks(client, parameters) {
|
|
|
347313
347313
|
return result.map((block2, i) => ({
|
|
347314
347314
|
...formatBlock(block2),
|
|
347315
347315
|
calls: block2.calls.map((call2, j) => {
|
|
347316
|
-
const { abi:
|
|
347316
|
+
const { abi: abi48, args, functionName, to } = blocks[i].calls[j];
|
|
347317
347317
|
const data = call2.error?.data ?? call2.returnData;
|
|
347318
347318
|
const gasUsed = BigInt(call2.gasUsed);
|
|
347319
347319
|
const logs = call2.logs?.map((log2) => formatLog(log2));
|
|
347320
347320
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
347321
|
-
const result2 =
|
|
347322
|
-
abi:
|
|
347321
|
+
const result2 = abi48 && status === "success" && data !== "0x" ? decodeFunctionResult({
|
|
347322
|
+
abi: abi48,
|
|
347323
347323
|
data,
|
|
347324
347324
|
functionName
|
|
347325
347325
|
}) : null;
|
|
@@ -347334,7 +347334,7 @@ async function simulateBlocks(client, parameters) {
|
|
|
347334
347334
|
if (!error2)
|
|
347335
347335
|
return void 0;
|
|
347336
347336
|
return getContractError(error2, {
|
|
347337
|
-
abi:
|
|
347337
|
+
abi: abi48 ?? [],
|
|
347338
347338
|
address: to,
|
|
347339
347339
|
args,
|
|
347340
347340
|
functionName: functionName ?? "<unknown>"
|
|
@@ -347611,10 +347611,10 @@ function from2(abiItem, options = {}) {
|
|
|
347611
347611
|
...prepare ? { hash: getSignatureHash(item) } : {}
|
|
347612
347612
|
};
|
|
347613
347613
|
}
|
|
347614
|
-
function fromAbi(
|
|
347614
|
+
function fromAbi(abi48, name, options) {
|
|
347615
347615
|
const { args = [], prepare = true } = options ?? {};
|
|
347616
347616
|
const isSelector = validate(name, { strict: false });
|
|
347617
|
-
const abiItems =
|
|
347617
|
+
const abiItems = abi48.filter((abiItem2) => {
|
|
347618
347618
|
if (isSelector) {
|
|
347619
347619
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
347620
347620
|
return getSelector(abiItem2) === slice2(name, 0, 4);
|
|
@@ -348214,8 +348214,8 @@ function encodeData2(abiFunction, ...args) {
|
|
|
348214
348214
|
function from4(abiFunction, options = {}) {
|
|
348215
348215
|
return from2(abiFunction, options);
|
|
348216
348216
|
}
|
|
348217
|
-
function fromAbi2(
|
|
348218
|
-
const item = fromAbi(
|
|
348217
|
+
function fromAbi2(abi48, name, options) {
|
|
348218
|
+
const item = fromAbi(abi48, name, options);
|
|
348219
348219
|
if (item.type !== "function")
|
|
348220
348220
|
throw new NotFoundError({ name, type: "function" });
|
|
348221
348221
|
return item;
|
|
@@ -349634,8 +349634,8 @@ function createTestClient(parameters) {
|
|
|
349634
349634
|
// ../../node_modules/viem/_esm/actions/wallet/deployContract.js
|
|
349635
349635
|
init_encodeDeployData();
|
|
349636
349636
|
function deployContract(walletClient, parameters) {
|
|
349637
|
-
const { abi:
|
|
349638
|
-
const calldata = encodeDeployData({ abi:
|
|
349637
|
+
const { abi: abi48, args, bytecode, ...request } = parameters;
|
|
349638
|
+
const calldata = encodeDeployData({ abi: abi48, args, bytecode });
|
|
349639
349639
|
return sendTransaction(walletClient, {
|
|
349640
349640
|
...request,
|
|
349641
349641
|
...request.authorizationList ? { to: null } : {},
|
|
@@ -358010,6 +358010,271 @@ var iConvexV1BoosterAdapterAbi = [
|
|
|
358010
358010
|
},
|
|
358011
358011
|
{ type: "error", inputs: [], name: "UnsupportedPidException" }
|
|
358012
358012
|
];
|
|
358013
|
+
var iCurveV1AdapterAbi = [
|
|
358014
|
+
{
|
|
358015
|
+
type: "function",
|
|
358016
|
+
inputs: [
|
|
358017
|
+
{ name: "leftoverAmount", internalType: "uint256", type: "uint256" },
|
|
358018
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358019
|
+
{ name: "rateMinRAY", internalType: "uint256", type: "uint256" }
|
|
358020
|
+
],
|
|
358021
|
+
name: "add_diff_liquidity_one_coin",
|
|
358022
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358023
|
+
stateMutability: "nonpayable"
|
|
358024
|
+
},
|
|
358025
|
+
{
|
|
358026
|
+
type: "function",
|
|
358027
|
+
inputs: [
|
|
358028
|
+
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
358029
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358030
|
+
{ name: "minAmount", internalType: "uint256", type: "uint256" }
|
|
358031
|
+
],
|
|
358032
|
+
name: "add_liquidity_one_coin",
|
|
358033
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358034
|
+
stateMutability: "nonpayable"
|
|
358035
|
+
},
|
|
358036
|
+
{
|
|
358037
|
+
type: "function",
|
|
358038
|
+
inputs: [
|
|
358039
|
+
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
358040
|
+
{ name: "i", internalType: "uint256", type: "uint256" }
|
|
358041
|
+
],
|
|
358042
|
+
name: "calc_add_one_coin",
|
|
358043
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
358044
|
+
stateMutability: "view"
|
|
358045
|
+
},
|
|
358046
|
+
{
|
|
358047
|
+
type: "function",
|
|
358048
|
+
inputs: [],
|
|
358049
|
+
name: "contractType",
|
|
358050
|
+
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
358051
|
+
stateMutability: "view"
|
|
358052
|
+
},
|
|
358053
|
+
{
|
|
358054
|
+
type: "function",
|
|
358055
|
+
inputs: [],
|
|
358056
|
+
name: "creditManager",
|
|
358057
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358058
|
+
stateMutability: "view"
|
|
358059
|
+
},
|
|
358060
|
+
{
|
|
358061
|
+
type: "function",
|
|
358062
|
+
inputs: [
|
|
358063
|
+
{ name: "i", internalType: "int128", type: "int128" },
|
|
358064
|
+
{ name: "j", internalType: "int128", type: "int128" },
|
|
358065
|
+
{ name: "dx", internalType: "uint256", type: "uint256" },
|
|
358066
|
+
{ name: "min_dy", internalType: "uint256", type: "uint256" }
|
|
358067
|
+
],
|
|
358068
|
+
name: "exchange",
|
|
358069
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358070
|
+
stateMutability: "nonpayable"
|
|
358071
|
+
},
|
|
358072
|
+
{
|
|
358073
|
+
type: "function",
|
|
358074
|
+
inputs: [
|
|
358075
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358076
|
+
{ name: "j", internalType: "uint256", type: "uint256" },
|
|
358077
|
+
{ name: "dx", internalType: "uint256", type: "uint256" },
|
|
358078
|
+
{ name: "min_dy", internalType: "uint256", type: "uint256" }
|
|
358079
|
+
],
|
|
358080
|
+
name: "exchange",
|
|
358081
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358082
|
+
stateMutability: "nonpayable"
|
|
358083
|
+
},
|
|
358084
|
+
{
|
|
358085
|
+
type: "function",
|
|
358086
|
+
inputs: [
|
|
358087
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358088
|
+
{ name: "j", internalType: "uint256", type: "uint256" },
|
|
358089
|
+
{ name: "leftoverAmount", internalType: "uint256", type: "uint256" },
|
|
358090
|
+
{ name: "rateMinRAY", internalType: "uint256", type: "uint256" }
|
|
358091
|
+
],
|
|
358092
|
+
name: "exchange_diff",
|
|
358093
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358094
|
+
stateMutability: "nonpayable"
|
|
358095
|
+
},
|
|
358096
|
+
{
|
|
358097
|
+
type: "function",
|
|
358098
|
+
inputs: [
|
|
358099
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358100
|
+
{ name: "j", internalType: "uint256", type: "uint256" },
|
|
358101
|
+
{ name: "leftoverAmount", internalType: "uint256", type: "uint256" },
|
|
358102
|
+
{ name: "rateMinRAY", internalType: "uint256", type: "uint256" }
|
|
358103
|
+
],
|
|
358104
|
+
name: "exchange_diff_underlying",
|
|
358105
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358106
|
+
stateMutability: "nonpayable"
|
|
358107
|
+
},
|
|
358108
|
+
{
|
|
358109
|
+
type: "function",
|
|
358110
|
+
inputs: [
|
|
358111
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358112
|
+
{ name: "j", internalType: "uint256", type: "uint256" },
|
|
358113
|
+
{ name: "dx", internalType: "uint256", type: "uint256" },
|
|
358114
|
+
{ name: "min_dy", internalType: "uint256", type: "uint256" }
|
|
358115
|
+
],
|
|
358116
|
+
name: "exchange_underlying",
|
|
358117
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358118
|
+
stateMutability: "nonpayable"
|
|
358119
|
+
},
|
|
358120
|
+
{
|
|
358121
|
+
type: "function",
|
|
358122
|
+
inputs: [
|
|
358123
|
+
{ name: "i", internalType: "int128", type: "int128" },
|
|
358124
|
+
{ name: "j", internalType: "int128", type: "int128" },
|
|
358125
|
+
{ name: "dx", internalType: "uint256", type: "uint256" },
|
|
358126
|
+
{ name: "min_dy", internalType: "uint256", type: "uint256" }
|
|
358127
|
+
],
|
|
358128
|
+
name: "exchange_underlying",
|
|
358129
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358130
|
+
stateMutability: "nonpayable"
|
|
358131
|
+
},
|
|
358132
|
+
{
|
|
358133
|
+
type: "function",
|
|
358134
|
+
inputs: [],
|
|
358135
|
+
name: "lp_token",
|
|
358136
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358137
|
+
stateMutability: "view"
|
|
358138
|
+
},
|
|
358139
|
+
{
|
|
358140
|
+
type: "function",
|
|
358141
|
+
inputs: [],
|
|
358142
|
+
name: "metapoolBase",
|
|
358143
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358144
|
+
stateMutability: "view"
|
|
358145
|
+
},
|
|
358146
|
+
{
|
|
358147
|
+
type: "function",
|
|
358148
|
+
inputs: [],
|
|
358149
|
+
name: "nCoins",
|
|
358150
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
358151
|
+
stateMutability: "view"
|
|
358152
|
+
},
|
|
358153
|
+
{
|
|
358154
|
+
type: "function",
|
|
358155
|
+
inputs: [
|
|
358156
|
+
{ name: "leftoverAmount", internalType: "uint256", type: "uint256" },
|
|
358157
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358158
|
+
{ name: "rateMinRAY", internalType: "uint256", type: "uint256" }
|
|
358159
|
+
],
|
|
358160
|
+
name: "remove_diff_liquidity_one_coin",
|
|
358161
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358162
|
+
stateMutability: "nonpayable"
|
|
358163
|
+
},
|
|
358164
|
+
{
|
|
358165
|
+
type: "function",
|
|
358166
|
+
inputs: [
|
|
358167
|
+
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
358168
|
+
{ name: "i", internalType: "int128", type: "int128" },
|
|
358169
|
+
{ name: "minAmount", internalType: "uint256", type: "uint256" }
|
|
358170
|
+
],
|
|
358171
|
+
name: "remove_liquidity_one_coin",
|
|
358172
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358173
|
+
stateMutability: "nonpayable"
|
|
358174
|
+
},
|
|
358175
|
+
{
|
|
358176
|
+
type: "function",
|
|
358177
|
+
inputs: [
|
|
358178
|
+
{ name: "amount", internalType: "uint256", type: "uint256" },
|
|
358179
|
+
{ name: "i", internalType: "uint256", type: "uint256" },
|
|
358180
|
+
{ name: "minAmount", internalType: "uint256", type: "uint256" }
|
|
358181
|
+
],
|
|
358182
|
+
name: "remove_liquidity_one_coin",
|
|
358183
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
358184
|
+
stateMutability: "nonpayable"
|
|
358185
|
+
},
|
|
358186
|
+
{
|
|
358187
|
+
type: "function",
|
|
358188
|
+
inputs: [],
|
|
358189
|
+
name: "serialize",
|
|
358190
|
+
outputs: [{ name: "serializedData", internalType: "bytes", type: "bytes" }],
|
|
358191
|
+
stateMutability: "view"
|
|
358192
|
+
},
|
|
358193
|
+
{
|
|
358194
|
+
type: "function",
|
|
358195
|
+
inputs: [],
|
|
358196
|
+
name: "targetContract",
|
|
358197
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358198
|
+
stateMutability: "view"
|
|
358199
|
+
},
|
|
358200
|
+
{
|
|
358201
|
+
type: "function",
|
|
358202
|
+
inputs: [],
|
|
358203
|
+
name: "token",
|
|
358204
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358205
|
+
stateMutability: "view"
|
|
358206
|
+
},
|
|
358207
|
+
{
|
|
358208
|
+
type: "function",
|
|
358209
|
+
inputs: [],
|
|
358210
|
+
name: "token0",
|
|
358211
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358212
|
+
stateMutability: "view"
|
|
358213
|
+
},
|
|
358214
|
+
{
|
|
358215
|
+
type: "function",
|
|
358216
|
+
inputs: [],
|
|
358217
|
+
name: "token1",
|
|
358218
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358219
|
+
stateMutability: "view"
|
|
358220
|
+
},
|
|
358221
|
+
{
|
|
358222
|
+
type: "function",
|
|
358223
|
+
inputs: [],
|
|
358224
|
+
name: "token2",
|
|
358225
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358226
|
+
stateMutability: "view"
|
|
358227
|
+
},
|
|
358228
|
+
{
|
|
358229
|
+
type: "function",
|
|
358230
|
+
inputs: [],
|
|
358231
|
+
name: "token3",
|
|
358232
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358233
|
+
stateMutability: "view"
|
|
358234
|
+
},
|
|
358235
|
+
{
|
|
358236
|
+
type: "function",
|
|
358237
|
+
inputs: [],
|
|
358238
|
+
name: "underlying0",
|
|
358239
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358240
|
+
stateMutability: "view"
|
|
358241
|
+
},
|
|
358242
|
+
{
|
|
358243
|
+
type: "function",
|
|
358244
|
+
inputs: [],
|
|
358245
|
+
name: "underlying1",
|
|
358246
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358247
|
+
stateMutability: "view"
|
|
358248
|
+
},
|
|
358249
|
+
{
|
|
358250
|
+
type: "function",
|
|
358251
|
+
inputs: [],
|
|
358252
|
+
name: "underlying2",
|
|
358253
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358254
|
+
stateMutability: "view"
|
|
358255
|
+
},
|
|
358256
|
+
{
|
|
358257
|
+
type: "function",
|
|
358258
|
+
inputs: [],
|
|
358259
|
+
name: "underlying3",
|
|
358260
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
358261
|
+
stateMutability: "view"
|
|
358262
|
+
},
|
|
358263
|
+
{
|
|
358264
|
+
type: "function",
|
|
358265
|
+
inputs: [],
|
|
358266
|
+
name: "use256",
|
|
358267
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
358268
|
+
stateMutability: "view"
|
|
358269
|
+
},
|
|
358270
|
+
{
|
|
358271
|
+
type: "function",
|
|
358272
|
+
inputs: [],
|
|
358273
|
+
name: "version",
|
|
358274
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
358275
|
+
stateMutability: "view"
|
|
358276
|
+
}
|
|
358277
|
+
];
|
|
358013
358278
|
var iCurveV1_2AssetsAdapterAbi = [
|
|
358014
358279
|
{
|
|
358015
358280
|
type: "function",
|
|
@@ -359379,6 +359644,138 @@ var ierc4626AdapterAbi = [
|
|
|
359379
359644
|
stateMutability: "nonpayable"
|
|
359380
359645
|
}
|
|
359381
359646
|
];
|
|
359647
|
+
var iEqualizerRouterAdapterAbi = [
|
|
359648
|
+
{
|
|
359649
|
+
type: "function",
|
|
359650
|
+
inputs: [],
|
|
359651
|
+
name: "contractType",
|
|
359652
|
+
outputs: [{ name: "", internalType: "bytes32", type: "bytes32" }],
|
|
359653
|
+
stateMutability: "view"
|
|
359654
|
+
},
|
|
359655
|
+
{
|
|
359656
|
+
type: "function",
|
|
359657
|
+
inputs: [],
|
|
359658
|
+
name: "creditManager",
|
|
359659
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
359660
|
+
stateMutability: "view"
|
|
359661
|
+
},
|
|
359662
|
+
{
|
|
359663
|
+
type: "function",
|
|
359664
|
+
inputs: [
|
|
359665
|
+
{ name: "token0", internalType: "address", type: "address" },
|
|
359666
|
+
{ name: "token1", internalType: "address", type: "address" },
|
|
359667
|
+
{ name: "stable", internalType: "bool", type: "bool" }
|
|
359668
|
+
],
|
|
359669
|
+
name: "isPoolAllowed",
|
|
359670
|
+
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
359671
|
+
stateMutability: "view"
|
|
359672
|
+
},
|
|
359673
|
+
{
|
|
359674
|
+
type: "function",
|
|
359675
|
+
inputs: [],
|
|
359676
|
+
name: "serialize",
|
|
359677
|
+
outputs: [{ name: "serializedData", internalType: "bytes", type: "bytes" }],
|
|
359678
|
+
stateMutability: "view"
|
|
359679
|
+
},
|
|
359680
|
+
{
|
|
359681
|
+
type: "function",
|
|
359682
|
+
inputs: [
|
|
359683
|
+
{
|
|
359684
|
+
name: "pools",
|
|
359685
|
+
internalType: "struct EqualizerPoolStatus[]",
|
|
359686
|
+
type: "tuple[]",
|
|
359687
|
+
components: [
|
|
359688
|
+
{ name: "token0", internalType: "address", type: "address" },
|
|
359689
|
+
{ name: "token1", internalType: "address", type: "address" },
|
|
359690
|
+
{ name: "stable", internalType: "bool", type: "bool" },
|
|
359691
|
+
{ name: "allowed", internalType: "bool", type: "bool" }
|
|
359692
|
+
]
|
|
359693
|
+
}
|
|
359694
|
+
],
|
|
359695
|
+
name: "setPoolStatusBatch",
|
|
359696
|
+
outputs: [],
|
|
359697
|
+
stateMutability: "nonpayable"
|
|
359698
|
+
},
|
|
359699
|
+
{
|
|
359700
|
+
type: "function",
|
|
359701
|
+
inputs: [
|
|
359702
|
+
{ name: "leftoverAmount", internalType: "uint256", type: "uint256" },
|
|
359703
|
+
{ name: "rateMinRAY", internalType: "uint256", type: "uint256" },
|
|
359704
|
+
{
|
|
359705
|
+
name: "routes",
|
|
359706
|
+
internalType: "struct Route[]",
|
|
359707
|
+
type: "tuple[]",
|
|
359708
|
+
components: [
|
|
359709
|
+
{ name: "from", internalType: "address", type: "address" },
|
|
359710
|
+
{ name: "to", internalType: "address", type: "address" },
|
|
359711
|
+
{ name: "stable", internalType: "bool", type: "bool" }
|
|
359712
|
+
]
|
|
359713
|
+
},
|
|
359714
|
+
{ name: "deadline", internalType: "uint256", type: "uint256" }
|
|
359715
|
+
],
|
|
359716
|
+
name: "swapDiffTokensForTokens",
|
|
359717
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
359718
|
+
stateMutability: "nonpayable"
|
|
359719
|
+
},
|
|
359720
|
+
{
|
|
359721
|
+
type: "function",
|
|
359722
|
+
inputs: [
|
|
359723
|
+
{ name: "amountIn", internalType: "uint256", type: "uint256" },
|
|
359724
|
+
{ name: "amountOutMin", internalType: "uint256", type: "uint256" },
|
|
359725
|
+
{
|
|
359726
|
+
name: "routes",
|
|
359727
|
+
internalType: "struct Route[]",
|
|
359728
|
+
type: "tuple[]",
|
|
359729
|
+
components: [
|
|
359730
|
+
{ name: "from", internalType: "address", type: "address" },
|
|
359731
|
+
{ name: "to", internalType: "address", type: "address" },
|
|
359732
|
+
{ name: "stable", internalType: "bool", type: "bool" }
|
|
359733
|
+
]
|
|
359734
|
+
},
|
|
359735
|
+
{ name: "", internalType: "address", type: "address" },
|
|
359736
|
+
{ name: "deadline", internalType: "uint256", type: "uint256" }
|
|
359737
|
+
],
|
|
359738
|
+
name: "swapExactTokensForTokens",
|
|
359739
|
+
outputs: [{ name: "useSafePrices", internalType: "bool", type: "bool" }],
|
|
359740
|
+
stateMutability: "nonpayable"
|
|
359741
|
+
},
|
|
359742
|
+
{
|
|
359743
|
+
type: "function",
|
|
359744
|
+
inputs: [],
|
|
359745
|
+
name: "targetContract",
|
|
359746
|
+
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
359747
|
+
stateMutability: "view"
|
|
359748
|
+
},
|
|
359749
|
+
{
|
|
359750
|
+
type: "function",
|
|
359751
|
+
inputs: [],
|
|
359752
|
+
name: "version",
|
|
359753
|
+
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
359754
|
+
stateMutability: "view"
|
|
359755
|
+
},
|
|
359756
|
+
{
|
|
359757
|
+
type: "event",
|
|
359758
|
+
anonymous: false,
|
|
359759
|
+
inputs: [
|
|
359760
|
+
{
|
|
359761
|
+
name: "token0",
|
|
359762
|
+
internalType: "address",
|
|
359763
|
+
type: "address",
|
|
359764
|
+
indexed: true
|
|
359765
|
+
},
|
|
359766
|
+
{
|
|
359767
|
+
name: "token1",
|
|
359768
|
+
internalType: "address",
|
|
359769
|
+
type: "address",
|
|
359770
|
+
indexed: true
|
|
359771
|
+
},
|
|
359772
|
+
{ name: "stable", internalType: "bool", type: "bool", indexed: false },
|
|
359773
|
+
{ name: "allowed", internalType: "bool", type: "bool", indexed: false }
|
|
359774
|
+
],
|
|
359775
|
+
name: "SetPoolStatus"
|
|
359776
|
+
},
|
|
359777
|
+
{ type: "error", inputs: [], name: "InvalidPathException" }
|
|
359778
|
+
];
|
|
359382
359779
|
var iMellowVaultAdapterAbi = [
|
|
359383
359780
|
{
|
|
359384
359781
|
type: "function",
|
|
@@ -361109,12 +361506,12 @@ var json_parse = (s) => {
|
|
|
361109
361506
|
function createRawTx(to, parameters, description) {
|
|
361110
361507
|
const { args } = parameters;
|
|
361111
361508
|
const fname = parameters.functionName;
|
|
361112
|
-
const { abi:
|
|
361509
|
+
const { abi: abi48, functionName } = (() => {
|
|
361113
361510
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
361114
361511
|
return parameters;
|
|
361115
361512
|
return prepareEncodeFunctionData(parameters);
|
|
361116
361513
|
})();
|
|
361117
|
-
const abiItem =
|
|
361514
|
+
const abiItem = abi48[0];
|
|
361118
361515
|
const signature = functionName;
|
|
361119
361516
|
const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
361120
361517
|
const functionEncodedData = concatHex([signature, data ?? "0x"]);
|
|
@@ -368587,9 +368984,9 @@ async function simulateMulticall(client, parameters) {
|
|
|
368587
368984
|
let currentChunk = 0;
|
|
368588
368985
|
let currentChunkSize = 0;
|
|
368589
368986
|
for (const contract of contracts2) {
|
|
368590
|
-
const { abi:
|
|
368987
|
+
const { abi: abi48, address, args, functionName } = contract;
|
|
368591
368988
|
try {
|
|
368592
|
-
const callData = encodeFunctionData({ abi:
|
|
368989
|
+
const callData = encodeFunctionData({ abi: abi48, args, functionName });
|
|
368593
368990
|
currentChunkSize += (callData.length - 2) / 2;
|
|
368594
368991
|
if (
|
|
368595
368992
|
// Check if batching is enabled.
|
|
@@ -368611,7 +369008,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
368611
369008
|
];
|
|
368612
369009
|
} catch (err) {
|
|
368613
369010
|
const error = getContractError(err, {
|
|
368614
|
-
abi:
|
|
369011
|
+
abi: abi48,
|
|
368615
369012
|
address,
|
|
368616
369013
|
args,
|
|
368617
369014
|
docsPath: "/docs/contract/multicall",
|
|
@@ -368668,12 +369065,12 @@ async function simulateMulticall(client, parameters) {
|
|
|
368668
369065
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
368669
369066
|
const { returnData, success } = aggregate3Result[j];
|
|
368670
369067
|
const { callData } = chunkedCalls[i][j];
|
|
368671
|
-
const { abi:
|
|
369068
|
+
const { abi: abi48, address, functionName, args } = contracts2[results.length];
|
|
368672
369069
|
try {
|
|
368673
369070
|
if (callData === "0x") throw new AbiDecodingZeroDataError();
|
|
368674
369071
|
if (!success) throw new RawContractError({ data: returnData });
|
|
368675
369072
|
const result2 = decodeFunctionResult({
|
|
368676
|
-
abi:
|
|
369073
|
+
abi: abi48,
|
|
368677
369074
|
args,
|
|
368678
369075
|
data: returnData,
|
|
368679
369076
|
functionName
|
|
@@ -368681,7 +369078,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
368681
369078
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
368682
369079
|
} catch (err) {
|
|
368683
369080
|
const error = getContractError(err, {
|
|
368684
|
-
abi:
|
|
369081
|
+
abi: abi48,
|
|
368685
369082
|
address,
|
|
368686
369083
|
args,
|
|
368687
369084
|
docsPath: "/docs/contract/multicall",
|
|
@@ -379560,7 +379957,7 @@ var RedstonePriceFeedContract = class extends AbstractPriceFeedContract {
|
|
|
379560
379957
|
...super.stateHuman(raw),
|
|
379561
379958
|
contractType: "PRICE_FEED::REDSTONE",
|
|
379562
379959
|
dataId: this.dataId,
|
|
379563
|
-
signers: this.signers,
|
|
379960
|
+
signers: this.signers.filter((s) => s !== ADDRESS_0X0),
|
|
379564
379961
|
signersThreshold: this.signersThreshold,
|
|
379565
379962
|
skipCheck: true,
|
|
379566
379963
|
lastPrice: this.lastPrice.toString(),
|
|
@@ -382822,7 +383219,7 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
382822
383219
|
void 0
|
|
382823
383220
|
);
|
|
382824
383221
|
const calls = [
|
|
382825
|
-
...priceUpdates,
|
|
383222
|
+
...operation === "close" ? [] : priceUpdates,
|
|
382826
383223
|
...routerCloseResult.calls,
|
|
382827
383224
|
...this.#prepareDisableQuotas(ca),
|
|
382828
383225
|
...this.#prepareDecreaseDebt(ca),
|
|
@@ -382873,7 +383270,7 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
382873
383270
|
ca.creditManager
|
|
382874
383271
|
);
|
|
382875
383272
|
const calls = [
|
|
382876
|
-
...priceUpdates,
|
|
383273
|
+
...operation === "close" ? [] : priceUpdates,
|
|
382877
383274
|
...this.#prepareAddCollateral(ca.creditFacade, addCollateral, permits),
|
|
382878
383275
|
...this.#prepareDisableQuotas(ca),
|
|
382879
383276
|
...this.#prepareDecreaseDebt(ca),
|
|
@@ -389112,7 +389509,7 @@ var iCreditManagerV3Abi = [
|
|
|
389112
389509
|
name: "SetCreditConfigurator"
|
|
389113
389510
|
}
|
|
389114
389511
|
];
|
|
389115
|
-
var
|
|
389512
|
+
var iCurveV1AdapterAbi2 = [
|
|
389116
389513
|
{
|
|
389117
389514
|
type: "function",
|
|
389118
389515
|
inputs: [],
|
|
@@ -393319,7 +393716,7 @@ var ierc4626AdapterAbi2 = [
|
|
|
393319
393716
|
stateMutability: "nonpayable"
|
|
393320
393717
|
}
|
|
393321
393718
|
];
|
|
393322
|
-
var
|
|
393719
|
+
var iEqualizerRouterAdapterAbi2 = [
|
|
393323
393720
|
{
|
|
393324
393721
|
type: "function",
|
|
393325
393722
|
inputs: [],
|
|
@@ -401971,7 +402368,7 @@ function normalizeTransactions(batch) {
|
|
|
401971
402368
|
});
|
|
401972
402369
|
}
|
|
401973
402370
|
function normalizeDirectTx(t) {
|
|
401974
|
-
const
|
|
402371
|
+
const abi48 = [
|
|
401975
402372
|
{
|
|
401976
402373
|
type: "function",
|
|
401977
402374
|
outputs: [],
|
|
@@ -401993,10 +402390,10 @@ function normalizeDirectTx(t) {
|
|
|
401993
402390
|
return {
|
|
401994
402391
|
target: t.to,
|
|
401995
402392
|
value: t.value,
|
|
401996
|
-
signature: formatAbiItem2(
|
|
402393
|
+
signature: formatAbiItem2(abi48[0], { includeName: false }),
|
|
401997
402394
|
parameters,
|
|
401998
402395
|
data: encodeFunctionData({
|
|
401999
|
-
abi:
|
|
402396
|
+
abi: abi48,
|
|
402000
402397
|
functionName: t.contractMethod.name,
|
|
402001
402398
|
args: values
|
|
402002
402399
|
})
|
|
@@ -412736,9 +413133,9 @@ var AbstractParser = class {
|
|
|
412736
413133
|
};
|
|
412737
413134
|
}
|
|
412738
413135
|
parseConstructor(address, encodedArgs) {
|
|
412739
|
-
for (const { abi:
|
|
413136
|
+
for (const { abi: abi48, comment } of this.constructorAbis) {
|
|
412740
413137
|
try {
|
|
412741
|
-
return this.#parseConstructor(address, encodedArgs,
|
|
413138
|
+
return this.#parseConstructor(address, encodedArgs, abi48, comment);
|
|
412742
413139
|
} catch (e) {
|
|
412743
413140
|
this.logger.warn(`constructor ${comment} of ${address} failed to parse args: ${e}`);
|
|
412744
413141
|
}
|
|
@@ -413056,7 +413453,7 @@ var CurveV1AdapterStableNGAdapterParser = class extends AbstractParser {
|
|
|
413056
413453
|
var CurveV1ExchangeOnlyAdapterParser = class extends AbstractParser {
|
|
413057
413454
|
constructor(contractType) {
|
|
413058
413455
|
super(contractType, "constructor(address creditManager, address curvePool, address lp_token, address metapoolBase, uint256 nCoins)");
|
|
413059
|
-
this._abi =
|
|
413456
|
+
this._abi = iCurveV1AdapterAbi2;
|
|
413060
413457
|
this.parameterParsers = {
|
|
413061
413458
|
constructor: [
|
|
413062
413459
|
parseAddress(),
|
|
@@ -413084,7 +413481,7 @@ var CurveV1SteCRVPoolAdapterParser = class extends AbstractParser {
|
|
|
413084
413481
|
var CurveV1WrapperAdapterParser = class extends AbstractParser {
|
|
413085
413482
|
constructor(contractType) {
|
|
413086
413483
|
super(contractType, "constructor(address _creditManager, address _curveDeposit, address _lp_token, uint256 _nCoins)");
|
|
413087
|
-
this._abi =
|
|
413484
|
+
this._abi = iCurveV1AdapterAbi2;
|
|
413088
413485
|
this.parameterParsers = {
|
|
413089
413486
|
constructor: [parseAddress(), parseAddress(), parseToken(), void 0]
|
|
413090
413487
|
};
|
|
@@ -413154,7 +413551,7 @@ var DaiUsdsExchangeAdapter = class extends AbstractParser {
|
|
|
413154
413551
|
var EqualizerRouterAdapterParser = class extends AbstractParser {
|
|
413155
413552
|
constructor(contractType) {
|
|
413156
413553
|
super(contractType, "constructor(address _creditManager, address _router)");
|
|
413157
|
-
this._abi =
|
|
413554
|
+
this._abi = iEqualizerRouterAdapterAbi2;
|
|
413158
413555
|
this.parameterParsers = {
|
|
413159
413556
|
constructor: [parseAddress(), parseAddress()]
|
|
413160
413557
|
};
|
|
@@ -416882,112 +417279,134 @@ var Curve4AssetsAdapterContract = class extends AbstractAdapterContract {
|
|
|
416882
417279
|
}
|
|
416883
417280
|
};
|
|
416884
417281
|
|
|
417282
|
+
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/CurveV1AdapterDeposit.js
|
|
417283
|
+
var abi33 = iCurveV1AdapterAbi;
|
|
417284
|
+
var CurveV1AdapterDeposit = class extends AbstractAdapterContract {
|
|
417285
|
+
constructor(sdk, args) {
|
|
417286
|
+
super(sdk, {
|
|
417287
|
+
...args,
|
|
417288
|
+
abi: abi33
|
|
417289
|
+
});
|
|
417290
|
+
}
|
|
417291
|
+
};
|
|
417292
|
+
|
|
416885
417293
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/CurveV1AdapterStETHContract.js
|
|
416886
|
-
var
|
|
417294
|
+
var abi34 = iCurveV1_2AssetsAdapterAbi;
|
|
416887
417295
|
var CurveV1AdapterStETHContract = class extends AbstractAdapterContract {
|
|
416888
417296
|
constructor(sdk, args) {
|
|
416889
417297
|
super(sdk, {
|
|
416890
417298
|
...args,
|
|
416891
|
-
abi:
|
|
417299
|
+
abi: abi34
|
|
416892
417300
|
});
|
|
416893
417301
|
}
|
|
416894
417302
|
};
|
|
416895
417303
|
|
|
416896
417304
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/CurveV1StableNGAdapterContract.js
|
|
416897
|
-
var
|
|
417305
|
+
var abi35 = iCurveV1StableNgAdapterAbi;
|
|
416898
417306
|
var CurveV1StableNGAdapterContract = class extends AbstractAdapterContract {
|
|
416899
417307
|
constructor(sdk, args) {
|
|
416900
417308
|
super(sdk, {
|
|
416901
417309
|
...args,
|
|
416902
|
-
abi:
|
|
417310
|
+
abi: abi35
|
|
416903
417311
|
});
|
|
416904
417312
|
}
|
|
416905
417313
|
};
|
|
416906
417314
|
|
|
416907
417315
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/DaiUsdsAdapterContract.js
|
|
416908
|
-
var
|
|
417316
|
+
var abi36 = iDaiUsdsAdapterAbi;
|
|
416909
417317
|
var DaiUsdsAdapterContract = class extends AbstractAdapterContract {
|
|
416910
417318
|
constructor(sdk, args) {
|
|
416911
417319
|
super(sdk, {
|
|
416912
417320
|
...args,
|
|
416913
|
-
abi:
|
|
417321
|
+
abi: abi36
|
|
417322
|
+
});
|
|
417323
|
+
}
|
|
417324
|
+
};
|
|
417325
|
+
|
|
417326
|
+
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/EqualizerRouterAdapterContract.js
|
|
417327
|
+
var abi37 = iEqualizerRouterAdapterAbi;
|
|
417328
|
+
var EqualizerRouterAdapterContract = class extends AbstractAdapterContract {
|
|
417329
|
+
constructor(sdk, args) {
|
|
417330
|
+
super(sdk, {
|
|
417331
|
+
...args,
|
|
417332
|
+
abi: abi37
|
|
416914
417333
|
});
|
|
416915
417334
|
}
|
|
416916
417335
|
};
|
|
416917
417336
|
|
|
416918
417337
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/ERC4626AdapterContract.js
|
|
416919
|
-
var
|
|
417338
|
+
var abi38 = ierc4626AdapterAbi;
|
|
416920
417339
|
var ERC4626AdapterContract = class extends AbstractAdapterContract {
|
|
416921
417340
|
constructor(sdk, args) {
|
|
416922
417341
|
super(sdk, {
|
|
416923
417342
|
...args,
|
|
416924
|
-
abi:
|
|
417343
|
+
abi: abi38
|
|
416925
417344
|
});
|
|
416926
417345
|
}
|
|
416927
417346
|
};
|
|
416928
417347
|
|
|
416929
417348
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/MellowERC4626VaultAdapterContract.js
|
|
416930
|
-
var
|
|
417349
|
+
var abi39 = ierc4626AdapterAbi;
|
|
416931
417350
|
var MellowERC4626VaultAdapterContract = class extends AbstractAdapterContract {
|
|
416932
417351
|
constructor(sdk, args) {
|
|
416933
417352
|
super(sdk, {
|
|
416934
417353
|
...args,
|
|
416935
|
-
abi:
|
|
417354
|
+
abi: abi39
|
|
416936
417355
|
});
|
|
416937
417356
|
}
|
|
416938
417357
|
};
|
|
416939
417358
|
|
|
416940
417359
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/MellowVaultAdapterContract.js
|
|
416941
|
-
var
|
|
417360
|
+
var abi40 = iMellowVaultAdapterAbi;
|
|
416942
417361
|
var MellowVaultAdapterContract = class extends AbstractAdapterContract {
|
|
416943
417362
|
constructor(sdk, args) {
|
|
416944
417363
|
super(sdk, {
|
|
416945
417364
|
...args,
|
|
416946
|
-
abi:
|
|
417365
|
+
abi: abi40
|
|
416947
417366
|
});
|
|
416948
417367
|
}
|
|
416949
417368
|
};
|
|
416950
417369
|
|
|
416951
417370
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/PendleRouterAdapterContract.js
|
|
416952
|
-
var
|
|
417371
|
+
var abi41 = iPendleRouterAdapterAbi;
|
|
416953
417372
|
var PendleRouterAdapterContract = class extends AbstractAdapterContract {
|
|
416954
417373
|
constructor(sdk, args) {
|
|
416955
417374
|
super(sdk, {
|
|
416956
417375
|
...args,
|
|
416957
|
-
abi:
|
|
417376
|
+
abi: abi41
|
|
416958
417377
|
});
|
|
416959
417378
|
}
|
|
416960
417379
|
};
|
|
416961
417380
|
|
|
416962
417381
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/StakingRewardsAdapterContract.js
|
|
416963
|
-
var
|
|
417382
|
+
var abi42 = iStakingRewardsAdapterAbi;
|
|
416964
417383
|
var StakingRewardsAdapterContract = class extends AbstractAdapterContract {
|
|
416965
417384
|
constructor(sdk, args) {
|
|
416966
417385
|
super(sdk, {
|
|
416967
417386
|
...args,
|
|
416968
|
-
abi:
|
|
417387
|
+
abi: abi42
|
|
416969
417388
|
});
|
|
416970
417389
|
}
|
|
416971
417390
|
};
|
|
416972
417391
|
|
|
416973
417392
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/UniswapV2AdapterContract.js
|
|
416974
|
-
var
|
|
417393
|
+
var abi43 = iUniswapV2AdapterAbi;
|
|
416975
417394
|
var UniswapV2AdapterContract = class extends AbstractAdapterContract {
|
|
416976
417395
|
constructor(sdk, args) {
|
|
416977
417396
|
super(sdk, {
|
|
416978
417397
|
...args,
|
|
416979
|
-
abi:
|
|
417398
|
+
abi: abi43
|
|
416980
417399
|
});
|
|
416981
417400
|
}
|
|
416982
417401
|
};
|
|
416983
417402
|
|
|
416984
417403
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/UniswapV3AdapterContract.js
|
|
416985
|
-
var
|
|
417404
|
+
var abi44 = iUniswapV3AdapterAbi;
|
|
416986
417405
|
var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
416987
417406
|
constructor(sdk, args) {
|
|
416988
417407
|
super(sdk, {
|
|
416989
417408
|
...args,
|
|
416990
|
-
abi:
|
|
417409
|
+
abi: abi44
|
|
416991
417410
|
});
|
|
416992
417411
|
}
|
|
416993
417412
|
parseFunctionParams(params) {
|
|
@@ -417108,34 +417527,34 @@ var UniswapV3AdapterContract = class extends AbstractAdapterContract {
|
|
|
417108
417527
|
};
|
|
417109
417528
|
|
|
417110
417529
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/VelodromeV2AdapterContract.js
|
|
417111
|
-
var
|
|
417530
|
+
var abi45 = iVelodromeV2RouterAdapterAbi;
|
|
417112
417531
|
var VelodromeV2RouterAdapterContract = class extends AbstractAdapterContract {
|
|
417113
417532
|
constructor(sdk, args) {
|
|
417114
417533
|
super(sdk, {
|
|
417115
417534
|
...args,
|
|
417116
|
-
abi:
|
|
417535
|
+
abi: abi45
|
|
417117
417536
|
});
|
|
417118
417537
|
}
|
|
417119
417538
|
};
|
|
417120
417539
|
|
|
417121
417540
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/WstETHV1AdapterContract.js
|
|
417122
|
-
var
|
|
417541
|
+
var abi46 = iwstEthv1AdapterAbi;
|
|
417123
417542
|
var WstETHV1AdapterContract = class extends AbstractAdapterContract {
|
|
417124
417543
|
constructor(sdk, args) {
|
|
417125
417544
|
super(sdk, {
|
|
417126
417545
|
...args,
|
|
417127
|
-
abi:
|
|
417546
|
+
abi: abi46
|
|
417128
417547
|
});
|
|
417129
417548
|
}
|
|
417130
417549
|
};
|
|
417131
417550
|
|
|
417132
417551
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/adapters/YearnV2AdapterContract.js
|
|
417133
|
-
var
|
|
417552
|
+
var abi47 = iYearnV2AdapterAbi;
|
|
417134
417553
|
var YearnV2RouterAdapterContract = class extends AbstractAdapterContract {
|
|
417135
417554
|
constructor(sdk, args) {
|
|
417136
417555
|
super(sdk, {
|
|
417137
417556
|
...args,
|
|
417138
|
-
abi:
|
|
417557
|
+
abi: abi47
|
|
417139
417558
|
});
|
|
417140
417559
|
}
|
|
417141
417560
|
};
|
|
@@ -417149,10 +417568,14 @@ var GearboxAdaptersPlugin = class extends SDKConstruct {
|
|
|
417149
417568
|
args.baseParams.contractType
|
|
417150
417569
|
);
|
|
417151
417570
|
switch (adapterType) {
|
|
417152
|
-
case "ADAPTER::
|
|
417153
|
-
return new
|
|
417154
|
-
case "ADAPTER::
|
|
417155
|
-
return new
|
|
417571
|
+
case "ADAPTER::BALANCER_V3_ROUTER":
|
|
417572
|
+
return new BalancerV3RouterAdapterContract(this.sdk, args);
|
|
417573
|
+
case "ADAPTER::BALANCER_VAULT":
|
|
417574
|
+
return new BalancerV2VaultAdapterContract(this.sdk, args);
|
|
417575
|
+
case "ADAPTER::CAMELOT_V3_ROUTER":
|
|
417576
|
+
return new CamelotV3AdapterContract(this.sdk, args);
|
|
417577
|
+
case "ADAPTER::CURVE_STABLE_NG":
|
|
417578
|
+
return new CurveV1StableNGAdapterContract(this.sdk, args);
|
|
417156
417579
|
case "ADAPTER::CURVE_V1_2ASSETS":
|
|
417157
417580
|
return new Curve2AssetsAdapterContract(this.sdk, args);
|
|
417158
417581
|
case "ADAPTER::CURVE_V1_3ASSETS":
|
|
@@ -417162,37 +417585,35 @@ var GearboxAdaptersPlugin = class extends SDKConstruct {
|
|
|
417162
417585
|
case "ADAPTER::CURVE_V1_STECRV_POOL":
|
|
417163
417586
|
return new CurveV1AdapterStETHContract(this.sdk, args);
|
|
417164
417587
|
case "ADAPTER::CURVE_V1_WRAPPER":
|
|
417165
|
-
return new
|
|
417588
|
+
return new CurveV1AdapterDeposit(this.sdk, args);
|
|
417166
417589
|
case "ADAPTER::CVX_V1_BASE_REWARD_POOL":
|
|
417167
417590
|
return new ConvexV1BaseRewardPoolAdapterContract(this.sdk, args);
|
|
417168
417591
|
case "ADAPTER::CVX_V1_BOOSTER":
|
|
417169
417592
|
return new ConvexV1BoosterAdapterContract(this.sdk, args);
|
|
417170
|
-
case "ADAPTER::
|
|
417171
|
-
return new
|
|
417172
|
-
case "ADAPTER::
|
|
417173
|
-
return new
|
|
417174
|
-
case "ADAPTER::BALANCER_VAULT":
|
|
417175
|
-
return new BalancerV2VaultAdapterContract(this.sdk, args);
|
|
417176
|
-
case "ADAPTER::BALANCER_V3_ROUTER":
|
|
417177
|
-
return new BalancerV3RouterAdapterContract(this.sdk, args);
|
|
417593
|
+
case "ADAPTER::DAI_USDS_EXCHANGE":
|
|
417594
|
+
return new DaiUsdsAdapterContract(this.sdk, args);
|
|
417595
|
+
case "ADAPTER::EQUALIZER_ROUTER":
|
|
417596
|
+
return new EqualizerRouterAdapterContract(this.sdk, args);
|
|
417178
417597
|
case "ADAPTER::ERC4626_VAULT":
|
|
417179
417598
|
return new ERC4626AdapterContract(this.sdk, args);
|
|
417180
|
-
case "ADAPTER::
|
|
417181
|
-
return new
|
|
417182
|
-
case "ADAPTER::CAMELOT_V3_ROUTER":
|
|
417183
|
-
return new CamelotV3AdapterContract(this.sdk, args);
|
|
417184
|
-
case "ADAPTER::YEARN_V2":
|
|
417185
|
-
return new YearnV2RouterAdapterContract(this.sdk, args);
|
|
417186
|
-
case "ADAPTER::MELLOW_LRT_VAULT":
|
|
417187
|
-
return new MellowVaultAdapterContract(this.sdk, args);
|
|
417599
|
+
case "ADAPTER::LIDO_WSTETH_V1":
|
|
417600
|
+
return new WstETHV1AdapterContract(this.sdk, args);
|
|
417188
417601
|
case "ADAPTER::MELLOW_ERC4626_VAULT":
|
|
417189
417602
|
return new MellowERC4626VaultAdapterContract(this.sdk, args);
|
|
417603
|
+
case "ADAPTER::MELLOW_LRT_VAULT":
|
|
417604
|
+
return new MellowVaultAdapterContract(this.sdk, args);
|
|
417190
417605
|
case "ADAPTER::PENDLE_ROUTER":
|
|
417191
417606
|
return new PendleRouterAdapterContract(this.sdk, args);
|
|
417192
|
-
case "ADAPTER::DAI_USDS_EXCHANGE":
|
|
417193
|
-
return new DaiUsdsAdapterContract(this.sdk, args);
|
|
417194
417607
|
case "ADAPTER::STAKING_REWARDS":
|
|
417195
417608
|
return new StakingRewardsAdapterContract(this.sdk, args);
|
|
417609
|
+
case "ADAPTER::UNISWAP_V2_ROUTER":
|
|
417610
|
+
return new UniswapV2AdapterContract(this.sdk, args);
|
|
417611
|
+
case "ADAPTER::UNISWAP_V3_ROUTER":
|
|
417612
|
+
return new UniswapV3AdapterContract(this.sdk, args);
|
|
417613
|
+
case "ADAPTER::VELODROME_V2_ROUTER":
|
|
417614
|
+
return new VelodromeV2RouterAdapterContract(this.sdk, args);
|
|
417615
|
+
case "ADAPTER::YEARN_V2":
|
|
417616
|
+
return new YearnV2RouterAdapterContract(this.sdk, args);
|
|
417196
417617
|
default: {
|
|
417197
417618
|
const err = new Error(
|
|
417198
417619
|
`Adapter type ${adapterType} not supported for adapter at ${args.baseParams.addr}`
|
|
@@ -417534,7 +417955,7 @@ function getRenderer(opts) {
|
|
|
417534
417955
|
var package_default = {
|
|
417535
417956
|
name: "@gearbox-protocol/deploy-tools",
|
|
417536
417957
|
description: "Gearbox deploy tools",
|
|
417537
|
-
version: "5.18.
|
|
417958
|
+
version: "5.18.10",
|
|
417538
417959
|
homepage: "https://gearbox.fi",
|
|
417539
417960
|
keywords: [
|
|
417540
417961
|
"gearbox"
|
|
@@ -417577,7 +417998,7 @@ var package_default = {
|
|
|
417577
417998
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
417578
417999
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
417579
418000
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
417580
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
418001
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.305",
|
|
417581
418002
|
"@gearbox-protocol/sdk-gov": "^2.36.6",
|
|
417582
418003
|
"@types/lodash-es": "^4.17.12",
|
|
417583
418004
|
"@types/node": "^22.13.10",
|