@gearbox-protocol/deploy-tools 5.13.4 → 5.13.5
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 +501 -606
- 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 abi36 = [];
|
|
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
|
+
abi36.push(parseSignature(signature, structs));
|
|
4178
4178
|
}
|
|
4179
|
-
return
|
|
4179
|
+
return abi36;
|
|
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: abi36, args = [], name } = parameters;
|
|
5897
5897
|
const isSelector = isHex(name, { strict: false });
|
|
5898
|
-
const abiItems =
|
|
5898
|
+
const abiItems = abi36.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: abi36, args, functionName } = parameters;
|
|
6029
|
+
let abiItem = abi36[0];
|
|
6030
6030
|
if (functionName) {
|
|
6031
6031
|
const item = getAbiItem({
|
|
6032
|
-
abi:
|
|
6032
|
+
abi: abi36,
|
|
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: abi36, 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 = abi36[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: abi36, 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_ = [...abi36 || [], 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: abi36, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
6909
|
+
const abiItem = getAbiItem({ abi: abi36, 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 = abi36;
|
|
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: abi36, 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: abi36, 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: abi36, args, functionName, data } = parameters;
|
|
10599
|
+
let abiItem = abi36[0];
|
|
10600
10600
|
if (functionName) {
|
|
10601
|
-
const item = getAbiItem({ abi:
|
|
10601
|
+
const item = getAbiItem({ abi: abi36, 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: abi36, args, bytecode } = parameters;
|
|
11438
11438
|
if (!args || args.length === 0)
|
|
11439
11439
|
return bytecode;
|
|
11440
|
-
const description =
|
|
11440
|
+
const description = abi36.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 abi36 = [];
|
|
21298
21298
|
if (typeof fragments === "string") {
|
|
21299
|
-
|
|
21299
|
+
abi36 = JSON.parse(fragments);
|
|
21300
21300
|
} else {
|
|
21301
|
-
|
|
21301
|
+
abi36 = fragments;
|
|
21302
21302
|
}
|
|
21303
|
-
(0, properties_1.defineReadOnly)(this, "fragments",
|
|
21303
|
+
(0, properties_1.defineReadOnly)(this, "fragments", abi36.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 abi36 = 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(abi36.map(function(j) {
|
|
21362
21362
|
return JSON.parse(j);
|
|
21363
21363
|
}));
|
|
21364
21364
|
}
|
|
21365
|
-
return
|
|
21365
|
+
return abi36;
|
|
21366
21366
|
};
|
|
21367
21367
|
Interface2.getAbiCoder = function() {
|
|
21368
21368
|
return abi_coder_1.defaultAbiCoder;
|
|
@@ -37061,14 +37061,14 @@ var require_lib29 = __commonJS({
|
|
|
37061
37061
|
if (typeof compilerOutput === "string") {
|
|
37062
37062
|
compilerOutput = JSON.parse(compilerOutput);
|
|
37063
37063
|
}
|
|
37064
|
-
var
|
|
37064
|
+
var abi36 = compilerOutput.abi;
|
|
37065
37065
|
var bytecode = null;
|
|
37066
37066
|
if (compilerOutput.bytecode) {
|
|
37067
37067
|
bytecode = compilerOutput.bytecode;
|
|
37068
37068
|
} else if (compilerOutput.evm && compilerOutput.evm.bytecode) {
|
|
37069
37069
|
bytecode = compilerOutput.evm.bytecode;
|
|
37070
37070
|
}
|
|
37071
|
-
return new this(
|
|
37071
|
+
return new this(abi36, bytecode, signer);
|
|
37072
37072
|
};
|
|
37073
37073
|
ContractFactory2.getInterface = function(contractInterface) {
|
|
37074
37074
|
return Contract.getInterface(contractInterface);
|
|
@@ -50175,7 +50175,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50175
50175
|
var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
|
|
50176
50176
|
var vars = process.config && process.config.variables || {};
|
|
50177
50177
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
50178
|
-
var
|
|
50178
|
+
var abi36 = process.versions.modules;
|
|
50179
50179
|
var runtime = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
|
|
50180
50180
|
var arch = process.env.npm_config_arch || os2.arch();
|
|
50181
50181
|
var platform = process.env.npm_config_platform || os2.platform();
|
|
@@ -50207,7 +50207,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50207
50207
|
"platform=" + platform,
|
|
50208
50208
|
"arch=" + arch,
|
|
50209
50209
|
"runtime=" + runtime,
|
|
50210
|
-
"abi=" +
|
|
50210
|
+
"abi=" + abi36,
|
|
50211
50211
|
"uv=" + uv,
|
|
50212
50212
|
armv ? "armv=" + armv : "",
|
|
50213
50213
|
"libc=" + libc,
|
|
@@ -50223,7 +50223,7 @@ var require_node_gyp_build = __commonJS({
|
|
|
50223
50223
|
if (!tuple) return;
|
|
50224
50224
|
var prebuilds = path12.join(dir2, "prebuilds", tuple.name);
|
|
50225
50225
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
50226
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
50226
|
+
var candidates = parsed.filter(matchTags(runtime, abi36));
|
|
50227
50227
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
50228
50228
|
if (winner) return path12.join(prebuilds, winner.file);
|
|
50229
50229
|
}
|
|
@@ -50288,11 +50288,11 @@ var require_node_gyp_build = __commonJS({
|
|
|
50288
50288
|
}
|
|
50289
50289
|
return tags;
|
|
50290
50290
|
}
|
|
50291
|
-
function matchTags(runtime2,
|
|
50291
|
+
function matchTags(runtime2, abi37) {
|
|
50292
50292
|
return function(tags) {
|
|
50293
50293
|
if (tags == null) return false;
|
|
50294
50294
|
if (tags.runtime && tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
50295
|
-
if (tags.abi && tags.abi !==
|
|
50295
|
+
if (tags.abi && tags.abi !== abi37 && !tags.napi) return false;
|
|
50296
50296
|
if (tags.uv && tags.uv !== uv) return false;
|
|
50297
50297
|
if (tags.armv && tags.armv !== armv) return false;
|
|
50298
50298
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -113310,17 +113310,17 @@ var require_interface2 = __commonJS({
|
|
|
113310
113310
|
* Create a new Interface for the %%fragments%%.
|
|
113311
113311
|
*/
|
|
113312
113312
|
constructor(fragments) {
|
|
113313
|
-
let
|
|
113313
|
+
let abi36 = [];
|
|
113314
113314
|
if (typeof fragments === "string") {
|
|
113315
|
-
|
|
113315
|
+
abi36 = JSON.parse(fragments);
|
|
113316
113316
|
} else {
|
|
113317
|
-
|
|
113317
|
+
abi36 = fragments;
|
|
113318
113318
|
}
|
|
113319
113319
|
this.#functions = /* @__PURE__ */ new Map();
|
|
113320
113320
|
this.#errors = /* @__PURE__ */ new Map();
|
|
113321
113321
|
this.#events = /* @__PURE__ */ new Map();
|
|
113322
113322
|
const frags = [];
|
|
113323
|
-
for (const a of
|
|
113323
|
+
for (const a of abi36) {
|
|
113324
113324
|
try {
|
|
113325
113325
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
113326
113326
|
} catch (error) {
|
|
@@ -113384,16 +113384,16 @@ var require_interface2 = __commonJS({
|
|
|
113384
113384
|
*/
|
|
113385
113385
|
format(minimal) {
|
|
113386
113386
|
const format = minimal ? "minimal" : "full";
|
|
113387
|
-
const
|
|
113388
|
-
return
|
|
113387
|
+
const abi36 = this.fragments.map((f) => f.format(format));
|
|
113388
|
+
return abi36;
|
|
113389
113389
|
}
|
|
113390
113390
|
/**
|
|
113391
113391
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
113392
113392
|
* returns.
|
|
113393
113393
|
*/
|
|
113394
113394
|
formatJson() {
|
|
113395
|
-
const
|
|
113396
|
-
return JSON.stringify(
|
|
113395
|
+
const abi36 = this.fragments.map((f) => f.format("json"));
|
|
113396
|
+
return JSON.stringify(abi36.map((j) => JSON.parse(j)));
|
|
113397
113397
|
}
|
|
113398
113398
|
/**
|
|
113399
113399
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -116161,12 +116161,12 @@ var require_contract = __commonJS({
|
|
|
116161
116161
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
116162
116162
|
* of.
|
|
116163
116163
|
*/
|
|
116164
|
-
constructor(target,
|
|
116164
|
+
constructor(target, abi36, runner, _deployTx) {
|
|
116165
116165
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
116166
116166
|
if (runner == null) {
|
|
116167
116167
|
runner = null;
|
|
116168
116168
|
}
|
|
116169
|
-
const iface = index_js_1.Interface.from(
|
|
116169
|
+
const iface = index_js_1.Interface.from(abi36);
|
|
116170
116170
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
116171
116171
|
Object.defineProperty(this, internal, { value: {} });
|
|
116172
116172
|
let addrPromise;
|
|
@@ -116529,10 +116529,10 @@ var require_contract = __commonJS({
|
|
|
116529
116529
|
/**
|
|
116530
116530
|
* Create a new Class for the %%abi%%.
|
|
116531
116531
|
*/
|
|
116532
|
-
static buildClass(
|
|
116532
|
+
static buildClass(abi36) {
|
|
116533
116533
|
class CustomContract extends _BaseContract {
|
|
116534
116534
|
constructor(address, runner = null) {
|
|
116535
|
-
super(address,
|
|
116535
|
+
super(address, abi36, runner);
|
|
116536
116536
|
}
|
|
116537
116537
|
}
|
|
116538
116538
|
return CustomContract;
|
|
@@ -116540,11 +116540,11 @@ var require_contract = __commonJS({
|
|
|
116540
116540
|
/**
|
|
116541
116541
|
* Create a new BaseContract with a specified Interface.
|
|
116542
116542
|
*/
|
|
116543
|
-
static from(target,
|
|
116543
|
+
static from(target, abi36, runner) {
|
|
116544
116544
|
if (runner == null) {
|
|
116545
116545
|
runner = null;
|
|
116546
116546
|
}
|
|
116547
|
-
const contract = new this(target,
|
|
116547
|
+
const contract = new this(target, abi36, runner);
|
|
116548
116548
|
return contract;
|
|
116549
116549
|
}
|
|
116550
116550
|
};
|
|
@@ -116588,8 +116588,8 @@ var require_factory = __commonJS({
|
|
|
116588
116588
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
116589
116589
|
* standard Solidity JSON output.
|
|
116590
116590
|
*/
|
|
116591
|
-
constructor(
|
|
116592
|
-
const iface = index_js_1.Interface.from(
|
|
116591
|
+
constructor(abi36, bytecode, runner) {
|
|
116592
|
+
const iface = index_js_1.Interface.from(abi36);
|
|
116593
116593
|
if (bytecode instanceof Uint8Array) {
|
|
116594
116594
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
116595
116595
|
} else {
|
|
@@ -116659,14 +116659,14 @@ var require_factory = __commonJS({
|
|
|
116659
116659
|
if (typeof output === "string") {
|
|
116660
116660
|
output = JSON.parse(output);
|
|
116661
116661
|
}
|
|
116662
|
-
const
|
|
116662
|
+
const abi36 = output.abi;
|
|
116663
116663
|
let bytecode = "";
|
|
116664
116664
|
if (output.bytecode) {
|
|
116665
116665
|
bytecode = output.bytecode;
|
|
116666
116666
|
} else if (output.evm && output.evm.bytecode) {
|
|
116667
116667
|
bytecode = output.evm.bytecode;
|
|
116668
116668
|
}
|
|
116669
|
-
return new this(
|
|
116669
|
+
return new this(abi36, bytecode, runner);
|
|
116670
116670
|
}
|
|
116671
116671
|
};
|
|
116672
116672
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -121594,8 +121594,8 @@ var require_provider_etherscan = __commonJS({
|
|
|
121594
121594
|
action: "getabi",
|
|
121595
121595
|
address
|
|
121596
121596
|
});
|
|
121597
|
-
const
|
|
121598
|
-
return new index_js_2.Contract(address,
|
|
121597
|
+
const abi36 = JSON.parse(resp);
|
|
121598
|
+
return new index_js_2.Contract(address, abi36, this);
|
|
121599
121599
|
} catch (error) {
|
|
121600
121600
|
return null;
|
|
121601
121601
|
}
|
|
@@ -146964,9 +146964,9 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
146964
146964
|
var vars = process.config && process.config.variables || {};
|
|
146965
146965
|
var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
|
|
146966
146966
|
var versions = process.versions;
|
|
146967
|
-
var
|
|
146967
|
+
var abi36 = versions.modules;
|
|
146968
146968
|
if (versions.deno || process.isBun) {
|
|
146969
|
-
|
|
146969
|
+
abi36 = "unsupported";
|
|
146970
146970
|
}
|
|
146971
146971
|
var runtime = isElectron() ? "electron" : "node";
|
|
146972
146972
|
var arch = process.arch;
|
|
@@ -147013,7 +147013,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
147013
147013
|
"platform=" + platform,
|
|
147014
147014
|
"arch=" + arch,
|
|
147015
147015
|
"runtime=" + runtime,
|
|
147016
|
-
"abi=" +
|
|
147016
|
+
"abi=" + abi36,
|
|
147017
147017
|
"uv=" + uv,
|
|
147018
147018
|
armv ? "armv=" + armv : "",
|
|
147019
147019
|
"libc=" + libc,
|
|
@@ -147031,7 +147031,7 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
147031
147031
|
}
|
|
147032
147032
|
function resolveFile(prebuilds) {
|
|
147033
147033
|
var parsed = readdirSync(prebuilds).map(parseTags);
|
|
147034
|
-
var candidates = parsed.filter(matchTags(runtime,
|
|
147034
|
+
var candidates = parsed.filter(matchTags(runtime, abi36));
|
|
147035
147035
|
var winner = candidates.sort(compareTags(runtime))[0];
|
|
147036
147036
|
if (winner) return path12.join(prebuilds, winner.file);
|
|
147037
147037
|
}
|
|
@@ -147096,11 +147096,11 @@ var require_node_gyp_build_optional_packages = __commonJS({
|
|
|
147096
147096
|
}
|
|
147097
147097
|
return tags;
|
|
147098
147098
|
}
|
|
147099
|
-
function matchTags(runtime2,
|
|
147099
|
+
function matchTags(runtime2, abi37) {
|
|
147100
147100
|
return function(tags) {
|
|
147101
147101
|
if (tags == null) return false;
|
|
147102
147102
|
if (tags.runtime !== runtime2 && !runtimeAgnostic(tags)) return false;
|
|
147103
|
-
if (tags.abi !==
|
|
147103
|
+
if (tags.abi !== abi37 && !tags.napi) return false;
|
|
147104
147104
|
if (tags.uv && tags.uv !== uv) return false;
|
|
147105
147105
|
if (tags.armv && tags.armv !== armv) return false;
|
|
147106
147106
|
if (tags.libc && tags.libc !== libc) return false;
|
|
@@ -153353,11 +153353,11 @@ var require_formatAbi = __commonJS({
|
|
|
153353
153353
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
153354
153354
|
exports2.formatAbi = formatAbi;
|
|
153355
153355
|
var formatAbiItem_js_1 = require_formatAbiItem();
|
|
153356
|
-
function formatAbi(
|
|
153356
|
+
function formatAbi(abi36) {
|
|
153357
153357
|
const signatures = [];
|
|
153358
|
-
const length =
|
|
153358
|
+
const length = abi36.length;
|
|
153359
153359
|
for (let i = 0; i < length; i++) {
|
|
153360
|
-
const abiItem =
|
|
153360
|
+
const abiItem = abi36[i];
|
|
153361
153361
|
const signature = (0, formatAbiItem_js_1.formatAbiItem)(abiItem);
|
|
153362
153362
|
signatures.push(signature);
|
|
153363
153363
|
}
|
|
@@ -154120,15 +154120,15 @@ var require_parseAbi = __commonJS({
|
|
|
154120
154120
|
var utils_js_1 = require_utils14();
|
|
154121
154121
|
function parseAbi2(signatures) {
|
|
154122
154122
|
const structs = (0, structs_js_1.parseStructs)(signatures);
|
|
154123
|
-
const
|
|
154123
|
+
const abi36 = [];
|
|
154124
154124
|
const length = signatures.length;
|
|
154125
154125
|
for (let i = 0; i < length; i++) {
|
|
154126
154126
|
const signature = signatures[i];
|
|
154127
154127
|
if ((0, signatures_js_1.isStructSignature)(signature))
|
|
154128
154128
|
continue;
|
|
154129
|
-
|
|
154129
|
+
abi36.push((0, utils_js_1.parseSignature)(signature, structs));
|
|
154130
154130
|
}
|
|
154131
|
-
return
|
|
154131
|
+
return abi36;
|
|
154132
154132
|
}
|
|
154133
154133
|
}
|
|
154134
154134
|
});
|
|
@@ -163920,9 +163920,9 @@ var require_getAbiItem = __commonJS({
|
|
|
163920
163920
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
163921
163921
|
var toFunctionSelector_js_1 = require_toFunctionSelector();
|
|
163922
163922
|
function getAbiItem2(parameters) {
|
|
163923
|
-
const { abi:
|
|
163923
|
+
const { abi: abi36, args = [], name } = parameters;
|
|
163924
163924
|
const isSelector = (0, isHex_js_1.isHex)(name, { strict: false });
|
|
163925
|
-
const abiItems =
|
|
163925
|
+
const abiItems = abi36.filter((abiItem) => {
|
|
163926
163926
|
if (isSelector) {
|
|
163927
163927
|
if (abiItem.type === "function")
|
|
163928
163928
|
return (0, toFunctionSelector_js_1.toFunctionSelector)(abiItem) === name;
|
|
@@ -164047,10 +164047,10 @@ var require_encodeEventTopics = __commonJS({
|
|
|
164047
164047
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
164048
164048
|
var docsPath6 = "/docs/contract/encodeEventTopics";
|
|
164049
164049
|
function encodeEventTopics2(parameters) {
|
|
164050
|
-
const { abi:
|
|
164051
|
-
let abiItem =
|
|
164050
|
+
const { abi: abi36, eventName, args } = parameters;
|
|
164051
|
+
let abiItem = abi36[0];
|
|
164052
164052
|
if (eventName) {
|
|
164053
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
164053
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, name: eventName });
|
|
164054
164054
|
if (!item)
|
|
164055
164055
|
throw new abi_js_1.AbiEventNotFoundError(eventName, { docsPath: docsPath6 });
|
|
164056
164056
|
abiItem = item;
|
|
@@ -164111,12 +164111,12 @@ var require_createContractEventFilter = __commonJS({
|
|
|
164111
164111
|
var toHex_js_1 = require_toHex();
|
|
164112
164112
|
var createFilterRequestScope_js_1 = require_createFilterRequestScope();
|
|
164113
164113
|
async function createContractEventFilter2(client, parameters) {
|
|
164114
|
-
const { address, abi:
|
|
164114
|
+
const { address, abi: abi36, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
164115
164115
|
const getRequest = (0, createFilterRequestScope_js_1.createFilterRequestScope)(client, {
|
|
164116
164116
|
method: "eth_newFilter"
|
|
164117
164117
|
});
|
|
164118
164118
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
164119
|
-
abi:
|
|
164119
|
+
abi: abi36,
|
|
164120
164120
|
args,
|
|
164121
164121
|
eventName
|
|
164122
164122
|
}) : void 0;
|
|
@@ -164132,7 +164132,7 @@ var require_createContractEventFilter = __commonJS({
|
|
|
164132
164132
|
]
|
|
164133
164133
|
});
|
|
164134
164134
|
return {
|
|
164135
|
-
abi:
|
|
164135
|
+
abi: abi36,
|
|
164136
164136
|
args,
|
|
164137
164137
|
eventName,
|
|
164138
164138
|
id,
|
|
@@ -164170,11 +164170,11 @@ var require_prepareEncodeFunctionData = __commonJS({
|
|
|
164170
164170
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
164171
164171
|
var docsPath6 = "/docs/contract/encodeFunctionData";
|
|
164172
164172
|
function prepareEncodeFunctionData2(parameters) {
|
|
164173
|
-
const { abi:
|
|
164174
|
-
let abiItem =
|
|
164173
|
+
const { abi: abi36, args, functionName } = parameters;
|
|
164174
|
+
let abiItem = abi36[0];
|
|
164175
164175
|
if (functionName) {
|
|
164176
164176
|
const item = (0, getAbiItem_js_1.getAbiItem)({
|
|
164177
|
-
abi:
|
|
164177
|
+
abi: abi36,
|
|
164178
164178
|
args,
|
|
164179
164179
|
name: functionName
|
|
164180
164180
|
});
|
|
@@ -164203,12 +164203,12 @@ var require_encodeFunctionData = __commonJS({
|
|
|
164203
164203
|
var prepareEncodeFunctionData_js_1 = require_prepareEncodeFunctionData();
|
|
164204
164204
|
function encodeFunctionData2(parameters) {
|
|
164205
164205
|
const { args } = parameters;
|
|
164206
|
-
const { abi:
|
|
164206
|
+
const { abi: abi36, functionName } = (() => {
|
|
164207
164207
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
164208
164208
|
return parameters;
|
|
164209
164209
|
return (0, prepareEncodeFunctionData_js_1.prepareEncodeFunctionData)(parameters);
|
|
164210
164210
|
})();
|
|
164211
|
-
const abiItem =
|
|
164211
|
+
const abiItem = abi36[0];
|
|
164212
164212
|
const signature = functionName;
|
|
164213
164213
|
const data = "inputs" in abiItem && abiItem.inputs ? (0, encodeAbiParameters_js_1.encodeAbiParameters)(abiItem.inputs, args ?? []) : void 0;
|
|
164214
164214
|
return (0, concat_js_1.concatHex)([signature, data ?? "0x"]);
|
|
@@ -164740,11 +164740,11 @@ var require_decodeErrorResult = __commonJS({
|
|
|
164740
164740
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
164741
164741
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
164742
164742
|
function decodeErrorResult2(parameters) {
|
|
164743
|
-
const { abi:
|
|
164743
|
+
const { abi: abi36, data } = parameters;
|
|
164744
164744
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
164745
164745
|
if (signature === "0x")
|
|
164746
164746
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
164747
|
-
const abi_ = [...
|
|
164747
|
+
const abi_ = [...abi36 || [], solidity_js_1.solidityError, solidity_js_1.solidityPanic];
|
|
164748
164748
|
const abiItem = abi_.find((x) => x.type === "error" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
164749
164749
|
if (!abiItem)
|
|
164750
164750
|
throw new abi_js_1.AbiErrorSignatureNotFoundError(signature, {
|
|
@@ -165166,8 +165166,8 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
165166
165166
|
};
|
|
165167
165167
|
exports2.CallExecutionError = CallExecutionError2;
|
|
165168
165168
|
var ContractFunctionExecutionError2 = class extends base_js_1.BaseError {
|
|
165169
|
-
constructor(cause, { abi:
|
|
165170
|
-
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
165169
|
+
constructor(cause, { abi: abi36, args, contractAddress, docsPath: docsPath6, functionName, sender }) {
|
|
165170
|
+
const abiItem = (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, args, name: functionName });
|
|
165171
165171
|
const formattedArgs = abiItem ? (0, formatAbiItemWithArgs_js_1.formatAbiItemWithArgs)({
|
|
165172
165172
|
abiItem,
|
|
165173
165173
|
args,
|
|
@@ -165233,7 +165233,7 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
165233
165233
|
writable: true,
|
|
165234
165234
|
value: void 0
|
|
165235
165235
|
});
|
|
165236
|
-
this.abi =
|
|
165236
|
+
this.abi = abi36;
|
|
165237
165237
|
this.args = args;
|
|
165238
165238
|
this.cause = cause;
|
|
165239
165239
|
this.contractAddress = contractAddress;
|
|
@@ -165243,14 +165243,14 @@ ${(0, stateOverride_js_1.prettyStateOverride)(stateOverride)}`;
|
|
|
165243
165243
|
};
|
|
165244
165244
|
exports2.ContractFunctionExecutionError = ContractFunctionExecutionError2;
|
|
165245
165245
|
var ContractFunctionRevertedError2 = class extends base_js_1.BaseError {
|
|
165246
|
-
constructor({ abi:
|
|
165246
|
+
constructor({ abi: abi36, data, functionName, message }) {
|
|
165247
165247
|
let cause;
|
|
165248
165248
|
let decodedData = void 0;
|
|
165249
165249
|
let metaMessages;
|
|
165250
165250
|
let reason;
|
|
165251
165251
|
if (data && data !== "0x") {
|
|
165252
165252
|
try {
|
|
165253
|
-
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi:
|
|
165253
|
+
decodedData = (0, decodeErrorResult_js_1.decodeErrorResult)({ abi: abi36, data });
|
|
165254
165254
|
const { abiItem, errorName, args: errorArgs } = decodedData;
|
|
165255
165255
|
if (errorName === "Error") {
|
|
165256
165256
|
reason = errorArgs[0];
|
|
@@ -165850,7 +165850,7 @@ var require_getContractError = __commonJS({
|
|
|
165850
165850
|
var request_js_1 = require_request();
|
|
165851
165851
|
var rpc_js_1 = require_rpc();
|
|
165852
165852
|
var EXECUTION_REVERTED_ERROR_CODE2 = 3;
|
|
165853
|
-
function getContractError2(err, { abi:
|
|
165853
|
+
function getContractError2(err, { abi: abi36, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
165854
165854
|
const error = err instanceof contract_js_1.RawContractError ? err : err instanceof base_js_1.BaseError ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
165855
165855
|
const { code, data, details, message, shortMessage } = error;
|
|
165856
165856
|
const cause = (() => {
|
|
@@ -165858,7 +165858,7 @@ var require_getContractError = __commonJS({
|
|
|
165858
165858
|
return new contract_js_1.ContractFunctionZeroDataError({ functionName });
|
|
165859
165859
|
if ([EXECUTION_REVERTED_ERROR_CODE2, rpc_js_1.InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
165860
165860
|
return new contract_js_1.ContractFunctionRevertedError({
|
|
165861
|
-
abi:
|
|
165861
|
+
abi: abi36,
|
|
165862
165862
|
data: typeof data === "object" ? data.data : data,
|
|
165863
165863
|
functionName,
|
|
165864
165864
|
message: error instanceof request_js_1.RpcRequestError ? details : shortMessage ?? message
|
|
@@ -165867,7 +165867,7 @@ var require_getContractError = __commonJS({
|
|
|
165867
165867
|
return err;
|
|
165868
165868
|
})();
|
|
165869
165869
|
return new contract_js_1.ContractFunctionExecutionError(cause, {
|
|
165870
|
-
abi:
|
|
165870
|
+
abi: abi36,
|
|
165871
165871
|
args,
|
|
165872
165872
|
contractAddress: address,
|
|
165873
165873
|
docsPath: docsPath6,
|
|
@@ -170334,9 +170334,9 @@ var require_estimateContractGas = __commonJS({
|
|
|
170334
170334
|
var getAction_js_1 = require_getAction();
|
|
170335
170335
|
var estimateGas_js_1 = require_estimateGas2();
|
|
170336
170336
|
async function estimateContractGas2(client, parameters) {
|
|
170337
|
-
const { abi:
|
|
170337
|
+
const { abi: abi36, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
170338
170338
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
170339
|
-
abi:
|
|
170339
|
+
abi: abi36,
|
|
170340
170340
|
args,
|
|
170341
170341
|
functionName
|
|
170342
170342
|
});
|
|
@@ -170350,7 +170350,7 @@ var require_estimateContractGas = __commonJS({
|
|
|
170350
170350
|
} catch (error) {
|
|
170351
170351
|
const account = request.account ? (0, parseAccount_js_1.parseAccount)(request.account) : void 0;
|
|
170352
170352
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
170353
|
-
abi:
|
|
170353
|
+
abi: abi36,
|
|
170354
170354
|
address,
|
|
170355
170355
|
args,
|
|
170356
170356
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -170394,15 +170394,15 @@ var require_decodeEventLog = __commonJS({
|
|
|
170394
170394
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
170395
170395
|
var docsPath6 = "/docs/contract/decodeEventLog";
|
|
170396
170396
|
function decodeEventLog2(parameters) {
|
|
170397
|
-
const { abi:
|
|
170397
|
+
const { abi: abi36, data, strict: strict_, topics } = parameters;
|
|
170398
170398
|
const strict = strict_ ?? true;
|
|
170399
170399
|
const [signature, ...argTopics] = topics;
|
|
170400
170400
|
if (!signature)
|
|
170401
170401
|
throw new abi_js_1.AbiEventSignatureEmptyTopicsError({ docsPath: docsPath6 });
|
|
170402
170402
|
const abiItem = (() => {
|
|
170403
|
-
if (
|
|
170404
|
-
return
|
|
170405
|
-
return
|
|
170403
|
+
if (abi36.length === 1)
|
|
170404
|
+
return abi36[0];
|
|
170405
|
+
return abi36.find((x) => x.type === "event" && signature === (0, toEventSelector_js_1.toEventSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
170406
170406
|
})();
|
|
170407
170407
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
170408
170408
|
throw new abi_js_1.AbiEventSignatureNotFoundError(signature, { docsPath: docsPath6 });
|
|
@@ -170482,7 +170482,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
170482
170482
|
var toEventSelector_js_1 = require_toEventSelector();
|
|
170483
170483
|
var decodeEventLog_js_1 = require_decodeEventLog();
|
|
170484
170484
|
function parseEventLogs2(parameters) {
|
|
170485
|
-
const { abi:
|
|
170485
|
+
const { abi: abi36, args, logs, strict = true } = parameters;
|
|
170486
170486
|
const eventName = (() => {
|
|
170487
170487
|
if (!parameters.eventName)
|
|
170488
170488
|
return void 0;
|
|
@@ -170492,7 +170492,7 @@ var require_parseEventLogs = __commonJS({
|
|
|
170492
170492
|
})();
|
|
170493
170493
|
return logs.map((log2) => {
|
|
170494
170494
|
try {
|
|
170495
|
-
const abiItem =
|
|
170495
|
+
const abiItem = abi36.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === (0, toEventSelector_js_1.toEventSelector)(abiItem2));
|
|
170496
170496
|
if (!abiItem)
|
|
170497
170497
|
return null;
|
|
170498
170498
|
const event = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
@@ -170653,9 +170653,9 @@ var require_getContractEvents = __commonJS({
|
|
|
170653
170653
|
var getAction_js_1 = require_getAction();
|
|
170654
170654
|
var getLogs_js_1 = require_getLogs();
|
|
170655
170655
|
async function getContractEvents2(client, parameters) {
|
|
170656
|
-
const { abi:
|
|
170657
|
-
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
170658
|
-
const events = !event ?
|
|
170656
|
+
const { abi: abi36, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
170657
|
+
const event = eventName ? (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, name: eventName }) : void 0;
|
|
170658
|
+
const events = !event ? abi36.filter((x) => x.type === "event") : void 0;
|
|
170659
170659
|
return (0, getAction_js_1.getAction)(client, getLogs_js_1.getLogs, "getLogs")({
|
|
170660
170660
|
address,
|
|
170661
170661
|
args,
|
|
@@ -170681,10 +170681,10 @@ var require_decodeFunctionResult = __commonJS({
|
|
|
170681
170681
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
170682
170682
|
var docsPath6 = "/docs/contract/decodeFunctionResult";
|
|
170683
170683
|
function decodeFunctionResult2(parameters) {
|
|
170684
|
-
const { abi:
|
|
170685
|
-
let abiItem =
|
|
170684
|
+
const { abi: abi36, args, functionName, data } = parameters;
|
|
170685
|
+
let abiItem = abi36[0];
|
|
170686
170686
|
if (functionName) {
|
|
170687
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
170687
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, args, name: functionName });
|
|
170688
170688
|
if (!item)
|
|
170689
170689
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
170690
170690
|
abiItem = item;
|
|
@@ -172239,10 +172239,10 @@ var require_encodeDeployData = __commonJS({
|
|
|
172239
172239
|
var encodeAbiParameters_js_1 = require_encodeAbiParameters();
|
|
172240
172240
|
var docsPath6 = "/docs/contract/encodeDeployData";
|
|
172241
172241
|
function encodeDeployData2(parameters) {
|
|
172242
|
-
const { abi:
|
|
172242
|
+
const { abi: abi36, args, bytecode } = parameters;
|
|
172243
172243
|
if (!args || args.length === 0)
|
|
172244
172244
|
return bytecode;
|
|
172245
|
-
const description =
|
|
172245
|
+
const description = abi36.find((x) => "type" in x && x.type === "constructor");
|
|
172246
172246
|
if (!description)
|
|
172247
172247
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
172248
172248
|
if (!("inputs" in description))
|
|
@@ -172781,9 +172781,9 @@ var require_readContract = __commonJS({
|
|
|
172781
172781
|
var getAction_js_1 = require_getAction();
|
|
172782
172782
|
var call_js_1 = require_call();
|
|
172783
172783
|
async function readContract2(client, parameters) {
|
|
172784
|
-
const { abi:
|
|
172784
|
+
const { abi: abi36, address, args, functionName, ...rest2 } = parameters;
|
|
172785
172785
|
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
172786
|
-
abi:
|
|
172786
|
+
abi: abi36,
|
|
172787
172787
|
args,
|
|
172788
172788
|
functionName
|
|
172789
172789
|
});
|
|
@@ -172794,14 +172794,14 @@ var require_readContract = __commonJS({
|
|
|
172794
172794
|
to: address
|
|
172795
172795
|
});
|
|
172796
172796
|
return (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
172797
|
-
abi:
|
|
172797
|
+
abi: abi36,
|
|
172798
172798
|
args,
|
|
172799
172799
|
functionName,
|
|
172800
172800
|
data: data || "0x"
|
|
172801
172801
|
});
|
|
172802
172802
|
} catch (error) {
|
|
172803
172803
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
172804
|
-
abi:
|
|
172804
|
+
abi: abi36,
|
|
172805
172805
|
address,
|
|
172806
172806
|
args,
|
|
172807
172807
|
docsPath: "/docs/contract/readContract",
|
|
@@ -172825,9 +172825,9 @@ var require_simulateContract = __commonJS({
|
|
|
172825
172825
|
var getAction_js_1 = require_getAction();
|
|
172826
172826
|
var call_js_1 = require_call();
|
|
172827
172827
|
async function simulateContract2(client, parameters) {
|
|
172828
|
-
const { abi:
|
|
172828
|
+
const { abi: abi36, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
172829
172829
|
const account = callRequest.account ? (0, parseAccount_js_1.parseAccount)(callRequest.account) : client.account;
|
|
172830
|
-
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
172830
|
+
const calldata = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi36, args, functionName });
|
|
172831
172831
|
try {
|
|
172832
172832
|
const { data } = await (0, getAction_js_1.getAction)(client, call_js_1.call, "call")({
|
|
172833
172833
|
batch: false,
|
|
@@ -172837,12 +172837,12 @@ var require_simulateContract = __commonJS({
|
|
|
172837
172837
|
account
|
|
172838
172838
|
});
|
|
172839
172839
|
const result = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
172840
|
-
abi:
|
|
172840
|
+
abi: abi36,
|
|
172841
172841
|
args,
|
|
172842
172842
|
functionName,
|
|
172843
172843
|
data: data || "0x"
|
|
172844
172844
|
});
|
|
172845
|
-
const minimizedAbi =
|
|
172845
|
+
const minimizedAbi = abi36.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
172846
172846
|
return {
|
|
172847
172847
|
result,
|
|
172848
172848
|
request: {
|
|
@@ -172857,7 +172857,7 @@ var require_simulateContract = __commonJS({
|
|
|
172857
172857
|
};
|
|
172858
172858
|
} catch (error) {
|
|
172859
172859
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
172860
|
-
abi:
|
|
172860
|
+
abi: abi36,
|
|
172861
172861
|
address,
|
|
172862
172862
|
args,
|
|
172863
172863
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -173099,7 +173099,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
173099
173099
|
var getFilterChanges_js_1 = require_getFilterChanges();
|
|
173100
173100
|
var uninstallFilter_js_1 = require_uninstallFilter();
|
|
173101
173101
|
function watchContractEvent2(client, parameters) {
|
|
173102
|
-
const { abi:
|
|
173102
|
+
const { abi: abi36, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
173103
173103
|
const enablePolling = (() => {
|
|
173104
173104
|
if (typeof poll_ !== "undefined")
|
|
173105
173105
|
return poll_;
|
|
@@ -173134,7 +173134,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
173134
173134
|
if (!initialized) {
|
|
173135
173135
|
try {
|
|
173136
173136
|
filter = await (0, getAction_js_1.getAction)(client, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
173137
|
-
abi:
|
|
173137
|
+
abi: abi36,
|
|
173138
173138
|
address,
|
|
173139
173139
|
args,
|
|
173140
173140
|
eventName,
|
|
@@ -173154,7 +173154,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
173154
173154
|
const blockNumber = await (0, getAction_js_1.getAction)(client, getBlockNumber_js_1.getBlockNumber, "getBlockNumber")({});
|
|
173155
173155
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
173156
173156
|
logs = await (0, getAction_js_1.getAction)(client, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
173157
|
-
abi:
|
|
173157
|
+
abi: abi36,
|
|
173158
173158
|
address,
|
|
173159
173159
|
args,
|
|
173160
173160
|
eventName,
|
|
@@ -173218,7 +173218,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
173218
173218
|
return client.transport;
|
|
173219
173219
|
})();
|
|
173220
173220
|
const topics = eventName ? (0, encodeEventTopics_js_1.encodeEventTopics)({
|
|
173221
|
-
abi:
|
|
173221
|
+
abi: abi36,
|
|
173222
173222
|
eventName,
|
|
173223
173223
|
args
|
|
173224
173224
|
}) : [];
|
|
@@ -173230,7 +173230,7 @@ var require_watchContractEvent = __commonJS({
|
|
|
173230
173230
|
const log2 = data.result;
|
|
173231
173231
|
try {
|
|
173232
173232
|
const { eventName: eventName2, args: args2 } = (0, decodeEventLog_js_1.decodeEventLog)({
|
|
173233
|
-
abi:
|
|
173233
|
+
abi: abi36,
|
|
173234
173234
|
data: log2.data,
|
|
173235
173235
|
topics: log2.topics,
|
|
173236
173236
|
strict: strict_
|
|
@@ -173528,14 +173528,14 @@ var require_writeContract = __commonJS({
|
|
|
173528
173528
|
var getAction_js_1 = require_getAction();
|
|
173529
173529
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
173530
173530
|
async function writeContract2(client, parameters) {
|
|
173531
|
-
const { abi:
|
|
173531
|
+
const { abi: abi36, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
173532
173532
|
if (typeof account_ === "undefined")
|
|
173533
173533
|
throw new account_js_1.AccountNotFoundError({
|
|
173534
173534
|
docsPath: "/docs/contract/writeContract"
|
|
173535
173535
|
});
|
|
173536
173536
|
const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : null;
|
|
173537
173537
|
const data = (0, encodeFunctionData_js_1.encodeFunctionData)({
|
|
173538
|
-
abi:
|
|
173538
|
+
abi: abi36,
|
|
173539
173539
|
args,
|
|
173540
173540
|
functionName
|
|
173541
173541
|
});
|
|
@@ -173548,7 +173548,7 @@ var require_writeContract = __commonJS({
|
|
|
173548
173548
|
});
|
|
173549
173549
|
} catch (error) {
|
|
173550
173550
|
throw (0, getContractError_js_1.getContractError)(error, {
|
|
173551
|
-
abi:
|
|
173551
|
+
abi: abi36,
|
|
173552
173552
|
address,
|
|
173553
173553
|
args,
|
|
173554
173554
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -173576,7 +173576,7 @@ var require_getContract = __commonJS({
|
|
|
173576
173576
|
var simulateContract_js_1 = require_simulateContract();
|
|
173577
173577
|
var watchContractEvent_js_1 = require_watchContractEvent();
|
|
173578
173578
|
var writeContract_js_1 = require_writeContract();
|
|
173579
|
-
function getContract2({ abi:
|
|
173579
|
+
function getContract2({ abi: abi36, address, client: client_ }) {
|
|
173580
173580
|
const client = client_;
|
|
173581
173581
|
const [publicClient, walletClient] = (() => {
|
|
173582
173582
|
if (!client)
|
|
@@ -173595,7 +173595,7 @@ var require_getContract = __commonJS({
|
|
|
173595
173595
|
let hasReadFunction = false;
|
|
173596
173596
|
let hasWriteFunction = false;
|
|
173597
173597
|
let hasEvent = false;
|
|
173598
|
-
for (const item of
|
|
173598
|
+
for (const item of abi36) {
|
|
173599
173599
|
if (item.type === "function")
|
|
173600
173600
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
173601
173601
|
hasReadFunction = true;
|
|
@@ -173613,7 +173613,7 @@ var require_getContract = __commonJS({
|
|
|
173613
173613
|
return (...parameters) => {
|
|
173614
173614
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173615
173615
|
return (0, getAction_js_1.getAction)(publicClient, readContract_js_1.readContract, "readContract")({
|
|
173616
|
-
abi:
|
|
173616
|
+
abi: abi36,
|
|
173617
173617
|
address,
|
|
173618
173618
|
functionName,
|
|
173619
173619
|
args,
|
|
@@ -173628,7 +173628,7 @@ var require_getContract = __commonJS({
|
|
|
173628
173628
|
return (...parameters) => {
|
|
173629
173629
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173630
173630
|
return (0, getAction_js_1.getAction)(publicClient, simulateContract_js_1.simulateContract, "simulateContract")({
|
|
173631
|
-
abi:
|
|
173631
|
+
abi: abi36,
|
|
173632
173632
|
address,
|
|
173633
173633
|
functionName,
|
|
173634
173634
|
args,
|
|
@@ -173641,10 +173641,10 @@ var require_getContract = __commonJS({
|
|
|
173641
173641
|
contract.createEventFilter = new Proxy({}, {
|
|
173642
173642
|
get(_, eventName) {
|
|
173643
173643
|
return (...parameters) => {
|
|
173644
|
-
const abiEvent =
|
|
173644
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
173645
173645
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173646
173646
|
return (0, getAction_js_1.getAction)(publicClient, createContractEventFilter_js_1.createContractEventFilter, "createContractEventFilter")({
|
|
173647
|
-
abi:
|
|
173647
|
+
abi: abi36,
|
|
173648
173648
|
address,
|
|
173649
173649
|
eventName,
|
|
173650
173650
|
args,
|
|
@@ -173656,10 +173656,10 @@ var require_getContract = __commonJS({
|
|
|
173656
173656
|
contract.getEvents = new Proxy({}, {
|
|
173657
173657
|
get(_, eventName) {
|
|
173658
173658
|
return (...parameters) => {
|
|
173659
|
-
const abiEvent =
|
|
173659
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
173660
173660
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173661
173661
|
return (0, getAction_js_1.getAction)(publicClient, getContractEvents_js_1.getContractEvents, "getContractEvents")({
|
|
173662
|
-
abi:
|
|
173662
|
+
abi: abi36,
|
|
173663
173663
|
address,
|
|
173664
173664
|
eventName,
|
|
173665
173665
|
args,
|
|
@@ -173671,10 +173671,10 @@ var require_getContract = __commonJS({
|
|
|
173671
173671
|
contract.watchEvent = new Proxy({}, {
|
|
173672
173672
|
get(_, eventName) {
|
|
173673
173673
|
return (...parameters) => {
|
|
173674
|
-
const abiEvent =
|
|
173674
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
173675
173675
|
const { args, options } = getEventParameters2(parameters, abiEvent);
|
|
173676
173676
|
return (0, getAction_js_1.getAction)(publicClient, watchContractEvent_js_1.watchContractEvent, "watchContractEvent")({
|
|
173677
|
-
abi:
|
|
173677
|
+
abi: abi36,
|
|
173678
173678
|
address,
|
|
173679
173679
|
eventName,
|
|
173680
173680
|
args,
|
|
@@ -173692,7 +173692,7 @@ var require_getContract = __commonJS({
|
|
|
173692
173692
|
return (...parameters) => {
|
|
173693
173693
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173694
173694
|
return (0, getAction_js_1.getAction)(walletClient, writeContract_js_1.writeContract, "writeContract")({
|
|
173695
|
-
abi:
|
|
173695
|
+
abi: abi36,
|
|
173696
173696
|
address,
|
|
173697
173697
|
functionName,
|
|
173698
173698
|
args,
|
|
@@ -173710,7 +173710,7 @@ var require_getContract = __commonJS({
|
|
|
173710
173710
|
const { args, options } = getFunctionParameters2(parameters);
|
|
173711
173711
|
const client2 = publicClient ?? walletClient;
|
|
173712
173712
|
return (0, getAction_js_1.getAction)(client2, estimateContractGas_js_1.estimateContractGas, "estimateContractGas")({
|
|
173713
|
-
abi:
|
|
173713
|
+
abi: abi36,
|
|
173714
173714
|
address,
|
|
173715
173715
|
functionName,
|
|
173716
173716
|
args,
|
|
@@ -173722,7 +173722,7 @@ var require_getContract = __commonJS({
|
|
|
173722
173722
|
});
|
|
173723
173723
|
}
|
|
173724
173724
|
contract.address = address;
|
|
173725
|
-
contract.abi =
|
|
173725
|
+
contract.abi = abi36;
|
|
173726
173726
|
return contract;
|
|
173727
173727
|
}
|
|
173728
173728
|
function getFunctionParameters2(values) {
|
|
@@ -175345,7 +175345,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
175345
175345
|
const { address, factory, factoryData } = parameters;
|
|
175346
175346
|
try {
|
|
175347
175347
|
const [fields, name, version4, chainId, verifyingContract, salt, extensions] = await (0, getAction_js_1.getAction)(client, readContract_js_1.readContract, "readContract")({
|
|
175348
|
-
abi:
|
|
175348
|
+
abi: abi36,
|
|
175349
175349
|
address,
|
|
175350
175350
|
functionName: "eip712Domain",
|
|
175351
175351
|
factory,
|
|
@@ -175370,7 +175370,7 @@ var require_getEip712Domain = __commonJS({
|
|
|
175370
175370
|
throw error;
|
|
175371
175371
|
}
|
|
175372
175372
|
}
|
|
175373
|
-
var
|
|
175373
|
+
var abi36 = [
|
|
175374
175374
|
{
|
|
175375
175375
|
inputs: [],
|
|
175376
175376
|
name: "eip712Domain",
|
|
@@ -179699,9 +179699,9 @@ var require_decodeFunctionData = __commonJS({
|
|
|
179699
179699
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
179700
179700
|
var formatAbiItem_js_1 = require_formatAbiItem2();
|
|
179701
179701
|
function decodeFunctionData2(parameters) {
|
|
179702
|
-
const { abi:
|
|
179702
|
+
const { abi: abi36, data } = parameters;
|
|
179703
179703
|
const signature = (0, slice_js_1.slice)(data, 0, 4);
|
|
179704
|
-
const description =
|
|
179704
|
+
const description = abi36.find((x) => x.type === "function" && signature === (0, toFunctionSelector_js_1.toFunctionSelector)((0, formatAbiItem_js_1.formatAbiItem)(x)));
|
|
179705
179705
|
if (!description)
|
|
179706
179706
|
throw new abi_js_1.AbiFunctionSignatureNotFoundError(signature, {
|
|
179707
179707
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -179728,10 +179728,10 @@ var require_encodeErrorResult = __commonJS({
|
|
|
179728
179728
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
179729
179729
|
var docsPath6 = "/docs/contract/encodeErrorResult";
|
|
179730
179730
|
function encodeErrorResult(parameters) {
|
|
179731
|
-
const { abi:
|
|
179732
|
-
let abiItem =
|
|
179731
|
+
const { abi: abi36, errorName, args } = parameters;
|
|
179732
|
+
let abiItem = abi36[0];
|
|
179733
179733
|
if (errorName) {
|
|
179734
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
179734
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, args, name: errorName });
|
|
179735
179735
|
if (!item)
|
|
179736
179736
|
throw new abi_js_1.AbiErrorNotFoundError(errorName, { docsPath: docsPath6 });
|
|
179737
179737
|
abiItem = item;
|
|
@@ -179762,10 +179762,10 @@ var require_encodeFunctionResult = __commonJS({
|
|
|
179762
179762
|
var getAbiItem_js_1 = require_getAbiItem();
|
|
179763
179763
|
var docsPath6 = "/docs/contract/encodeFunctionResult";
|
|
179764
179764
|
function encodeFunctionResult(parameters) {
|
|
179765
|
-
const { abi:
|
|
179766
|
-
let abiItem =
|
|
179765
|
+
const { abi: abi36, functionName, result } = parameters;
|
|
179766
|
+
let abiItem = abi36[0];
|
|
179767
179767
|
if (functionName) {
|
|
179768
|
-
const item = (0, getAbiItem_js_1.getAbiItem)({ abi:
|
|
179768
|
+
const item = (0, getAbiItem_js_1.getAbiItem)({ abi: abi36, name: functionName });
|
|
179769
179769
|
if (!item)
|
|
179770
179770
|
throw new abi_js_1.AbiFunctionNotFoundError(functionName, { docsPath: docsPath6 });
|
|
179771
179771
|
abiItem = item;
|
|
@@ -182048,9 +182048,9 @@ var require_multicall2 = __commonJS({
|
|
|
182048
182048
|
let currentChunk = 0;
|
|
182049
182049
|
let currentChunkSize = 0;
|
|
182050
182050
|
for (let i = 0; i < contracts2.length; i++) {
|
|
182051
|
-
const { abi:
|
|
182051
|
+
const { abi: abi36, address, args, functionName } = contracts2[i];
|
|
182052
182052
|
try {
|
|
182053
|
-
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi:
|
|
182053
|
+
const callData = (0, encodeFunctionData_js_1.encodeFunctionData)({ abi: abi36, args, functionName });
|
|
182054
182054
|
currentChunkSize += (callData.length - 2) / 2;
|
|
182055
182055
|
if (batchSize > 0 && currentChunkSize > batchSize && chunkedCalls[currentChunk].length > 0) {
|
|
182056
182056
|
currentChunk++;
|
|
@@ -182067,7 +182067,7 @@ var require_multicall2 = __commonJS({
|
|
|
182067
182067
|
];
|
|
182068
182068
|
} catch (err) {
|
|
182069
182069
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
182070
|
-
abi:
|
|
182070
|
+
abi: abi36,
|
|
182071
182071
|
address,
|
|
182072
182072
|
args,
|
|
182073
182073
|
docsPath: "/docs/contract/multicall",
|
|
@@ -182113,14 +182113,14 @@ var require_multicall2 = __commonJS({
|
|
|
182113
182113
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
182114
182114
|
const { returnData, success } = aggregate3Result[j];
|
|
182115
182115
|
const { callData } = chunkedCalls[i][j];
|
|
182116
|
-
const { abi:
|
|
182116
|
+
const { abi: abi36, address, functionName, args } = contracts2[results.length];
|
|
182117
182117
|
try {
|
|
182118
182118
|
if (callData === "0x")
|
|
182119
182119
|
throw new abi_js_1.AbiDecodingZeroDataError();
|
|
182120
182120
|
if (!success)
|
|
182121
182121
|
throw new contract_js_1.RawContractError({ data: returnData });
|
|
182122
182122
|
const result2 = (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
182123
|
-
abi:
|
|
182123
|
+
abi: abi36,
|
|
182124
182124
|
args,
|
|
182125
182125
|
data: returnData,
|
|
182126
182126
|
functionName
|
|
@@ -182128,7 +182128,7 @@ var require_multicall2 = __commonJS({
|
|
|
182128
182128
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
182129
182129
|
} catch (err) {
|
|
182130
182130
|
const error = (0, getContractError_js_1.getContractError)(err, {
|
|
182131
|
-
abi:
|
|
182131
|
+
abi: abi36,
|
|
182132
182132
|
address,
|
|
182133
182133
|
args,
|
|
182134
182134
|
docsPath: "/docs/contract/multicall",
|
|
@@ -183180,13 +183180,13 @@ var require_simulateBlocks = __commonJS({
|
|
|
183180
183180
|
return result.map((block2, i) => ({
|
|
183181
183181
|
...(0, block_js_1.formatBlock)(block2),
|
|
183182
183182
|
calls: block2.calls.map((call2, j) => {
|
|
183183
|
-
const { abi:
|
|
183183
|
+
const { abi: abi36, args, functionName, to } = blocks[i].calls[j];
|
|
183184
183184
|
const data = call2.error?.data ?? call2.returnData;
|
|
183185
183185
|
const gasUsed = BigInt(call2.gasUsed);
|
|
183186
183186
|
const logs = call2.logs?.map((log2) => (0, log_js_1.formatLog)(log2));
|
|
183187
183187
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
183188
|
-
const result2 =
|
|
183189
|
-
abi:
|
|
183188
|
+
const result2 = abi36 && status === "success" ? (0, decodeFunctionResult_js_1.decodeFunctionResult)({
|
|
183189
|
+
abi: abi36,
|
|
183190
183190
|
data,
|
|
183191
183191
|
functionName
|
|
183192
183192
|
}) : null;
|
|
@@ -183201,7 +183201,7 @@ var require_simulateBlocks = __commonJS({
|
|
|
183201
183201
|
if (!error2)
|
|
183202
183202
|
return void 0;
|
|
183203
183203
|
return (0, getContractError_js_1.getContractError)(error2, {
|
|
183204
|
-
abi:
|
|
183204
|
+
abi: abi36 ?? [],
|
|
183205
183205
|
address: to,
|
|
183206
183206
|
args,
|
|
183207
183207
|
functionName: functionName ?? "<unknown>"
|
|
@@ -183781,10 +183781,10 @@ var require_AbiItem = __commonJS({
|
|
|
183781
183781
|
...prepare ? { hash: getSignatureHash2(item) } : {}
|
|
183782
183782
|
};
|
|
183783
183783
|
}
|
|
183784
|
-
function fromAbi3(
|
|
183784
|
+
function fromAbi3(abi36, name, options) {
|
|
183785
183785
|
const { args = [], prepare = true } = options ?? {};
|
|
183786
183786
|
const isSelector = Hex.validate(name, { strict: false });
|
|
183787
|
-
const abiItems =
|
|
183787
|
+
const abiItems = abi36.filter((abiItem2) => {
|
|
183788
183788
|
if (isSelector) {
|
|
183789
183789
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
183790
183790
|
return getSelector3(abiItem2) === Hex.slice(name, 0, 4);
|
|
@@ -184927,8 +184927,8 @@ var require_AbiConstructor = __commonJS({
|
|
|
184927
184927
|
function from5(abiConstructor) {
|
|
184928
184928
|
return AbiItem.from(abiConstructor);
|
|
184929
184929
|
}
|
|
184930
|
-
function fromAbi3(
|
|
184931
|
-
const item =
|
|
184930
|
+
function fromAbi3(abi36) {
|
|
184931
|
+
const item = abi36.find((item2) => item2.type === "constructor");
|
|
184932
184932
|
if (!item)
|
|
184933
184933
|
throw new AbiItem.NotFoundError({ name: "constructor" });
|
|
184934
184934
|
return item;
|
|
@@ -185003,8 +185003,8 @@ var require_AbiFunction = __commonJS({
|
|
|
185003
185003
|
function from5(abiFunction, options = {}) {
|
|
185004
185004
|
return AbiItem.from(abiFunction, options);
|
|
185005
185005
|
}
|
|
185006
|
-
function fromAbi3(
|
|
185007
|
-
const item = AbiItem.fromAbi(
|
|
185006
|
+
function fromAbi3(abi36, name, options) {
|
|
185007
|
+
const item = AbiItem.fromAbi(abi36, name, options);
|
|
185008
185008
|
if (item.type !== "function")
|
|
185009
185009
|
throw new AbiItem.NotFoundError({ name, type: "function" });
|
|
185010
185010
|
return item;
|
|
@@ -186904,8 +186904,8 @@ var require_deployContract = __commonJS({
|
|
|
186904
186904
|
var encodeDeployData_js_1 = require_encodeDeployData();
|
|
186905
186905
|
var sendTransaction_js_1 = require_sendTransaction();
|
|
186906
186906
|
function deployContract2(walletClient, parameters) {
|
|
186907
|
-
const { abi:
|
|
186908
|
-
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi:
|
|
186907
|
+
const { abi: abi36, args, bytecode, ...request } = parameters;
|
|
186908
|
+
const calldata = (0, encodeDeployData_js_1.encodeDeployData)({ abi: abi36, args, bytecode });
|
|
186909
186909
|
return (0, sendTransaction_js_1.sendTransaction)(walletClient, {
|
|
186910
186910
|
...request,
|
|
186911
186911
|
data: calldata
|
|
@@ -187328,10 +187328,10 @@ var require_decodeDeployData = __commonJS({
|
|
|
187328
187328
|
var decodeAbiParameters_js_1 = require_decodeAbiParameters();
|
|
187329
187329
|
var docsPath6 = "/docs/contract/decodeDeployData";
|
|
187330
187330
|
function decodeDeployData(parameters) {
|
|
187331
|
-
const { abi:
|
|
187331
|
+
const { abi: abi36, bytecode, data } = parameters;
|
|
187332
187332
|
if (data === bytecode)
|
|
187333
187333
|
return { bytecode };
|
|
187334
|
-
const description =
|
|
187334
|
+
const description = abi36.find((x) => "type" in x && x.type === "constructor");
|
|
187335
187335
|
if (!description)
|
|
187336
187336
|
throw new abi_js_1.AbiConstructorNotFoundError({ docsPath: docsPath6 });
|
|
187337
187337
|
if (!("inputs" in description))
|
|
@@ -231201,21 +231201,21 @@ var require_BaseContract2 = __commonJS({
|
|
|
231201
231201
|
return this.contractAddress;
|
|
231202
231202
|
};
|
|
231203
231203
|
this.encode = (functionToEncode, args) => {
|
|
231204
|
-
const
|
|
231204
|
+
const abi36 = this.contractAbi;
|
|
231205
231205
|
const functionName = functionToEncode;
|
|
231206
231206
|
const params = args;
|
|
231207
231207
|
return (0, viem_1.encodeFunctionData)({
|
|
231208
|
-
abi:
|
|
231208
|
+
abi: abi36,
|
|
231209
231209
|
functionName,
|
|
231210
231210
|
args: params
|
|
231211
231211
|
});
|
|
231212
231212
|
};
|
|
231213
231213
|
this.estimateGas = async (functionToEstimate, args, options = {}) => {
|
|
231214
231214
|
const contractOptions = this.convertOptions(options);
|
|
231215
|
-
const
|
|
231215
|
+
const abi36 = this.contractAbi;
|
|
231216
231216
|
const params = args;
|
|
231217
231217
|
return (0, actions_1.estimateContractGas)(this.runner, {
|
|
231218
|
-
abi:
|
|
231218
|
+
abi: abi36,
|
|
231219
231219
|
functionName: functionToEstimate,
|
|
231220
231220
|
address: this.getAddress(),
|
|
231221
231221
|
args: params,
|
|
@@ -278595,17 +278595,17 @@ var require_interface3 = __commonJS({
|
|
|
278595
278595
|
* Create a new Interface for the %%fragments%%.
|
|
278596
278596
|
*/
|
|
278597
278597
|
constructor(fragments) {
|
|
278598
|
-
let
|
|
278598
|
+
let abi36 = [];
|
|
278599
278599
|
if (typeof fragments === "string") {
|
|
278600
|
-
|
|
278600
|
+
abi36 = JSON.parse(fragments);
|
|
278601
278601
|
} else {
|
|
278602
|
-
|
|
278602
|
+
abi36 = fragments;
|
|
278603
278603
|
}
|
|
278604
278604
|
this.#functions = /* @__PURE__ */ new Map();
|
|
278605
278605
|
this.#errors = /* @__PURE__ */ new Map();
|
|
278606
278606
|
this.#events = /* @__PURE__ */ new Map();
|
|
278607
278607
|
const frags = [];
|
|
278608
|
-
for (const a of
|
|
278608
|
+
for (const a of abi36) {
|
|
278609
278609
|
try {
|
|
278610
278610
|
frags.push(fragments_js_1.Fragment.from(a));
|
|
278611
278611
|
} catch (error) {
|
|
@@ -278669,16 +278669,16 @@ var require_interface3 = __commonJS({
|
|
|
278669
278669
|
*/
|
|
278670
278670
|
format(minimal) {
|
|
278671
278671
|
const format = minimal ? "minimal" : "full";
|
|
278672
|
-
const
|
|
278673
|
-
return
|
|
278672
|
+
const abi36 = this.fragments.map((f) => f.format(format));
|
|
278673
|
+
return abi36;
|
|
278674
278674
|
}
|
|
278675
278675
|
/**
|
|
278676
278676
|
* Return the JSON-encoded ABI. This is the format Solidiy
|
|
278677
278677
|
* returns.
|
|
278678
278678
|
*/
|
|
278679
278679
|
formatJson() {
|
|
278680
|
-
const
|
|
278681
|
-
return JSON.stringify(
|
|
278680
|
+
const abi36 = this.fragments.map((f) => f.format("json"));
|
|
278681
|
+
return JSON.stringify(abi36.map((j) => JSON.parse(j)));
|
|
278682
278682
|
}
|
|
278683
278683
|
/**
|
|
278684
278684
|
* The ABI coder that will be used to encode and decode binary
|
|
@@ -281446,12 +281446,12 @@ var require_contract5 = __commonJS({
|
|
|
281446
281446
|
* optionally connected to a %%runner%% to perform operations on behalf
|
|
281447
281447
|
* of.
|
|
281448
281448
|
*/
|
|
281449
|
-
constructor(target,
|
|
281449
|
+
constructor(target, abi36, runner, _deployTx) {
|
|
281450
281450
|
(0, index_js_3.assertArgument)(typeof target === "string" || (0, index_js_2.isAddressable)(target), "invalid value for Contract target", "target", target);
|
|
281451
281451
|
if (runner == null) {
|
|
281452
281452
|
runner = null;
|
|
281453
281453
|
}
|
|
281454
|
-
const iface = index_js_1.Interface.from(
|
|
281454
|
+
const iface = index_js_1.Interface.from(abi36);
|
|
281455
281455
|
(0, index_js_3.defineProperties)(this, { target, runner, interface: iface });
|
|
281456
281456
|
Object.defineProperty(this, internal, { value: {} });
|
|
281457
281457
|
let addrPromise;
|
|
@@ -281814,10 +281814,10 @@ var require_contract5 = __commonJS({
|
|
|
281814
281814
|
/**
|
|
281815
281815
|
* Create a new Class for the %%abi%%.
|
|
281816
281816
|
*/
|
|
281817
|
-
static buildClass(
|
|
281817
|
+
static buildClass(abi36) {
|
|
281818
281818
|
class CustomContract extends _BaseContract {
|
|
281819
281819
|
constructor(address, runner = null) {
|
|
281820
|
-
super(address,
|
|
281820
|
+
super(address, abi36, runner);
|
|
281821
281821
|
}
|
|
281822
281822
|
}
|
|
281823
281823
|
return CustomContract;
|
|
@@ -281825,11 +281825,11 @@ var require_contract5 = __commonJS({
|
|
|
281825
281825
|
/**
|
|
281826
281826
|
* Create a new BaseContract with a specified Interface.
|
|
281827
281827
|
*/
|
|
281828
|
-
static from(target,
|
|
281828
|
+
static from(target, abi36, runner) {
|
|
281829
281829
|
if (runner == null) {
|
|
281830
281830
|
runner = null;
|
|
281831
281831
|
}
|
|
281832
|
-
const contract = new this(target,
|
|
281832
|
+
const contract = new this(target, abi36, runner);
|
|
281833
281833
|
return contract;
|
|
281834
281834
|
}
|
|
281835
281835
|
};
|
|
@@ -281873,8 +281873,8 @@ var require_factory2 = __commonJS({
|
|
|
281873
281873
|
* The %%bytecode%% may be the ``bytecode`` property within the
|
|
281874
281874
|
* standard Solidity JSON output.
|
|
281875
281875
|
*/
|
|
281876
|
-
constructor(
|
|
281877
|
-
const iface = index_js_1.Interface.from(
|
|
281876
|
+
constructor(abi36, bytecode, runner) {
|
|
281877
|
+
const iface = index_js_1.Interface.from(abi36);
|
|
281878
281878
|
if (bytecode instanceof Uint8Array) {
|
|
281879
281879
|
bytecode = (0, index_js_3.hexlify)((0, index_js_3.getBytes)(bytecode));
|
|
281880
281880
|
} else {
|
|
@@ -281944,14 +281944,14 @@ var require_factory2 = __commonJS({
|
|
|
281944
281944
|
if (typeof output === "string") {
|
|
281945
281945
|
output = JSON.parse(output);
|
|
281946
281946
|
}
|
|
281947
|
-
const
|
|
281947
|
+
const abi36 = output.abi;
|
|
281948
281948
|
let bytecode = "";
|
|
281949
281949
|
if (output.bytecode) {
|
|
281950
281950
|
bytecode = output.bytecode;
|
|
281951
281951
|
} else if (output.evm && output.evm.bytecode) {
|
|
281952
281952
|
bytecode = output.evm.bytecode;
|
|
281953
281953
|
}
|
|
281954
|
-
return new this(
|
|
281954
|
+
return new this(abi36, bytecode, runner);
|
|
281955
281955
|
}
|
|
281956
281956
|
};
|
|
281957
281957
|
exports2.ContractFactory = ContractFactory;
|
|
@@ -286901,8 +286901,8 @@ var require_provider_etherscan2 = __commonJS({
|
|
|
286901
286901
|
action: "getabi",
|
|
286902
286902
|
address
|
|
286903
286903
|
});
|
|
286904
|
-
const
|
|
286905
|
-
return new index_js_2.Contract(address,
|
|
286904
|
+
const abi36 = JSON.parse(resp);
|
|
286905
|
+
return new index_js_2.Contract(address, abi36, this);
|
|
286906
286906
|
} catch (error) {
|
|
286907
286907
|
return null;
|
|
286908
286908
|
}
|
|
@@ -337369,10 +337369,10 @@ init_formatAbiItem2();
|
|
|
337369
337369
|
init_getAbiItem();
|
|
337370
337370
|
var docsPath = "/docs/contract/encodeEventTopics";
|
|
337371
337371
|
function encodeEventTopics(parameters) {
|
|
337372
|
-
const { abi:
|
|
337373
|
-
let abiItem =
|
|
337372
|
+
const { abi: abi36, eventName, args } = parameters;
|
|
337373
|
+
let abiItem = abi36[0];
|
|
337374
337374
|
if (eventName) {
|
|
337375
|
-
const item = getAbiItem({ abi:
|
|
337375
|
+
const item = getAbiItem({ abi: abi36, name: eventName });
|
|
337376
337376
|
if (!item)
|
|
337377
337377
|
throw new AbiEventNotFoundError(eventName, { docsPath });
|
|
337378
337378
|
abiItem = item;
|
|
@@ -337419,12 +337419,12 @@ function createFilterRequestScope(client, { method }) {
|
|
|
337419
337419
|
|
|
337420
337420
|
// ../../node_modules/viem/_esm/actions/public/createContractEventFilter.js
|
|
337421
337421
|
async function createContractEventFilter(client, parameters) {
|
|
337422
|
-
const { address, abi:
|
|
337422
|
+
const { address, abi: abi36, args, eventName, fromBlock, strict, toBlock } = parameters;
|
|
337423
337423
|
const getRequest = createFilterRequestScope(client, {
|
|
337424
337424
|
method: "eth_newFilter"
|
|
337425
337425
|
});
|
|
337426
337426
|
const topics = eventName ? encodeEventTopics({
|
|
337427
|
-
abi:
|
|
337427
|
+
abi: abi36,
|
|
337428
337428
|
args,
|
|
337429
337429
|
eventName
|
|
337430
337430
|
}) : void 0;
|
|
@@ -337440,7 +337440,7 @@ async function createContractEventFilter(client, parameters) {
|
|
|
337440
337440
|
]
|
|
337441
337441
|
});
|
|
337442
337442
|
return {
|
|
337443
|
-
abi:
|
|
337443
|
+
abi: abi36,
|
|
337444
337444
|
args,
|
|
337445
337445
|
eventName,
|
|
337446
337446
|
id,
|
|
@@ -337461,7 +337461,7 @@ init_contract();
|
|
|
337461
337461
|
init_request();
|
|
337462
337462
|
init_rpc();
|
|
337463
337463
|
var EXECUTION_REVERTED_ERROR_CODE = 3;
|
|
337464
|
-
function getContractError(err, { abi:
|
|
337464
|
+
function getContractError(err, { abi: abi36, address, args, docsPath: docsPath6, functionName, sender }) {
|
|
337465
337465
|
const error = err instanceof RawContractError ? err : err instanceof BaseError2 ? err.walk((err2) => "data" in err2) || err.walk() : {};
|
|
337466
337466
|
const { code, data, details, message, shortMessage } = error;
|
|
337467
337467
|
const cause = (() => {
|
|
@@ -337469,7 +337469,7 @@ function getContractError(err, { abi: abi35, address, args, docsPath: docsPath6,
|
|
|
337469
337469
|
return new ContractFunctionZeroDataError({ functionName });
|
|
337470
337470
|
if ([EXECUTION_REVERTED_ERROR_CODE, InternalRpcError.code].includes(code) && (data || details || message || shortMessage)) {
|
|
337471
337471
|
return new ContractFunctionRevertedError({
|
|
337472
|
-
abi:
|
|
337472
|
+
abi: abi36,
|
|
337473
337473
|
data: typeof data === "object" ? data.data : data,
|
|
337474
337474
|
functionName,
|
|
337475
337475
|
message: error instanceof RpcRequestError ? details : shortMessage ?? message
|
|
@@ -337478,7 +337478,7 @@ function getContractError(err, { abi: abi35, address, args, docsPath: docsPath6,
|
|
|
337478
337478
|
return err;
|
|
337479
337479
|
})();
|
|
337480
337480
|
return new ContractFunctionExecutionError(cause, {
|
|
337481
|
-
abi:
|
|
337481
|
+
abi: abi36,
|
|
337482
337482
|
args,
|
|
337483
337483
|
contractAddress: address,
|
|
337484
337484
|
docsPath: docsPath6,
|
|
@@ -338431,9 +338431,9 @@ async function estimateGas(client, args) {
|
|
|
338431
338431
|
|
|
338432
338432
|
// ../../node_modules/viem/_esm/actions/public/estimateContractGas.js
|
|
338433
338433
|
async function estimateContractGas(client, parameters) {
|
|
338434
|
-
const { abi:
|
|
338434
|
+
const { abi: abi36, address, args, functionName, dataSuffix, ...request } = parameters;
|
|
338435
338435
|
const data = encodeFunctionData({
|
|
338436
|
-
abi:
|
|
338436
|
+
abi: abi36,
|
|
338437
338437
|
args,
|
|
338438
338438
|
functionName
|
|
338439
338439
|
});
|
|
@@ -338447,7 +338447,7 @@ async function estimateContractGas(client, parameters) {
|
|
|
338447
338447
|
} catch (error) {
|
|
338448
338448
|
const account = request.account ? parseAccount(request.account) : void 0;
|
|
338449
338449
|
throw getContractError(error, {
|
|
338450
|
-
abi:
|
|
338450
|
+
abi: abi36,
|
|
338451
338451
|
address,
|
|
338452
338452
|
args,
|
|
338453
338453
|
docsPath: "/docs/contract/estimateContractGas",
|
|
@@ -338476,15 +338476,15 @@ init_decodeAbiParameters();
|
|
|
338476
338476
|
init_formatAbiItem2();
|
|
338477
338477
|
var docsPath3 = "/docs/contract/decodeEventLog";
|
|
338478
338478
|
function decodeEventLog(parameters) {
|
|
338479
|
-
const { abi:
|
|
338479
|
+
const { abi: abi36, data, strict: strict_, topics } = parameters;
|
|
338480
338480
|
const strict = strict_ ?? true;
|
|
338481
338481
|
const [signature, ...argTopics] = topics;
|
|
338482
338482
|
if (!signature)
|
|
338483
338483
|
throw new AbiEventSignatureEmptyTopicsError({ docsPath: docsPath3 });
|
|
338484
338484
|
const abiItem = (() => {
|
|
338485
|
-
if (
|
|
338486
|
-
return
|
|
338487
|
-
return
|
|
338485
|
+
if (abi36.length === 1)
|
|
338486
|
+
return abi36[0];
|
|
338487
|
+
return abi36.find((x) => x.type === "event" && signature === toEventSelector(formatAbiItem2(x)));
|
|
338488
338488
|
})();
|
|
338489
338489
|
if (!(abiItem && "name" in abiItem) || abiItem.type !== "event")
|
|
338490
338490
|
throw new AbiEventSignatureNotFoundError(signature, { docsPath: docsPath3 });
|
|
@@ -338551,7 +338551,7 @@ function decodeTopic({ param, value }) {
|
|
|
338551
338551
|
|
|
338552
338552
|
// ../../node_modules/viem/_esm/utils/abi/parseEventLogs.js
|
|
338553
338553
|
function parseEventLogs(parameters) {
|
|
338554
|
-
const { abi:
|
|
338554
|
+
const { abi: abi36, args, logs, strict = true } = parameters;
|
|
338555
338555
|
const eventName = (() => {
|
|
338556
338556
|
if (!parameters.eventName)
|
|
338557
338557
|
return void 0;
|
|
@@ -338561,7 +338561,7 @@ function parseEventLogs(parameters) {
|
|
|
338561
338561
|
})();
|
|
338562
338562
|
return logs.map((log2) => {
|
|
338563
338563
|
try {
|
|
338564
|
-
const abiItem =
|
|
338564
|
+
const abiItem = abi36.find((abiItem2) => abiItem2.type === "event" && log2.topics[0] === toEventSelector(abiItem2));
|
|
338565
338565
|
if (!abiItem)
|
|
338566
338566
|
return null;
|
|
338567
338567
|
const event = decodeEventLog({
|
|
@@ -338697,9 +338697,9 @@ async function getLogs(client, { address, blockHash, fromBlock, toBlock, event,
|
|
|
338697
338697
|
|
|
338698
338698
|
// ../../node_modules/viem/_esm/actions/public/getContractEvents.js
|
|
338699
338699
|
async function getContractEvents(client, parameters) {
|
|
338700
|
-
const { abi:
|
|
338701
|
-
const event = eventName ? getAbiItem({ abi:
|
|
338702
|
-
const events = !event ?
|
|
338700
|
+
const { abi: abi36, address, args, blockHash, eventName, fromBlock, toBlock, strict } = parameters;
|
|
338701
|
+
const event = eventName ? getAbiItem({ abi: abi36, name: eventName }) : void 0;
|
|
338702
|
+
const events = !event ? abi36.filter((x) => x.type === "event") : void 0;
|
|
338703
338703
|
return getAction(client, getLogs, "getLogs")({
|
|
338704
338704
|
address,
|
|
338705
338705
|
args,
|
|
@@ -338717,9 +338717,9 @@ init_decodeFunctionResult();
|
|
|
338717
338717
|
init_encodeFunctionData();
|
|
338718
338718
|
init_call();
|
|
338719
338719
|
async function readContract(client, parameters) {
|
|
338720
|
-
const { abi:
|
|
338720
|
+
const { abi: abi36, address, args, functionName, ...rest2 } = parameters;
|
|
338721
338721
|
const calldata = encodeFunctionData({
|
|
338722
|
-
abi:
|
|
338722
|
+
abi: abi36,
|
|
338723
338723
|
args,
|
|
338724
338724
|
functionName
|
|
338725
338725
|
});
|
|
@@ -338730,14 +338730,14 @@ async function readContract(client, parameters) {
|
|
|
338730
338730
|
to: address
|
|
338731
338731
|
});
|
|
338732
338732
|
return decodeFunctionResult({
|
|
338733
|
-
abi:
|
|
338733
|
+
abi: abi36,
|
|
338734
338734
|
args,
|
|
338735
338735
|
functionName,
|
|
338736
338736
|
data: data || "0x"
|
|
338737
338737
|
});
|
|
338738
338738
|
} catch (error) {
|
|
338739
338739
|
throw getContractError(error, {
|
|
338740
|
-
abi:
|
|
338740
|
+
abi: abi36,
|
|
338741
338741
|
address,
|
|
338742
338742
|
args,
|
|
338743
338743
|
docsPath: "/docs/contract/readContract",
|
|
@@ -338752,9 +338752,9 @@ init_decodeFunctionResult();
|
|
|
338752
338752
|
init_encodeFunctionData();
|
|
338753
338753
|
init_call();
|
|
338754
338754
|
async function simulateContract(client, parameters) {
|
|
338755
|
-
const { abi:
|
|
338755
|
+
const { abi: abi36, address, args, dataSuffix, functionName, ...callRequest } = parameters;
|
|
338756
338756
|
const account = callRequest.account ? parseAccount(callRequest.account) : client.account;
|
|
338757
|
-
const calldata = encodeFunctionData({ abi:
|
|
338757
|
+
const calldata = encodeFunctionData({ abi: abi36, args, functionName });
|
|
338758
338758
|
try {
|
|
338759
338759
|
const { data } = await getAction(client, call, "call")({
|
|
338760
338760
|
batch: false,
|
|
@@ -338764,12 +338764,12 @@ async function simulateContract(client, parameters) {
|
|
|
338764
338764
|
account
|
|
338765
338765
|
});
|
|
338766
338766
|
const result = decodeFunctionResult({
|
|
338767
|
-
abi:
|
|
338767
|
+
abi: abi36,
|
|
338768
338768
|
args,
|
|
338769
338769
|
functionName,
|
|
338770
338770
|
data: data || "0x"
|
|
338771
338771
|
});
|
|
338772
|
-
const minimizedAbi =
|
|
338772
|
+
const minimizedAbi = abi36.filter((abiItem) => "name" in abiItem && abiItem.name === parameters.functionName);
|
|
338773
338773
|
return {
|
|
338774
338774
|
result,
|
|
338775
338775
|
request: {
|
|
@@ -338784,7 +338784,7 @@ async function simulateContract(client, parameters) {
|
|
|
338784
338784
|
};
|
|
338785
338785
|
} catch (error) {
|
|
338786
338786
|
throw getContractError(error, {
|
|
338787
|
-
abi:
|
|
338787
|
+
abi: abi36,
|
|
338788
338788
|
address,
|
|
338789
338789
|
args,
|
|
338790
338790
|
docsPath: "/docs/contract/simulateContract",
|
|
@@ -338952,7 +338952,7 @@ async function uninstallFilter(_client, { filter }) {
|
|
|
338952
338952
|
|
|
338953
338953
|
// ../../node_modules/viem/_esm/actions/public/watchContractEvent.js
|
|
338954
338954
|
function watchContractEvent(client, parameters) {
|
|
338955
|
-
const { abi:
|
|
338955
|
+
const { abi: abi36, address, args, batch = true, eventName, fromBlock, onError, onLogs, poll: poll_, pollingInterval = client.pollingInterval, strict: strict_ } = parameters;
|
|
338956
338956
|
const enablePolling = (() => {
|
|
338957
338957
|
if (typeof poll_ !== "undefined")
|
|
338958
338958
|
return poll_;
|
|
@@ -338987,7 +338987,7 @@ function watchContractEvent(client, parameters) {
|
|
|
338987
338987
|
if (!initialized) {
|
|
338988
338988
|
try {
|
|
338989
338989
|
filter = await getAction(client, createContractEventFilter, "createContractEventFilter")({
|
|
338990
|
-
abi:
|
|
338990
|
+
abi: abi36,
|
|
338991
338991
|
address,
|
|
338992
338992
|
args,
|
|
338993
338993
|
eventName,
|
|
@@ -339007,7 +339007,7 @@ function watchContractEvent(client, parameters) {
|
|
|
339007
339007
|
const blockNumber = await getAction(client, getBlockNumber, "getBlockNumber")({});
|
|
339008
339008
|
if (previousBlockNumber && previousBlockNumber < blockNumber) {
|
|
339009
339009
|
logs = await getAction(client, getContractEvents, "getContractEvents")({
|
|
339010
|
-
abi:
|
|
339010
|
+
abi: abi36,
|
|
339011
339011
|
address,
|
|
339012
339012
|
args,
|
|
339013
339013
|
eventName,
|
|
@@ -339071,7 +339071,7 @@ function watchContractEvent(client, parameters) {
|
|
|
339071
339071
|
return client.transport;
|
|
339072
339072
|
})();
|
|
339073
339073
|
const topics = eventName ? encodeEventTopics({
|
|
339074
|
-
abi:
|
|
339074
|
+
abi: abi36,
|
|
339075
339075
|
eventName,
|
|
339076
339076
|
args
|
|
339077
339077
|
}) : [];
|
|
@@ -339083,7 +339083,7 @@ function watchContractEvent(client, parameters) {
|
|
|
339083
339083
|
const log2 = data.result;
|
|
339084
339084
|
try {
|
|
339085
339085
|
const { eventName: eventName2, args: args2 } = decodeEventLog({
|
|
339086
|
-
abi:
|
|
339086
|
+
abi: abi36,
|
|
339087
339087
|
data: log2.data,
|
|
339088
339088
|
topics: log2.topics,
|
|
339089
339089
|
strict: strict_
|
|
@@ -339334,14 +339334,14 @@ async function sendTransaction(client, parameters) {
|
|
|
339334
339334
|
|
|
339335
339335
|
// ../../node_modules/viem/_esm/actions/wallet/writeContract.js
|
|
339336
339336
|
async function writeContract(client, parameters) {
|
|
339337
|
-
const { abi:
|
|
339337
|
+
const { abi: abi36, account: account_ = client.account, address, args, dataSuffix, functionName, ...request } = parameters;
|
|
339338
339338
|
if (typeof account_ === "undefined")
|
|
339339
339339
|
throw new AccountNotFoundError({
|
|
339340
339340
|
docsPath: "/docs/contract/writeContract"
|
|
339341
339341
|
});
|
|
339342
339342
|
const account = account_ ? parseAccount(account_) : null;
|
|
339343
339343
|
const data = encodeFunctionData({
|
|
339344
|
-
abi:
|
|
339344
|
+
abi: abi36,
|
|
339345
339345
|
args,
|
|
339346
339346
|
functionName
|
|
339347
339347
|
});
|
|
@@ -339354,7 +339354,7 @@ async function writeContract(client, parameters) {
|
|
|
339354
339354
|
});
|
|
339355
339355
|
} catch (error) {
|
|
339356
339356
|
throw getContractError(error, {
|
|
339357
|
-
abi:
|
|
339357
|
+
abi: abi36,
|
|
339358
339358
|
address,
|
|
339359
339359
|
args,
|
|
339360
339360
|
docsPath: "/docs/contract/writeContract",
|
|
@@ -339365,7 +339365,7 @@ async function writeContract(client, parameters) {
|
|
|
339365
339365
|
}
|
|
339366
339366
|
|
|
339367
339367
|
// ../../node_modules/viem/_esm/actions/getContract.js
|
|
339368
|
-
function getContract({ abi:
|
|
339368
|
+
function getContract({ abi: abi36, address, client: client_ }) {
|
|
339369
339369
|
const client = client_;
|
|
339370
339370
|
const [publicClient, walletClient] = (() => {
|
|
339371
339371
|
if (!client)
|
|
@@ -339384,7 +339384,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339384
339384
|
let hasReadFunction = false;
|
|
339385
339385
|
let hasWriteFunction = false;
|
|
339386
339386
|
let hasEvent = false;
|
|
339387
|
-
for (const item of
|
|
339387
|
+
for (const item of abi36) {
|
|
339388
339388
|
if (item.type === "function")
|
|
339389
339389
|
if (item.stateMutability === "view" || item.stateMutability === "pure")
|
|
339390
339390
|
hasReadFunction = true;
|
|
@@ -339402,7 +339402,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339402
339402
|
return (...parameters) => {
|
|
339403
339403
|
const { args, options } = getFunctionParameters(parameters);
|
|
339404
339404
|
return getAction(publicClient, readContract, "readContract")({
|
|
339405
|
-
abi:
|
|
339405
|
+
abi: abi36,
|
|
339406
339406
|
address,
|
|
339407
339407
|
functionName,
|
|
339408
339408
|
args,
|
|
@@ -339417,7 +339417,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339417
339417
|
return (...parameters) => {
|
|
339418
339418
|
const { args, options } = getFunctionParameters(parameters);
|
|
339419
339419
|
return getAction(publicClient, simulateContract, "simulateContract")({
|
|
339420
|
-
abi:
|
|
339420
|
+
abi: abi36,
|
|
339421
339421
|
address,
|
|
339422
339422
|
functionName,
|
|
339423
339423
|
args,
|
|
@@ -339430,10 +339430,10 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339430
339430
|
contract.createEventFilter = new Proxy({}, {
|
|
339431
339431
|
get(_, eventName) {
|
|
339432
339432
|
return (...parameters) => {
|
|
339433
|
-
const abiEvent =
|
|
339433
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
339434
339434
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
339435
339435
|
return getAction(publicClient, createContractEventFilter, "createContractEventFilter")({
|
|
339436
|
-
abi:
|
|
339436
|
+
abi: abi36,
|
|
339437
339437
|
address,
|
|
339438
339438
|
eventName,
|
|
339439
339439
|
args,
|
|
@@ -339445,10 +339445,10 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339445
339445
|
contract.getEvents = new Proxy({}, {
|
|
339446
339446
|
get(_, eventName) {
|
|
339447
339447
|
return (...parameters) => {
|
|
339448
|
-
const abiEvent =
|
|
339448
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
339449
339449
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
339450
339450
|
return getAction(publicClient, getContractEvents, "getContractEvents")({
|
|
339451
|
-
abi:
|
|
339451
|
+
abi: abi36,
|
|
339452
339452
|
address,
|
|
339453
339453
|
eventName,
|
|
339454
339454
|
args,
|
|
@@ -339460,10 +339460,10 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339460
339460
|
contract.watchEvent = new Proxy({}, {
|
|
339461
339461
|
get(_, eventName) {
|
|
339462
339462
|
return (...parameters) => {
|
|
339463
|
-
const abiEvent =
|
|
339463
|
+
const abiEvent = abi36.find((x) => x.type === "event" && x.name === eventName);
|
|
339464
339464
|
const { args, options } = getEventParameters(parameters, abiEvent);
|
|
339465
339465
|
return getAction(publicClient, watchContractEvent, "watchContractEvent")({
|
|
339466
|
-
abi:
|
|
339466
|
+
abi: abi36,
|
|
339467
339467
|
address,
|
|
339468
339468
|
eventName,
|
|
339469
339469
|
args,
|
|
@@ -339481,7 +339481,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339481
339481
|
return (...parameters) => {
|
|
339482
339482
|
const { args, options } = getFunctionParameters(parameters);
|
|
339483
339483
|
return getAction(walletClient, writeContract, "writeContract")({
|
|
339484
|
-
abi:
|
|
339484
|
+
abi: abi36,
|
|
339485
339485
|
address,
|
|
339486
339486
|
functionName,
|
|
339487
339487
|
args,
|
|
@@ -339499,7 +339499,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339499
339499
|
const { args, options } = getFunctionParameters(parameters);
|
|
339500
339500
|
const client2 = publicClient ?? walletClient;
|
|
339501
339501
|
return getAction(client2, estimateContractGas, "estimateContractGas")({
|
|
339502
|
-
abi:
|
|
339502
|
+
abi: abi36,
|
|
339503
339503
|
address,
|
|
339504
339504
|
functionName,
|
|
339505
339505
|
args,
|
|
@@ -339511,7 +339511,7 @@ function getContract({ abi: abi35, address, client: client_ }) {
|
|
|
339511
339511
|
});
|
|
339512
339512
|
}
|
|
339513
339513
|
contract.address = address;
|
|
339514
|
-
contract.abi =
|
|
339514
|
+
contract.abi = abi36;
|
|
339515
339515
|
return contract;
|
|
339516
339516
|
}
|
|
339517
339517
|
function getFunctionParameters(values) {
|
|
@@ -341218,9 +341218,9 @@ init_toFunctionSelector();
|
|
|
341218
341218
|
init_decodeAbiParameters();
|
|
341219
341219
|
init_formatAbiItem2();
|
|
341220
341220
|
function decodeFunctionData(parameters) {
|
|
341221
|
-
const { abi:
|
|
341221
|
+
const { abi: abi36, data } = parameters;
|
|
341222
341222
|
const signature = slice(data, 0, 4);
|
|
341223
|
-
const description =
|
|
341223
|
+
const description = abi36.find((x) => x.type === "function" && signature === toFunctionSelector(formatAbiItem2(x)));
|
|
341224
341224
|
if (!description)
|
|
341225
341225
|
throw new AbiFunctionSignatureNotFoundError(signature, {
|
|
341226
341226
|
docsPath: "/docs/contract/decodeFunctionData"
|
|
@@ -341864,9 +341864,9 @@ async function multicall(client, parameters) {
|
|
|
341864
341864
|
let currentChunk = 0;
|
|
341865
341865
|
let currentChunkSize = 0;
|
|
341866
341866
|
for (let i = 0; i < contracts2.length; i++) {
|
|
341867
|
-
const { abi:
|
|
341867
|
+
const { abi: abi36, address, args, functionName } = contracts2[i];
|
|
341868
341868
|
try {
|
|
341869
|
-
const callData = encodeFunctionData({ abi:
|
|
341869
|
+
const callData = encodeFunctionData({ abi: abi36, args, functionName });
|
|
341870
341870
|
currentChunkSize += (callData.length - 2) / 2;
|
|
341871
341871
|
if (
|
|
341872
341872
|
// Check if batching is enabled.
|
|
@@ -341888,7 +341888,7 @@ async function multicall(client, parameters) {
|
|
|
341888
341888
|
];
|
|
341889
341889
|
} catch (err) {
|
|
341890
341890
|
const error = getContractError(err, {
|
|
341891
|
-
abi:
|
|
341891
|
+
abi: abi36,
|
|
341892
341892
|
address,
|
|
341893
341893
|
args,
|
|
341894
341894
|
docsPath: "/docs/contract/multicall",
|
|
@@ -341934,14 +341934,14 @@ async function multicall(client, parameters) {
|
|
|
341934
341934
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
341935
341935
|
const { returnData, success } = aggregate3Result[j];
|
|
341936
341936
|
const { callData } = chunkedCalls[i][j];
|
|
341937
|
-
const { abi:
|
|
341937
|
+
const { abi: abi36, address, functionName, args } = contracts2[results.length];
|
|
341938
341938
|
try {
|
|
341939
341939
|
if (callData === "0x")
|
|
341940
341940
|
throw new AbiDecodingZeroDataError();
|
|
341941
341941
|
if (!success)
|
|
341942
341942
|
throw new RawContractError({ data: returnData });
|
|
341943
341943
|
const result2 = decodeFunctionResult({
|
|
341944
|
-
abi:
|
|
341944
|
+
abi: abi36,
|
|
341945
341945
|
args,
|
|
341946
341946
|
data: returnData,
|
|
341947
341947
|
functionName
|
|
@@ -341949,7 +341949,7 @@ async function multicall(client, parameters) {
|
|
|
341949
341949
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
341950
341950
|
} catch (err) {
|
|
341951
341951
|
const error = getContractError(err, {
|
|
341952
|
-
abi:
|
|
341952
|
+
abi: abi36,
|
|
341953
341953
|
address,
|
|
341954
341954
|
args,
|
|
341955
341955
|
docsPath: "/docs/contract/multicall",
|
|
@@ -342488,13 +342488,13 @@ async function simulateBlocks(client, parameters) {
|
|
|
342488
342488
|
return result.map((block2, i) => ({
|
|
342489
342489
|
...formatBlock(block2),
|
|
342490
342490
|
calls: block2.calls.map((call2, j) => {
|
|
342491
|
-
const { abi:
|
|
342491
|
+
const { abi: abi36, args, functionName, to } = blocks[i].calls[j];
|
|
342492
342492
|
const data = call2.error?.data ?? call2.returnData;
|
|
342493
342493
|
const gasUsed = BigInt(call2.gasUsed);
|
|
342494
342494
|
const logs = call2.logs?.map((log2) => formatLog(log2));
|
|
342495
342495
|
const status = call2.status === "0x1" ? "success" : "failure";
|
|
342496
|
-
const result2 =
|
|
342497
|
-
abi:
|
|
342496
|
+
const result2 = abi36 && status === "success" ? decodeFunctionResult({
|
|
342497
|
+
abi: abi36,
|
|
342498
342498
|
data,
|
|
342499
342499
|
functionName
|
|
342500
342500
|
}) : null;
|
|
@@ -342509,7 +342509,7 @@ async function simulateBlocks(client, parameters) {
|
|
|
342509
342509
|
if (!error2)
|
|
342510
342510
|
return void 0;
|
|
342511
342511
|
return getContractError(error2, {
|
|
342512
|
-
abi:
|
|
342512
|
+
abi: abi36 ?? [],
|
|
342513
342513
|
address: to,
|
|
342514
342514
|
args,
|
|
342515
342515
|
functionName: functionName ?? "<unknown>"
|
|
@@ -342786,10 +342786,10 @@ function from2(abiItem, options = {}) {
|
|
|
342786
342786
|
...prepare ? { hash: getSignatureHash(item) } : {}
|
|
342787
342787
|
};
|
|
342788
342788
|
}
|
|
342789
|
-
function fromAbi(
|
|
342789
|
+
function fromAbi(abi36, name, options) {
|
|
342790
342790
|
const { args = [], prepare = true } = options ?? {};
|
|
342791
342791
|
const isSelector = validate(name, { strict: false });
|
|
342792
|
-
const abiItems =
|
|
342792
|
+
const abiItems = abi36.filter((abiItem2) => {
|
|
342793
342793
|
if (isSelector) {
|
|
342794
342794
|
if (abiItem2.type === "function" || abiItem2.type === "error")
|
|
342795
342795
|
return getSelector(abiItem2) === slice2(name, 0, 4);
|
|
@@ -343389,8 +343389,8 @@ function encodeData2(abiFunction, ...args) {
|
|
|
343389
343389
|
function from4(abiFunction, options = {}) {
|
|
343390
343390
|
return from2(abiFunction, options);
|
|
343391
343391
|
}
|
|
343392
|
-
function fromAbi2(
|
|
343393
|
-
const item = fromAbi(
|
|
343392
|
+
function fromAbi2(abi36, name, options) {
|
|
343393
|
+
const item = fromAbi(abi36, name, options);
|
|
343394
343394
|
if (item.type !== "function")
|
|
343395
343395
|
throw new NotFoundError({ name, type: "function" });
|
|
343396
343396
|
return item;
|
|
@@ -344809,8 +344809,8 @@ function createTestClient(parameters) {
|
|
|
344809
344809
|
// ../../node_modules/viem/_esm/actions/wallet/deployContract.js
|
|
344810
344810
|
init_encodeDeployData();
|
|
344811
344811
|
function deployContract(walletClient, parameters) {
|
|
344812
|
-
const { abi:
|
|
344813
|
-
const calldata = encodeDeployData({ abi:
|
|
344812
|
+
const { abi: abi36, args, bytecode, ...request } = parameters;
|
|
344813
|
+
const calldata = encodeDeployData({ abi: abi36, args, bytecode });
|
|
344814
344814
|
return sendTransaction(walletClient, {
|
|
344815
344815
|
...request,
|
|
344816
344816
|
data: calldata
|
|
@@ -354111,328 +354111,6 @@ var balancerV2VaultAdapterAbi = [
|
|
|
354111
354111
|
{ type: "error", inputs: [], name: "PoolNotSupportedException" },
|
|
354112
354112
|
{ type: "error", inputs: [], name: "ZeroAddressException" }
|
|
354113
354113
|
];
|
|
354114
|
-
var botListV3Abi = [
|
|
354115
|
-
{
|
|
354116
|
-
type: "constructor",
|
|
354117
|
-
inputs: [
|
|
354118
|
-
{ name: "addressProvider", internalType: "address", type: "address" }
|
|
354119
|
-
],
|
|
354120
|
-
stateMutability: "nonpayable"
|
|
354121
|
-
},
|
|
354122
|
-
{
|
|
354123
|
-
type: "function",
|
|
354124
|
-
inputs: [],
|
|
354125
|
-
name: "acl",
|
|
354126
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
354127
|
-
stateMutability: "view"
|
|
354128
|
-
},
|
|
354129
|
-
{
|
|
354130
|
-
type: "function",
|
|
354131
|
-
inputs: [
|
|
354132
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354133
|
-
{ name: "creditAccount", internalType: "address", type: "address" }
|
|
354134
|
-
],
|
|
354135
|
-
name: "activeBots",
|
|
354136
|
-
outputs: [{ name: "", internalType: "address[]", type: "address[]" }],
|
|
354137
|
-
stateMutability: "view"
|
|
354138
|
-
},
|
|
354139
|
-
{
|
|
354140
|
-
type: "function",
|
|
354141
|
-
inputs: [{ name: "", internalType: "address", type: "address" }],
|
|
354142
|
-
name: "approvedCreditManager",
|
|
354143
|
-
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
354144
|
-
stateMutability: "view"
|
|
354145
|
-
},
|
|
354146
|
-
{
|
|
354147
|
-
type: "function",
|
|
354148
|
-
inputs: [{ name: "bot", internalType: "address", type: "address" }],
|
|
354149
|
-
name: "botForbiddenStatus",
|
|
354150
|
-
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
354151
|
-
stateMutability: "view"
|
|
354152
|
-
},
|
|
354153
|
-
{
|
|
354154
|
-
type: "function",
|
|
354155
|
-
inputs: [
|
|
354156
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354157
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354158
|
-
{ name: "creditAccount", internalType: "address", type: "address" }
|
|
354159
|
-
],
|
|
354160
|
-
name: "botPermissions",
|
|
354161
|
-
outputs: [{ name: "", internalType: "uint192", type: "uint192" }],
|
|
354162
|
-
stateMutability: "view"
|
|
354163
|
-
},
|
|
354164
|
-
{
|
|
354165
|
-
type: "function",
|
|
354166
|
-
inputs: [
|
|
354167
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354168
|
-
{ name: "creditManager", internalType: "address", type: "address" }
|
|
354169
|
-
],
|
|
354170
|
-
name: "botSpecialPermissions",
|
|
354171
|
-
outputs: [{ name: "", internalType: "uint192", type: "uint192" }],
|
|
354172
|
-
stateMutability: "view"
|
|
354173
|
-
},
|
|
354174
|
-
{
|
|
354175
|
-
type: "function",
|
|
354176
|
-
inputs: [],
|
|
354177
|
-
name: "contractsRegister",
|
|
354178
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
354179
|
-
stateMutability: "view"
|
|
354180
|
-
},
|
|
354181
|
-
{
|
|
354182
|
-
type: "function",
|
|
354183
|
-
inputs: [],
|
|
354184
|
-
name: "controller",
|
|
354185
|
-
outputs: [{ name: "", internalType: "address", type: "address" }],
|
|
354186
|
-
stateMutability: "view"
|
|
354187
|
-
},
|
|
354188
|
-
{
|
|
354189
|
-
type: "function",
|
|
354190
|
-
inputs: [
|
|
354191
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354192
|
-
{ name: "creditAccount", internalType: "address", type: "address" }
|
|
354193
|
-
],
|
|
354194
|
-
name: "eraseAllBotPermissions",
|
|
354195
|
-
outputs: [],
|
|
354196
|
-
stateMutability: "nonpayable"
|
|
354197
|
-
},
|
|
354198
|
-
{
|
|
354199
|
-
type: "function",
|
|
354200
|
-
inputs: [
|
|
354201
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354202
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354203
|
-
{ name: "creditAccount", internalType: "address", type: "address" }
|
|
354204
|
-
],
|
|
354205
|
-
name: "getBotStatus",
|
|
354206
|
-
outputs: [
|
|
354207
|
-
{ name: "permissions", internalType: "uint192", type: "uint192" },
|
|
354208
|
-
{ name: "forbidden", internalType: "bool", type: "bool" },
|
|
354209
|
-
{ name: "hasSpecialPermissions", internalType: "bool", type: "bool" }
|
|
354210
|
-
],
|
|
354211
|
-
stateMutability: "view"
|
|
354212
|
-
},
|
|
354213
|
-
{
|
|
354214
|
-
type: "function",
|
|
354215
|
-
inputs: [],
|
|
354216
|
-
name: "pause",
|
|
354217
|
-
outputs: [],
|
|
354218
|
-
stateMutability: "nonpayable"
|
|
354219
|
-
},
|
|
354220
|
-
{
|
|
354221
|
-
type: "function",
|
|
354222
|
-
inputs: [],
|
|
354223
|
-
name: "paused",
|
|
354224
|
-
outputs: [{ name: "", internalType: "bool", type: "bool" }],
|
|
354225
|
-
stateMutability: "view"
|
|
354226
|
-
},
|
|
354227
|
-
{
|
|
354228
|
-
type: "function",
|
|
354229
|
-
inputs: [
|
|
354230
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354231
|
-
{ name: "forbidden", internalType: "bool", type: "bool" }
|
|
354232
|
-
],
|
|
354233
|
-
name: "setBotForbiddenStatus",
|
|
354234
|
-
outputs: [],
|
|
354235
|
-
stateMutability: "nonpayable"
|
|
354236
|
-
},
|
|
354237
|
-
{
|
|
354238
|
-
type: "function",
|
|
354239
|
-
inputs: [
|
|
354240
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354241
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354242
|
-
{ name: "creditAccount", internalType: "address", type: "address" },
|
|
354243
|
-
{ name: "permissions", internalType: "uint192", type: "uint192" }
|
|
354244
|
-
],
|
|
354245
|
-
name: "setBotPermissions",
|
|
354246
|
-
outputs: [
|
|
354247
|
-
{ name: "activeBotsRemaining", internalType: "uint256", type: "uint256" }
|
|
354248
|
-
],
|
|
354249
|
-
stateMutability: "nonpayable"
|
|
354250
|
-
},
|
|
354251
|
-
{
|
|
354252
|
-
type: "function",
|
|
354253
|
-
inputs: [
|
|
354254
|
-
{ name: "bot", internalType: "address", type: "address" },
|
|
354255
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354256
|
-
{ name: "permissions", internalType: "uint192", type: "uint192" }
|
|
354257
|
-
],
|
|
354258
|
-
name: "setBotSpecialPermissions",
|
|
354259
|
-
outputs: [],
|
|
354260
|
-
stateMutability: "nonpayable"
|
|
354261
|
-
},
|
|
354262
|
-
{
|
|
354263
|
-
type: "function",
|
|
354264
|
-
inputs: [
|
|
354265
|
-
{ name: "newController", internalType: "address", type: "address" }
|
|
354266
|
-
],
|
|
354267
|
-
name: "setController",
|
|
354268
|
-
outputs: [],
|
|
354269
|
-
stateMutability: "nonpayable"
|
|
354270
|
-
},
|
|
354271
|
-
{
|
|
354272
|
-
type: "function",
|
|
354273
|
-
inputs: [
|
|
354274
|
-
{ name: "creditManager", internalType: "address", type: "address" },
|
|
354275
|
-
{ name: "approved", internalType: "bool", type: "bool" }
|
|
354276
|
-
],
|
|
354277
|
-
name: "setCreditManagerApprovedStatus",
|
|
354278
|
-
outputs: [],
|
|
354279
|
-
stateMutability: "nonpayable"
|
|
354280
|
-
},
|
|
354281
|
-
{
|
|
354282
|
-
type: "function",
|
|
354283
|
-
inputs: [],
|
|
354284
|
-
name: "unpause",
|
|
354285
|
-
outputs: [],
|
|
354286
|
-
stateMutability: "nonpayable"
|
|
354287
|
-
},
|
|
354288
|
-
{
|
|
354289
|
-
type: "function",
|
|
354290
|
-
inputs: [],
|
|
354291
|
-
name: "version",
|
|
354292
|
-
outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
|
|
354293
|
-
stateMutability: "view"
|
|
354294
|
-
},
|
|
354295
|
-
{
|
|
354296
|
-
type: "event",
|
|
354297
|
-
anonymous: false,
|
|
354298
|
-
inputs: [
|
|
354299
|
-
{ name: "bot", internalType: "address", type: "address", indexed: true },
|
|
354300
|
-
{
|
|
354301
|
-
name: "creditManager",
|
|
354302
|
-
internalType: "address",
|
|
354303
|
-
type: "address",
|
|
354304
|
-
indexed: true
|
|
354305
|
-
},
|
|
354306
|
-
{
|
|
354307
|
-
name: "creditAccount",
|
|
354308
|
-
internalType: "address",
|
|
354309
|
-
type: "address",
|
|
354310
|
-
indexed: true
|
|
354311
|
-
}
|
|
354312
|
-
],
|
|
354313
|
-
name: "EraseBot"
|
|
354314
|
-
},
|
|
354315
|
-
{
|
|
354316
|
-
type: "event",
|
|
354317
|
-
anonymous: false,
|
|
354318
|
-
inputs: [
|
|
354319
|
-
{
|
|
354320
|
-
name: "newController",
|
|
354321
|
-
internalType: "address",
|
|
354322
|
-
type: "address",
|
|
354323
|
-
indexed: true
|
|
354324
|
-
}
|
|
354325
|
-
],
|
|
354326
|
-
name: "NewController"
|
|
354327
|
-
},
|
|
354328
|
-
{
|
|
354329
|
-
type: "event",
|
|
354330
|
-
anonymous: false,
|
|
354331
|
-
inputs: [
|
|
354332
|
-
{
|
|
354333
|
-
name: "account",
|
|
354334
|
-
internalType: "address",
|
|
354335
|
-
type: "address",
|
|
354336
|
-
indexed: false
|
|
354337
|
-
}
|
|
354338
|
-
],
|
|
354339
|
-
name: "Paused"
|
|
354340
|
-
},
|
|
354341
|
-
{
|
|
354342
|
-
type: "event",
|
|
354343
|
-
anonymous: false,
|
|
354344
|
-
inputs: [
|
|
354345
|
-
{ name: "bot", internalType: "address", type: "address", indexed: true },
|
|
354346
|
-
{ name: "forbidden", internalType: "bool", type: "bool", indexed: false }
|
|
354347
|
-
],
|
|
354348
|
-
name: "SetBotForbiddenStatus"
|
|
354349
|
-
},
|
|
354350
|
-
{
|
|
354351
|
-
type: "event",
|
|
354352
|
-
anonymous: false,
|
|
354353
|
-
inputs: [
|
|
354354
|
-
{ name: "bot", internalType: "address", type: "address", indexed: true },
|
|
354355
|
-
{
|
|
354356
|
-
name: "creditManager",
|
|
354357
|
-
internalType: "address",
|
|
354358
|
-
type: "address",
|
|
354359
|
-
indexed: true
|
|
354360
|
-
},
|
|
354361
|
-
{
|
|
354362
|
-
name: "creditAccount",
|
|
354363
|
-
internalType: "address",
|
|
354364
|
-
type: "address",
|
|
354365
|
-
indexed: true
|
|
354366
|
-
},
|
|
354367
|
-
{
|
|
354368
|
-
name: "permissions",
|
|
354369
|
-
internalType: "uint192",
|
|
354370
|
-
type: "uint192",
|
|
354371
|
-
indexed: false
|
|
354372
|
-
}
|
|
354373
|
-
],
|
|
354374
|
-
name: "SetBotPermissions"
|
|
354375
|
-
},
|
|
354376
|
-
{
|
|
354377
|
-
type: "event",
|
|
354378
|
-
anonymous: false,
|
|
354379
|
-
inputs: [
|
|
354380
|
-
{ name: "bot", internalType: "address", type: "address", indexed: true },
|
|
354381
|
-
{
|
|
354382
|
-
name: "creditManager",
|
|
354383
|
-
internalType: "address",
|
|
354384
|
-
type: "address",
|
|
354385
|
-
indexed: true
|
|
354386
|
-
},
|
|
354387
|
-
{
|
|
354388
|
-
name: "permissions",
|
|
354389
|
-
internalType: "uint192",
|
|
354390
|
-
type: "uint192",
|
|
354391
|
-
indexed: false
|
|
354392
|
-
}
|
|
354393
|
-
],
|
|
354394
|
-
name: "SetBotSpecialPermissions"
|
|
354395
|
-
},
|
|
354396
|
-
{
|
|
354397
|
-
type: "event",
|
|
354398
|
-
anonymous: false,
|
|
354399
|
-
inputs: [
|
|
354400
|
-
{
|
|
354401
|
-
name: "creditManager",
|
|
354402
|
-
internalType: "address",
|
|
354403
|
-
type: "address",
|
|
354404
|
-
indexed: true
|
|
354405
|
-
},
|
|
354406
|
-
{ name: "approved", internalType: "bool", type: "bool", indexed: false }
|
|
354407
|
-
],
|
|
354408
|
-
name: "SetCreditManagerApprovedStatus"
|
|
354409
|
-
},
|
|
354410
|
-
{
|
|
354411
|
-
type: "event",
|
|
354412
|
-
anonymous: false,
|
|
354413
|
-
inputs: [
|
|
354414
|
-
{
|
|
354415
|
-
name: "account",
|
|
354416
|
-
internalType: "address",
|
|
354417
|
-
type: "address",
|
|
354418
|
-
indexed: false
|
|
354419
|
-
}
|
|
354420
|
-
],
|
|
354421
|
-
name: "Unpaused"
|
|
354422
|
-
},
|
|
354423
|
-
{
|
|
354424
|
-
type: "error",
|
|
354425
|
-
inputs: [{ name: "", internalType: "address", type: "address" }],
|
|
354426
|
-
name: "AddressIsNotContractException"
|
|
354427
|
-
},
|
|
354428
|
-
{ type: "error", inputs: [], name: "CallerNotConfiguratorException" },
|
|
354429
|
-
{ type: "error", inputs: [], name: "CallerNotCreditFacadeException" },
|
|
354430
|
-
{ type: "error", inputs: [], name: "CallerNotPausableAdminException" },
|
|
354431
|
-
{ type: "error", inputs: [], name: "CallerNotUnpausableAdminException" },
|
|
354432
|
-
{ type: "error", inputs: [], name: "InvalidBotException" },
|
|
354433
|
-
{ type: "error", inputs: [], name: "RegisteredCreditManagerOnlyException" },
|
|
354434
|
-
{ type: "error", inputs: [], name: "ZeroAddressException" }
|
|
354435
|
-
];
|
|
354436
354114
|
var camelotV3AdapterAbi = [
|
|
354437
354115
|
{
|
|
354438
354116
|
type: "constructor",
|
|
@@ -362791,6 +362469,221 @@ var iAddressProviderV300Abi = [
|
|
|
362791
362469
|
anonymous: false
|
|
362792
362470
|
}
|
|
362793
362471
|
];
|
|
362472
|
+
var iBotListV300Abi = [
|
|
362473
|
+
{
|
|
362474
|
+
type: "function",
|
|
362475
|
+
name: "activeBots",
|
|
362476
|
+
inputs: [
|
|
362477
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362478
|
+
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
362479
|
+
],
|
|
362480
|
+
outputs: [{ name: "", type: "address[]", internalType: "address[]" }],
|
|
362481
|
+
stateMutability: "view"
|
|
362482
|
+
},
|
|
362483
|
+
{
|
|
362484
|
+
type: "function",
|
|
362485
|
+
name: "approvedCreditManager",
|
|
362486
|
+
inputs: [
|
|
362487
|
+
{ name: "creditManager", type: "address", internalType: "address" }
|
|
362488
|
+
],
|
|
362489
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
362490
|
+
stateMutability: "view"
|
|
362491
|
+
},
|
|
362492
|
+
{
|
|
362493
|
+
type: "function",
|
|
362494
|
+
name: "botForbiddenStatus",
|
|
362495
|
+
inputs: [{ name: "bot", type: "address", internalType: "address" }],
|
|
362496
|
+
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
362497
|
+
stateMutability: "view"
|
|
362498
|
+
},
|
|
362499
|
+
{
|
|
362500
|
+
type: "function",
|
|
362501
|
+
name: "botPermissions",
|
|
362502
|
+
inputs: [
|
|
362503
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362504
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362505
|
+
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
362506
|
+
],
|
|
362507
|
+
outputs: [{ name: "", type: "uint192", internalType: "uint192" }],
|
|
362508
|
+
stateMutability: "view"
|
|
362509
|
+
},
|
|
362510
|
+
{
|
|
362511
|
+
type: "function",
|
|
362512
|
+
name: "botSpecialPermissions",
|
|
362513
|
+
inputs: [
|
|
362514
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362515
|
+
{ name: "creditManager", type: "address", internalType: "address" }
|
|
362516
|
+
],
|
|
362517
|
+
outputs: [{ name: "", type: "uint192", internalType: "uint192" }],
|
|
362518
|
+
stateMutability: "view"
|
|
362519
|
+
},
|
|
362520
|
+
{
|
|
362521
|
+
type: "function",
|
|
362522
|
+
name: "eraseAllBotPermissions",
|
|
362523
|
+
inputs: [
|
|
362524
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362525
|
+
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
362526
|
+
],
|
|
362527
|
+
outputs: [],
|
|
362528
|
+
stateMutability: "nonpayable"
|
|
362529
|
+
},
|
|
362530
|
+
{
|
|
362531
|
+
type: "function",
|
|
362532
|
+
name: "getBotStatus",
|
|
362533
|
+
inputs: [
|
|
362534
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362535
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362536
|
+
{ name: "creditAccount", type: "address", internalType: "address" }
|
|
362537
|
+
],
|
|
362538
|
+
outputs: [
|
|
362539
|
+
{ name: "permissions", type: "uint192", internalType: "uint192" },
|
|
362540
|
+
{ name: "forbidden", type: "bool", internalType: "bool" },
|
|
362541
|
+
{ name: "hasSpecialPermissions", type: "bool", internalType: "bool" }
|
|
362542
|
+
],
|
|
362543
|
+
stateMutability: "view"
|
|
362544
|
+
},
|
|
362545
|
+
{
|
|
362546
|
+
type: "function",
|
|
362547
|
+
name: "setBotForbiddenStatus",
|
|
362548
|
+
inputs: [
|
|
362549
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362550
|
+
{ name: "forbidden", type: "bool", internalType: "bool" }
|
|
362551
|
+
],
|
|
362552
|
+
outputs: [],
|
|
362553
|
+
stateMutability: "nonpayable"
|
|
362554
|
+
},
|
|
362555
|
+
{
|
|
362556
|
+
type: "function",
|
|
362557
|
+
name: "setBotPermissions",
|
|
362558
|
+
inputs: [
|
|
362559
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362560
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362561
|
+
{ name: "creditAccount", type: "address", internalType: "address" },
|
|
362562
|
+
{ name: "permissions", type: "uint192", internalType: "uint192" }
|
|
362563
|
+
],
|
|
362564
|
+
outputs: [
|
|
362565
|
+
{ name: "activeBotsRemaining", type: "uint256", internalType: "uint256" }
|
|
362566
|
+
],
|
|
362567
|
+
stateMutability: "nonpayable"
|
|
362568
|
+
},
|
|
362569
|
+
{
|
|
362570
|
+
type: "function",
|
|
362571
|
+
name: "setBotSpecialPermissions",
|
|
362572
|
+
inputs: [
|
|
362573
|
+
{ name: "bot", type: "address", internalType: "address" },
|
|
362574
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362575
|
+
{ name: "permissions", type: "uint192", internalType: "uint192" }
|
|
362576
|
+
],
|
|
362577
|
+
outputs: [],
|
|
362578
|
+
stateMutability: "nonpayable"
|
|
362579
|
+
},
|
|
362580
|
+
{
|
|
362581
|
+
type: "function",
|
|
362582
|
+
name: "setCreditManagerApprovedStatus",
|
|
362583
|
+
inputs: [
|
|
362584
|
+
{ name: "creditManager", type: "address", internalType: "address" },
|
|
362585
|
+
{ name: "approved", type: "bool", internalType: "bool" }
|
|
362586
|
+
],
|
|
362587
|
+
outputs: [],
|
|
362588
|
+
stateMutability: "nonpayable"
|
|
362589
|
+
},
|
|
362590
|
+
{
|
|
362591
|
+
type: "function",
|
|
362592
|
+
name: "version",
|
|
362593
|
+
inputs: [],
|
|
362594
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
362595
|
+
stateMutability: "view"
|
|
362596
|
+
},
|
|
362597
|
+
{
|
|
362598
|
+
type: "event",
|
|
362599
|
+
name: "EraseBot",
|
|
362600
|
+
inputs: [
|
|
362601
|
+
{ name: "bot", type: "address", indexed: true, internalType: "address" },
|
|
362602
|
+
{
|
|
362603
|
+
name: "creditManager",
|
|
362604
|
+
type: "address",
|
|
362605
|
+
indexed: true,
|
|
362606
|
+
internalType: "address"
|
|
362607
|
+
},
|
|
362608
|
+
{
|
|
362609
|
+
name: "creditAccount",
|
|
362610
|
+
type: "address",
|
|
362611
|
+
indexed: true,
|
|
362612
|
+
internalType: "address"
|
|
362613
|
+
}
|
|
362614
|
+
],
|
|
362615
|
+
anonymous: false
|
|
362616
|
+
},
|
|
362617
|
+
{
|
|
362618
|
+
type: "event",
|
|
362619
|
+
name: "SetBotForbiddenStatus",
|
|
362620
|
+
inputs: [
|
|
362621
|
+
{ name: "bot", type: "address", indexed: true, internalType: "address" },
|
|
362622
|
+
{ name: "forbidden", type: "bool", indexed: false, internalType: "bool" }
|
|
362623
|
+
],
|
|
362624
|
+
anonymous: false
|
|
362625
|
+
},
|
|
362626
|
+
{
|
|
362627
|
+
type: "event",
|
|
362628
|
+
name: "SetBotPermissions",
|
|
362629
|
+
inputs: [
|
|
362630
|
+
{ name: "bot", type: "address", indexed: true, internalType: "address" },
|
|
362631
|
+
{
|
|
362632
|
+
name: "creditManager",
|
|
362633
|
+
type: "address",
|
|
362634
|
+
indexed: true,
|
|
362635
|
+
internalType: "address"
|
|
362636
|
+
},
|
|
362637
|
+
{
|
|
362638
|
+
name: "creditAccount",
|
|
362639
|
+
type: "address",
|
|
362640
|
+
indexed: true,
|
|
362641
|
+
internalType: "address"
|
|
362642
|
+
},
|
|
362643
|
+
{
|
|
362644
|
+
name: "permissions",
|
|
362645
|
+
type: "uint192",
|
|
362646
|
+
indexed: false,
|
|
362647
|
+
internalType: "uint192"
|
|
362648
|
+
}
|
|
362649
|
+
],
|
|
362650
|
+
anonymous: false
|
|
362651
|
+
},
|
|
362652
|
+
{
|
|
362653
|
+
type: "event",
|
|
362654
|
+
name: "SetBotSpecialPermissions",
|
|
362655
|
+
inputs: [
|
|
362656
|
+
{ name: "bot", type: "address", indexed: true, internalType: "address" },
|
|
362657
|
+
{
|
|
362658
|
+
name: "creditManager",
|
|
362659
|
+
type: "address",
|
|
362660
|
+
indexed: true,
|
|
362661
|
+
internalType: "address"
|
|
362662
|
+
},
|
|
362663
|
+
{
|
|
362664
|
+
name: "permissions",
|
|
362665
|
+
type: "uint192",
|
|
362666
|
+
indexed: false,
|
|
362667
|
+
internalType: "uint192"
|
|
362668
|
+
}
|
|
362669
|
+
],
|
|
362670
|
+
anonymous: false
|
|
362671
|
+
},
|
|
362672
|
+
{
|
|
362673
|
+
type: "event",
|
|
362674
|
+
name: "SetCreditManagerApprovedStatus",
|
|
362675
|
+
inputs: [
|
|
362676
|
+
{
|
|
362677
|
+
name: "creditManager",
|
|
362678
|
+
type: "address",
|
|
362679
|
+
indexed: true,
|
|
362680
|
+
internalType: "address"
|
|
362681
|
+
},
|
|
362682
|
+
{ name: "approved", type: "bool", indexed: false, internalType: "bool" }
|
|
362683
|
+
],
|
|
362684
|
+
anonymous: false
|
|
362685
|
+
}
|
|
362686
|
+
];
|
|
362794
362687
|
var iCreditConfiguratorV300Abi = [
|
|
362795
362688
|
{
|
|
362796
362689
|
type: "function",
|
|
@@ -370621,8 +370514,7 @@ var ADDRESS_PROVIDER_BLOCK = {
|
|
|
370621
370514
|
Arbitrum: 184650310n,
|
|
370622
370515
|
Optimism: 118410666n,
|
|
370623
370516
|
Base: 0n,
|
|
370624
|
-
Sonic:
|
|
370625
|
-
// TODO: this is arbitrary block, to avoid staring from zero
|
|
370517
|
+
Sonic: 9779380n
|
|
370626
370518
|
};
|
|
370627
370519
|
var BLOCK_DURATION_BY_NETWORK = {
|
|
370628
370520
|
Mainnet: 12.05,
|
|
@@ -370773,12 +370665,12 @@ var json_parse = (s) => {
|
|
|
370773
370665
|
function createRawTx(to, parameters, description) {
|
|
370774
370666
|
const { args } = parameters;
|
|
370775
370667
|
const fname = parameters.functionName;
|
|
370776
|
-
const { abi:
|
|
370668
|
+
const { abi: abi36, functionName } = (() => {
|
|
370777
370669
|
if (parameters.abi.length === 1 && parameters.functionName?.startsWith("0x"))
|
|
370778
370670
|
return parameters;
|
|
370779
370671
|
return prepareEncodeFunctionData(parameters);
|
|
370780
370672
|
})();
|
|
370781
|
-
const abiItem =
|
|
370673
|
+
const abiItem = abi36[0];
|
|
370782
370674
|
const signature = functionName;
|
|
370783
370675
|
const data = "inputs" in abiItem && abiItem.inputs ? encodeAbiParameters(abiItem.inputs, args ?? []) : void 0;
|
|
370784
370676
|
const functionEncodedData = concatHex([signature, data ?? "0x"]);
|
|
@@ -372329,9 +372221,9 @@ async function simulateMulticall(client, parameters) {
|
|
|
372329
372221
|
let currentChunk = 0;
|
|
372330
372222
|
let currentChunkSize = 0;
|
|
372331
372223
|
for (const contract of contracts2) {
|
|
372332
|
-
const { abi:
|
|
372224
|
+
const { abi: abi36, address, args, functionName } = contract;
|
|
372333
372225
|
try {
|
|
372334
|
-
const callData = encodeFunctionData({ abi:
|
|
372226
|
+
const callData = encodeFunctionData({ abi: abi36, args, functionName });
|
|
372335
372227
|
currentChunkSize += (callData.length - 2) / 2;
|
|
372336
372228
|
if (
|
|
372337
372229
|
// Check if batching is enabled.
|
|
@@ -372353,7 +372245,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
372353
372245
|
];
|
|
372354
372246
|
} catch (err) {
|
|
372355
372247
|
const error = getContractError(err, {
|
|
372356
|
-
abi:
|
|
372248
|
+
abi: abi36,
|
|
372357
372249
|
address,
|
|
372358
372250
|
args,
|
|
372359
372251
|
docsPath: "/docs/contract/multicall",
|
|
@@ -372410,12 +372302,12 @@ async function simulateMulticall(client, parameters) {
|
|
|
372410
372302
|
for (let j = 0; j < aggregate3Result.length; j++) {
|
|
372411
372303
|
const { returnData, success } = aggregate3Result[j];
|
|
372412
372304
|
const { callData } = chunkedCalls[i][j];
|
|
372413
|
-
const { abi:
|
|
372305
|
+
const { abi: abi36, address, functionName, args } = contracts2[results.length];
|
|
372414
372306
|
try {
|
|
372415
372307
|
if (callData === "0x") throw new AbiDecodingZeroDataError();
|
|
372416
372308
|
if (!success) throw new RawContractError({ data: returnData });
|
|
372417
372309
|
const result2 = decodeFunctionResult({
|
|
372418
|
-
abi:
|
|
372310
|
+
abi: abi36,
|
|
372419
372311
|
args,
|
|
372420
372312
|
data: returnData,
|
|
372421
372313
|
functionName
|
|
@@ -372423,7 +372315,7 @@ async function simulateMulticall(client, parameters) {
|
|
|
372423
372315
|
results.push(allowFailure ? { result: result2, status: "success" } : result2);
|
|
372424
372316
|
} catch (err) {
|
|
372425
372317
|
const error = getContractError(err, {
|
|
372426
|
-
abi:
|
|
372318
|
+
abi: abi36,
|
|
372427
372319
|
address,
|
|
372428
372320
|
args,
|
|
372429
372321
|
docsPath: "/docs/contract/multicall",
|
|
@@ -381718,13 +381610,15 @@ var AbstractAddressProviderContract = class extends BaseContract {
|
|
|
381718
381610
|
this.#addresses = addresses;
|
|
381719
381611
|
}
|
|
381720
381612
|
setInternalAddress(key, address, version4) {
|
|
381721
|
-
|
|
381722
|
-
|
|
381613
|
+
let k = isHex(key) ? hexToString(key, { size: 32 }) : key;
|
|
381614
|
+
if (!this.#addresses[k]) {
|
|
381615
|
+
this.#addresses[k] = {};
|
|
381723
381616
|
}
|
|
381724
|
-
this.#addresses[
|
|
381725
|
-
if (!this.#latest[
|
|
381726
|
-
this.#latest[
|
|
381617
|
+
this.#addresses[k][version4] = address;
|
|
381618
|
+
if (!this.#latest[k] || version4 > this.#latest[key]) {
|
|
381619
|
+
this.#latest[k] = version4;
|
|
381727
381620
|
}
|
|
381621
|
+
this.logger?.debug(`Set address for ${k}@${version4} to ${address}`);
|
|
381728
381622
|
}
|
|
381729
381623
|
getAddress(contract, version4 = NO_VERSION) {
|
|
381730
381624
|
if (!this.#addresses[contract]) {
|
|
@@ -381930,11 +381824,12 @@ async function getAddressProvider(sdk, address, options) {
|
|
|
381930
381824
|
throw new Error(`Unsupported address provider version: ${v}`);
|
|
381931
381825
|
}
|
|
381932
381826
|
}
|
|
381827
|
+
var abi35 = iBotListV300Abi;
|
|
381933
381828
|
var BotListContract = class extends BaseContract {
|
|
381934
381829
|
#approvedCreditManagers;
|
|
381935
381830
|
#currentBlock;
|
|
381936
381831
|
constructor(sdk, address) {
|
|
381937
|
-
super(sdk, { addr: address, name: "BotListV3", abi:
|
|
381832
|
+
super(sdk, { addr: address, name: "BotListV3", abi: abi35 });
|
|
381938
381833
|
this.#currentBlock = ADDRESS_PROVIDER_BLOCK[sdk.provider.networkType];
|
|
381939
381834
|
}
|
|
381940
381835
|
parseFunctionParams(params) {
|
|
@@ -399845,7 +399740,7 @@ function normalizeTransactions(batch) {
|
|
|
399845
399740
|
});
|
|
399846
399741
|
}
|
|
399847
399742
|
function normalizeDirectTx(t) {
|
|
399848
|
-
const
|
|
399743
|
+
const abi36 = [
|
|
399849
399744
|
{
|
|
399850
399745
|
type: "function",
|
|
399851
399746
|
outputs: [],
|
|
@@ -399867,10 +399762,10 @@ function normalizeDirectTx(t) {
|
|
|
399867
399762
|
return {
|
|
399868
399763
|
target: t.to,
|
|
399869
399764
|
value: t.value,
|
|
399870
|
-
signature: formatAbiItem2(
|
|
399765
|
+
signature: formatAbiItem2(abi36[0], { includeName: false }),
|
|
399871
399766
|
parameters,
|
|
399872
399767
|
data: encodeFunctionData({
|
|
399873
|
-
abi:
|
|
399768
|
+
abi: abi36,
|
|
399874
399769
|
functionName: t.contractMethod.name,
|
|
399875
399770
|
args: values
|
|
399876
399771
|
})
|
|
@@ -411337,9 +411232,9 @@ var AbstractParser = class {
|
|
|
411337
411232
|
};
|
|
411338
411233
|
}
|
|
411339
411234
|
parseConstructor(address, encodedArgs) {
|
|
411340
|
-
for (const { abi:
|
|
411235
|
+
for (const { abi: abi36, comment } of this.constructorAbis) {
|
|
411341
411236
|
try {
|
|
411342
|
-
return this.#parseConstructor(address, encodedArgs,
|
|
411237
|
+
return this.#parseConstructor(address, encodedArgs, abi36, comment);
|
|
411343
411238
|
} catch (e) {
|
|
411344
411239
|
this.logger.warn(`constructor ${comment} of ${address} failed to parse args: ${e}`);
|
|
411345
411240
|
}
|
|
@@ -415430,7 +415325,7 @@ function getRenderer(opts) {
|
|
|
415430
415325
|
var package_default = {
|
|
415431
415326
|
name: "@gearbox-protocol/deploy-tools",
|
|
415432
415327
|
description: "Gearbox deploy tools",
|
|
415433
|
-
version: "5.13.
|
|
415328
|
+
version: "5.13.5",
|
|
415434
415329
|
homepage: "https://gearbox.fi",
|
|
415435
415330
|
keywords: [
|
|
415436
415331
|
"gearbox"
|
|
@@ -415473,7 +415368,7 @@ var package_default = {
|
|
|
415473
415368
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
415474
415369
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
415475
415370
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
415476
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
415371
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.264",
|
|
415477
415372
|
"@gearbox-protocol/sdk-gov": "^2.35.0",
|
|
415478
415373
|
"@types/lodash-es": "^4.17.12",
|
|
415479
415374
|
"@types/node": "^22.13.4",
|