@gearbox-protocol/deploy-tools 5.16.0 → 5.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +322 -23
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -155123,7 +155123,7 @@ var require_structs = __commonJS({
|
|
|
155123
155123
|
}
|
|
155124
155124
|
return resolvedStructs;
|
|
155125
155125
|
}
|
|
155126
|
-
var
|
|
155126
|
+
var typeWithoutTupleRegex3 = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;
|
|
155127
155127
|
function resolveStructs2(abiParameters, structs, ancestors = /* @__PURE__ */ new Set()) {
|
|
155128
155128
|
const components = [];
|
|
155129
155129
|
const length = abiParameters.length;
|
|
@@ -155133,7 +155133,7 @@ var require_structs = __commonJS({
|
|
|
155133
155133
|
if (isTuple)
|
|
155134
155134
|
components.push(abiParameter);
|
|
155135
155135
|
else {
|
|
155136
|
-
const match2 = (0, regex_js_1.execTyped)(
|
|
155136
|
+
const match2 = (0, regex_js_1.execTyped)(typeWithoutTupleRegex3, abiParameter.type);
|
|
155137
155137
|
if (!match2?.type)
|
|
155138
155138
|
throw new abiParameter_js_1.InvalidAbiTypeParameterError({ abiParameter });
|
|
155139
155139
|
const { array, type } = match2;
|
|
@@ -184693,7 +184693,7 @@ var require_abiItem2 = __commonJS({
|
|
|
184693
184693
|
exports2.normalizeSignature = normalizeSignature3;
|
|
184694
184694
|
exports2.isArgOfType = isArgOfType3;
|
|
184695
184695
|
exports2.getAmbiguousTypes = getAmbiguousTypes3;
|
|
184696
|
-
var
|
|
184696
|
+
var Address2 = require_Address();
|
|
184697
184697
|
var Errors = require_Errors();
|
|
184698
184698
|
function normalizeSignature3(signature) {
|
|
184699
184699
|
let active = true;
|
|
@@ -184742,7 +184742,7 @@ var require_abiItem2 = __commonJS({
|
|
|
184742
184742
|
const abiParameterType = abiParameter.type;
|
|
184743
184743
|
switch (abiParameterType) {
|
|
184744
184744
|
case "address":
|
|
184745
|
-
return
|
|
184745
|
+
return Address2.validate(arg, { strict: false });
|
|
184746
184746
|
case "bool":
|
|
184747
184747
|
return argType === "boolean";
|
|
184748
184748
|
case "function":
|
|
@@ -184779,11 +184779,11 @@ var require_abiItem2 = __commonJS({
|
|
|
184779
184779
|
if (types.includes("address") && types.includes("bytes20"))
|
|
184780
184780
|
return true;
|
|
184781
184781
|
if (types.includes("address") && types.includes("string"))
|
|
184782
|
-
return
|
|
184782
|
+
return Address2.validate(args[parameterIndex], {
|
|
184783
184783
|
strict: false
|
|
184784
184784
|
});
|
|
184785
184785
|
if (types.includes("address") && types.includes("bytes"))
|
|
184786
|
-
return
|
|
184786
|
+
return Address2.validate(args[parameterIndex], {
|
|
184787
184787
|
strict: false
|
|
184788
184788
|
});
|
|
184789
184789
|
return false;
|
|
@@ -185107,7 +185107,7 @@ var require_abiParameters = __commonJS({
|
|
|
185107
185107
|
exports2.getArrayComponents = getArrayComponents3;
|
|
185108
185108
|
exports2.hasDynamicChild = hasDynamicChild2;
|
|
185109
185109
|
var AbiParameters = require_AbiParameters();
|
|
185110
|
-
var
|
|
185110
|
+
var Address2 = require_Address();
|
|
185111
185111
|
var Bytes = require_Bytes();
|
|
185112
185112
|
var Errors = require_Errors();
|
|
185113
185113
|
var Hex = require_Hex();
|
|
@@ -185141,7 +185141,7 @@ var require_abiParameters = __commonJS({
|
|
|
185141
185141
|
function decodeAddress2(cursor, options = {}) {
|
|
185142
185142
|
const { checksum: checksum3 = false } = options;
|
|
185143
185143
|
const value = cursor.readBytes(32);
|
|
185144
|
-
const wrap = (address) => checksum3 ?
|
|
185144
|
+
const wrap = (address) => checksum3 ? Address2.checksum(address) : address;
|
|
185145
185145
|
return [wrap(Hex.fromBytes(Bytes.slice(value, -20))), 32];
|
|
185146
185146
|
}
|
|
185147
185147
|
function decodeArray2(cursor, param, options) {
|
|
@@ -185350,7 +185350,7 @@ var require_abiParameters = __commonJS({
|
|
|
185350
185350
|
}
|
|
185351
185351
|
function encodeAddress3(value, options) {
|
|
185352
185352
|
const { checksum: checksum3 = false } = options;
|
|
185353
|
-
|
|
185353
|
+
Address2.assert(value, { strict: checksum3 });
|
|
185354
185354
|
return {
|
|
185355
185355
|
dynamic: false,
|
|
185356
185356
|
encoded: Hex.padLeft(value.toLowerCase())
|
|
@@ -185725,7 +185725,7 @@ var require_AbiParameters = __commonJS({
|
|
|
185725
185725
|
exports2.format = format;
|
|
185726
185726
|
exports2.from = from5;
|
|
185727
185727
|
var abitype = require_exports();
|
|
185728
|
-
var
|
|
185728
|
+
var Address2 = require_Address();
|
|
185729
185729
|
var Bytes = require_Bytes();
|
|
185730
185730
|
var Errors = require_Errors();
|
|
185731
185731
|
var Hex = require_Hex();
|
|
@@ -185796,7 +185796,7 @@ var require_AbiParameters = __commonJS({
|
|
|
185796
185796
|
function encode5(type, value, isArray2 = false) {
|
|
185797
185797
|
if (type === "address") {
|
|
185798
185798
|
const address = value;
|
|
185799
|
-
|
|
185799
|
+
Address2.assert(address);
|
|
185800
185800
|
return Hex.padLeft(address.toLowerCase(), isArray2 ? 32 : 0);
|
|
185801
185801
|
}
|
|
185802
185802
|
if (type === "string")
|
|
@@ -186083,8 +186083,8 @@ var require_simulateCalls = __commonJS({
|
|
|
186083
186083
|
"use strict";
|
|
186084
186084
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
186085
186085
|
exports2.simulateCalls = simulateCalls2;
|
|
186086
|
-
var
|
|
186087
|
-
var
|
|
186086
|
+
var AbiConstructor2 = require_AbiConstructor();
|
|
186087
|
+
var AbiFunction2 = require_AbiFunction();
|
|
186088
186088
|
var parseAccount_js_1 = require_parseAccount();
|
|
186089
186089
|
var address_js_1 = require_address7();
|
|
186090
186090
|
var contracts_js_1 = require_contracts2();
|
|
@@ -186099,11 +186099,11 @@ var require_simulateCalls = __commonJS({
|
|
|
186099
186099
|
const account = parameters.account ? (0, parseAccount_js_1.parseAccount)(parameters.account) : void 0;
|
|
186100
186100
|
if (traceAssetChanges && !account)
|
|
186101
186101
|
throw new base_js_1.BaseError("`account` is required when `traceAssetChanges` is true");
|
|
186102
|
-
const getBalanceData = account ?
|
|
186102
|
+
const getBalanceData = account ? AbiConstructor2.encode(AbiConstructor2.from("constructor(bytes, bytes)"), {
|
|
186103
186103
|
bytecode: contracts_js_1.deploylessCallViaBytecodeBytecode,
|
|
186104
186104
|
args: [
|
|
186105
186105
|
getBalanceCode2,
|
|
186106
|
-
|
|
186106
|
+
AbiFunction2.encodeData(AbiFunction2.from("function getBalance(address)"), [account.address])
|
|
186107
186107
|
]
|
|
186108
186108
|
}) : void 0;
|
|
186109
186109
|
const assetAddresses = traceAssetChanges ? await Promise.all(parameters.calls.map(async (call2) => {
|
|
@@ -186136,7 +186136,7 @@ var require_simulateCalls = __commonJS({
|
|
|
186136
186136
|
{
|
|
186137
186137
|
calls: assetAddresses.map((address, i) => ({
|
|
186138
186138
|
abi: [
|
|
186139
|
-
|
|
186139
|
+
AbiFunction2.from("function balanceOf(address) returns (uint256)")
|
|
186140
186140
|
],
|
|
186141
186141
|
functionName: "balanceOf",
|
|
186142
186142
|
args: [account.address],
|
|
@@ -186167,7 +186167,7 @@ var require_simulateCalls = __commonJS({
|
|
|
186167
186167
|
{
|
|
186168
186168
|
calls: assetAddresses.map((address, i) => ({
|
|
186169
186169
|
abi: [
|
|
186170
|
-
|
|
186170
|
+
AbiFunction2.from("function balanceOf(address) returns (uint256)")
|
|
186171
186171
|
],
|
|
186172
186172
|
functionName: "balanceOf",
|
|
186173
186173
|
args: [account.address],
|
|
@@ -186186,7 +186186,7 @@ var require_simulateCalls = __commonJS({
|
|
|
186186
186186
|
calls: assetAddresses.map((address, i) => ({
|
|
186187
186187
|
to: address,
|
|
186188
186188
|
abi: [
|
|
186189
|
-
|
|
186189
|
+
AbiFunction2.from("function decimals() returns (uint256)")
|
|
186190
186190
|
],
|
|
186191
186191
|
functionName: "decimals",
|
|
186192
186192
|
from: address_js_1.zeroAddress,
|
|
@@ -186203,7 +186203,7 @@ var require_simulateCalls = __commonJS({
|
|
|
186203
186203
|
calls: assetAddresses.map((address, i) => ({
|
|
186204
186204
|
to: address,
|
|
186205
186205
|
abi: [
|
|
186206
|
-
|
|
186206
|
+
AbiFunction2.from("function tokenURI(uint256) returns (string)")
|
|
186207
186207
|
],
|
|
186208
186208
|
functionName: "tokenURI",
|
|
186209
186209
|
args: [0n],
|
|
@@ -186220,7 +186220,7 @@ var require_simulateCalls = __commonJS({
|
|
|
186220
186220
|
{
|
|
186221
186221
|
calls: assetAddresses.map((address, i) => ({
|
|
186222
186222
|
to: address,
|
|
186223
|
-
abi: [
|
|
186223
|
+
abi: [AbiFunction2.from("function symbol() returns (string)")],
|
|
186224
186224
|
functionName: "symbol",
|
|
186225
186225
|
from: address_js_1.zeroAddress,
|
|
186226
186226
|
nonce: i
|
|
@@ -373237,9 +373237,10 @@ function createAdapter(sdk, args) {
|
|
|
373237
373237
|
case "ADAPTER::STAKING_REWARDS":
|
|
373238
373238
|
return new StakingRewardsAdapterContract(sdk, args);
|
|
373239
373239
|
default:
|
|
373240
|
-
|
|
373240
|
+
sdk.logger?.warn(
|
|
373241
373241
|
`adapter for ${adapterType} at ${args.baseParams.addr} is not implemented`
|
|
373242
373242
|
);
|
|
373243
|
+
return new AbstractAdapterContract(sdk, { ...args, abi: [] });
|
|
373243
373244
|
}
|
|
373244
373245
|
}
|
|
373245
373246
|
var abi222 = [...iCreditConfiguratorV300Abi, ...iPausableAbi];
|
|
@@ -406306,6 +406307,296 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
406306
406307
|
ZodError
|
|
406307
406308
|
});
|
|
406308
406309
|
|
|
406310
|
+
// ../../node_modules/abitype/dist/esm/zod.js
|
|
406311
|
+
init_utils();
|
|
406312
|
+
init_regex();
|
|
406313
|
+
var Identifier = z.string().regex(/[a-zA-Z$_][a-zA-Z0-9$_]*/);
|
|
406314
|
+
var Address = z.string().transform((val, ctx) => {
|
|
406315
|
+
const regex = /^0x[a-fA-F0-9]{40}$/;
|
|
406316
|
+
if (!regex.test(val)) {
|
|
406317
|
+
ctx.addIssue({
|
|
406318
|
+
code: z.ZodIssueCode.custom,
|
|
406319
|
+
message: `Invalid Address ${val}`
|
|
406320
|
+
});
|
|
406321
|
+
}
|
|
406322
|
+
return val;
|
|
406323
|
+
});
|
|
406324
|
+
var SolidityAddress = z.literal("address");
|
|
406325
|
+
var SolidityBool = z.literal("bool");
|
|
406326
|
+
var SolidityBytes = z.string().regex(bytesRegex);
|
|
406327
|
+
var SolidityFunction = z.literal("function");
|
|
406328
|
+
var SolidityString = z.literal("string");
|
|
406329
|
+
var SolidityTuple = z.literal("tuple");
|
|
406330
|
+
var SolidityInt = z.string().regex(integerRegex);
|
|
406331
|
+
var SolidityArrayWithoutTuple = z.string().regex(/^(address|bool|function|string|bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?|u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?)(\[[0-9]{0,}\])+$/);
|
|
406332
|
+
var SolidityArrayWithTuple = z.string().regex(/^tuple(\[[0-9]{0,}\])+$/);
|
|
406333
|
+
var SolidityArray = z.union([
|
|
406334
|
+
SolidityArrayWithTuple,
|
|
406335
|
+
SolidityArrayWithoutTuple
|
|
406336
|
+
]);
|
|
406337
|
+
var AbiParameter = z.lazy(() => z.intersection(z.object({
|
|
406338
|
+
name: z.union([Identifier.optional(), z.literal("")]),
|
|
406339
|
+
/** Representation used by Solidity compiler */
|
|
406340
|
+
internalType: z.string().optional()
|
|
406341
|
+
}), z.union([
|
|
406342
|
+
z.object({
|
|
406343
|
+
type: z.union([
|
|
406344
|
+
SolidityAddress,
|
|
406345
|
+
SolidityBool,
|
|
406346
|
+
SolidityBytes,
|
|
406347
|
+
SolidityFunction,
|
|
406348
|
+
SolidityString,
|
|
406349
|
+
SolidityInt,
|
|
406350
|
+
SolidityArrayWithoutTuple
|
|
406351
|
+
])
|
|
406352
|
+
}),
|
|
406353
|
+
z.object({
|
|
406354
|
+
type: z.union([SolidityTuple, SolidityArrayWithTuple]),
|
|
406355
|
+
components: z.array(AbiParameter).readonly()
|
|
406356
|
+
})
|
|
406357
|
+
])));
|
|
406358
|
+
var AbiEventParameter = z.intersection(AbiParameter, z.object({ indexed: z.boolean().optional() }));
|
|
406359
|
+
var AbiStateMutability = z.union([
|
|
406360
|
+
z.literal("pure"),
|
|
406361
|
+
z.literal("view"),
|
|
406362
|
+
z.literal("nonpayable"),
|
|
406363
|
+
z.literal("payable")
|
|
406364
|
+
]);
|
|
406365
|
+
var AbiFunction = z.preprocess((val) => {
|
|
406366
|
+
const abiFunction = val;
|
|
406367
|
+
if (abiFunction.stateMutability === void 0) {
|
|
406368
|
+
if (abiFunction.constant)
|
|
406369
|
+
abiFunction.stateMutability = "view";
|
|
406370
|
+
else if (abiFunction.payable)
|
|
406371
|
+
abiFunction.stateMutability = "payable";
|
|
406372
|
+
else
|
|
406373
|
+
abiFunction.stateMutability = "nonpayable";
|
|
406374
|
+
}
|
|
406375
|
+
return val;
|
|
406376
|
+
}, z.object({
|
|
406377
|
+
type: z.literal("function"),
|
|
406378
|
+
/**
|
|
406379
|
+
* @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
|
|
406380
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406381
|
+
*/
|
|
406382
|
+
constant: z.boolean().optional(),
|
|
406383
|
+
/**
|
|
406384
|
+
* @deprecated Vyper used to provide gas estimates
|
|
406385
|
+
* https://github.com/vyperlang/vyper/issues/2151
|
|
406386
|
+
*/
|
|
406387
|
+
gas: z.number().optional(),
|
|
406388
|
+
inputs: z.array(AbiParameter).readonly(),
|
|
406389
|
+
name: Identifier,
|
|
406390
|
+
outputs: z.array(AbiParameter).readonly(),
|
|
406391
|
+
/**
|
|
406392
|
+
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
406393
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406394
|
+
*/
|
|
406395
|
+
payable: z.boolean().optional(),
|
|
406396
|
+
stateMutability: AbiStateMutability
|
|
406397
|
+
}));
|
|
406398
|
+
var AbiConstructor = z.preprocess((val) => {
|
|
406399
|
+
const abiFunction = val;
|
|
406400
|
+
if (abiFunction.stateMutability === void 0) {
|
|
406401
|
+
if (abiFunction.payable)
|
|
406402
|
+
abiFunction.stateMutability = "payable";
|
|
406403
|
+
else
|
|
406404
|
+
abiFunction.stateMutability = "nonpayable";
|
|
406405
|
+
}
|
|
406406
|
+
return val;
|
|
406407
|
+
}, z.object({
|
|
406408
|
+
type: z.literal("constructor"),
|
|
406409
|
+
/**
|
|
406410
|
+
* @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
|
|
406411
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406412
|
+
*/
|
|
406413
|
+
inputs: z.array(AbiParameter).readonly(),
|
|
406414
|
+
/**
|
|
406415
|
+
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
406416
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406417
|
+
*/
|
|
406418
|
+
payable: z.boolean().optional(),
|
|
406419
|
+
stateMutability: z.union([z.literal("nonpayable"), z.literal("payable")])
|
|
406420
|
+
}));
|
|
406421
|
+
var AbiFallback = z.preprocess((val) => {
|
|
406422
|
+
const abiFunction = val;
|
|
406423
|
+
if (abiFunction.stateMutability === void 0) {
|
|
406424
|
+
if (abiFunction.payable)
|
|
406425
|
+
abiFunction.stateMutability = "payable";
|
|
406426
|
+
else
|
|
406427
|
+
abiFunction.stateMutability = "nonpayable";
|
|
406428
|
+
}
|
|
406429
|
+
return val;
|
|
406430
|
+
}, z.object({
|
|
406431
|
+
type: z.literal("fallback"),
|
|
406432
|
+
/**
|
|
406433
|
+
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
406434
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406435
|
+
*/
|
|
406436
|
+
payable: z.boolean().optional(),
|
|
406437
|
+
stateMutability: z.union([z.literal("nonpayable"), z.literal("payable")])
|
|
406438
|
+
}));
|
|
406439
|
+
var AbiReceive = z.object({
|
|
406440
|
+
type: z.literal("receive"),
|
|
406441
|
+
stateMutability: z.literal("payable")
|
|
406442
|
+
});
|
|
406443
|
+
var AbiEvent = z.object({
|
|
406444
|
+
type: z.literal("event"),
|
|
406445
|
+
anonymous: z.boolean().optional(),
|
|
406446
|
+
inputs: z.array(AbiEventParameter).readonly(),
|
|
406447
|
+
name: Identifier
|
|
406448
|
+
});
|
|
406449
|
+
var AbiError = z.object({
|
|
406450
|
+
type: z.literal("error"),
|
|
406451
|
+
inputs: z.array(AbiParameter).readonly(),
|
|
406452
|
+
name: z.string()
|
|
406453
|
+
});
|
|
406454
|
+
var AbiItemType = z.union([
|
|
406455
|
+
z.literal("constructor"),
|
|
406456
|
+
z.literal("event"),
|
|
406457
|
+
z.literal("error"),
|
|
406458
|
+
z.literal("fallback"),
|
|
406459
|
+
z.literal("function"),
|
|
406460
|
+
z.literal("receive")
|
|
406461
|
+
]);
|
|
406462
|
+
var Abi = z.array(z.union([
|
|
406463
|
+
AbiError,
|
|
406464
|
+
AbiEvent,
|
|
406465
|
+
// TODO: Replace code below to `z.switch` (https://github.com/colinhacks/zod/issues/2106)
|
|
406466
|
+
// Need to redefine `AbiFunction | AbiConstructor | AbiFallback | AbiReceive` since `z.discriminate` doesn't support `z.preprocess` on `options`
|
|
406467
|
+
// https://github.com/colinhacks/zod/issues/1490
|
|
406468
|
+
z.preprocess((val) => {
|
|
406469
|
+
const abiItem = val;
|
|
406470
|
+
if (abiItem.type === "receive")
|
|
406471
|
+
return abiItem;
|
|
406472
|
+
if (val.stateMutability === void 0) {
|
|
406473
|
+
if (abiItem.type === "function" && abiItem.constant)
|
|
406474
|
+
abiItem.stateMutability = "view";
|
|
406475
|
+
else if (abiItem.payable)
|
|
406476
|
+
abiItem.stateMutability = "payable";
|
|
406477
|
+
else
|
|
406478
|
+
abiItem.stateMutability = "nonpayable";
|
|
406479
|
+
}
|
|
406480
|
+
return val;
|
|
406481
|
+
}, z.intersection(z.object({
|
|
406482
|
+
/**
|
|
406483
|
+
* @deprecated use `pure` or `view` from {@link AbiStateMutability} instead
|
|
406484
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406485
|
+
*/
|
|
406486
|
+
constant: z.boolean().optional(),
|
|
406487
|
+
/**
|
|
406488
|
+
* @deprecated Vyper used to provide gas estimates
|
|
406489
|
+
* https://github.com/vyperlang/vyper/issues/2151
|
|
406490
|
+
*/
|
|
406491
|
+
gas: z.number().optional(),
|
|
406492
|
+
/**
|
|
406493
|
+
* @deprecated use `payable` or `nonpayable` from {@link AbiStateMutability} instead
|
|
406494
|
+
* https://github.com/ethereum/solidity/issues/992
|
|
406495
|
+
*/
|
|
406496
|
+
payable: z.boolean().optional()
|
|
406497
|
+
}), z.discriminatedUnion("type", [
|
|
406498
|
+
z.object({
|
|
406499
|
+
type: z.literal("function"),
|
|
406500
|
+
inputs: z.array(AbiParameter).readonly(),
|
|
406501
|
+
name: z.string().regex(/[a-zA-Z$_][a-zA-Z0-9$_]*/),
|
|
406502
|
+
outputs: z.array(AbiParameter).readonly(),
|
|
406503
|
+
stateMutability: AbiStateMutability
|
|
406504
|
+
}),
|
|
406505
|
+
z.object({
|
|
406506
|
+
type: z.literal("constructor"),
|
|
406507
|
+
inputs: z.array(AbiParameter).readonly(),
|
|
406508
|
+
stateMutability: z.union([
|
|
406509
|
+
z.literal("payable"),
|
|
406510
|
+
z.literal("nonpayable")
|
|
406511
|
+
])
|
|
406512
|
+
}),
|
|
406513
|
+
z.object({
|
|
406514
|
+
type: z.literal("fallback"),
|
|
406515
|
+
inputs: z.tuple([]).optional(),
|
|
406516
|
+
stateMutability: z.union([
|
|
406517
|
+
z.literal("payable"),
|
|
406518
|
+
z.literal("nonpayable")
|
|
406519
|
+
])
|
|
406520
|
+
}),
|
|
406521
|
+
z.object({
|
|
406522
|
+
type: z.literal("receive"),
|
|
406523
|
+
stateMutability: z.literal("payable")
|
|
406524
|
+
})
|
|
406525
|
+
])))
|
|
406526
|
+
])).readonly();
|
|
406527
|
+
var TypedDataDomain = z.object({
|
|
406528
|
+
chainId: z.union([z.number(), z.bigint()]).optional(),
|
|
406529
|
+
name: Identifier.optional(),
|
|
406530
|
+
salt: z.string().optional(),
|
|
406531
|
+
verifyingContract: Address.optional(),
|
|
406532
|
+
version: z.string().optional()
|
|
406533
|
+
});
|
|
406534
|
+
var TypedDataType = z.union([
|
|
406535
|
+
SolidityAddress,
|
|
406536
|
+
SolidityBool,
|
|
406537
|
+
SolidityBytes,
|
|
406538
|
+
SolidityString,
|
|
406539
|
+
SolidityInt,
|
|
406540
|
+
SolidityArray
|
|
406541
|
+
]);
|
|
406542
|
+
var TypedDataParameter = z.object({
|
|
406543
|
+
name: Identifier,
|
|
406544
|
+
type: z.string()
|
|
406545
|
+
});
|
|
406546
|
+
var TypedData = z.record(Identifier, z.array(TypedDataParameter)).transform((val, ctx) => validateTypedDataKeys(val, ctx));
|
|
406547
|
+
function validateTypedDataKeys(typedData, zodContext) {
|
|
406548
|
+
const keys2 = Object.keys(typedData);
|
|
406549
|
+
for (let i = 0; i < keys2.length; i++) {
|
|
406550
|
+
if (isSolidityType(keys2[i])) {
|
|
406551
|
+
zodContext.addIssue({
|
|
406552
|
+
code: "custom",
|
|
406553
|
+
message: `Invalid key. ${keys2[i]} is a solidity type.`
|
|
406554
|
+
});
|
|
406555
|
+
return z.NEVER;
|
|
406556
|
+
}
|
|
406557
|
+
validateTypedDataParameters(keys2[i], typedData, zodContext);
|
|
406558
|
+
}
|
|
406559
|
+
return typedData;
|
|
406560
|
+
}
|
|
406561
|
+
var typeWithoutTupleRegex2 = /^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*?)(?<array>(?:\[\d*?\])+?)?$/;
|
|
406562
|
+
function validateTypedDataParameters(key, typedData, zodContext, ancestors = /* @__PURE__ */ new Set()) {
|
|
406563
|
+
const val = typedData[key];
|
|
406564
|
+
const length = val.length;
|
|
406565
|
+
for (let i = 0; i < length; i++) {
|
|
406566
|
+
if (val[i]?.type === key) {
|
|
406567
|
+
zodContext.addIssue({
|
|
406568
|
+
code: "custom",
|
|
406569
|
+
message: `Invalid type. ${key} is a self reference.`
|
|
406570
|
+
});
|
|
406571
|
+
return z.NEVER;
|
|
406572
|
+
}
|
|
406573
|
+
const match2 = execTyped(typeWithoutTupleRegex2, val[i]?.type);
|
|
406574
|
+
if (!match2?.type) {
|
|
406575
|
+
zodContext.addIssue({
|
|
406576
|
+
code: "custom",
|
|
406577
|
+
message: `Invalid type. ${key} does not have a type.`
|
|
406578
|
+
});
|
|
406579
|
+
return z.NEVER;
|
|
406580
|
+
}
|
|
406581
|
+
if (match2.type in typedData) {
|
|
406582
|
+
if (ancestors.has(match2.type)) {
|
|
406583
|
+
zodContext.addIssue({
|
|
406584
|
+
code: "custom",
|
|
406585
|
+
message: `Invalid type. ${match2.type} is a circular reference.`
|
|
406586
|
+
});
|
|
406587
|
+
return z.NEVER;
|
|
406588
|
+
}
|
|
406589
|
+
validateTypedDataParameters(match2.type, typedData, zodContext, /* @__PURE__ */ new Set([...ancestors, match2.type]));
|
|
406590
|
+
} else if (!isSolidityType(match2.type)) {
|
|
406591
|
+
zodContext.addIssue({
|
|
406592
|
+
code: "custom",
|
|
406593
|
+
message: `Invalid type. ${match2.type} is not a valid EIP-712 type.`
|
|
406594
|
+
});
|
|
406595
|
+
}
|
|
406596
|
+
}
|
|
406597
|
+
return;
|
|
406598
|
+
}
|
|
406599
|
+
|
|
406309
406600
|
// ../../packages/shared/dist/fork-schema.js
|
|
406310
406601
|
var ScriptTemplate = z.object({
|
|
406311
406602
|
id: z.string().regex(/^[0-9a-zA-Z\-_]+$/, "invalid script id"),
|
|
@@ -406336,6 +406627,14 @@ var ForkTemplate = z.object({
|
|
|
406336
406627
|
* Anvil chain id override, if not set, defaults to same as original network chain id (e.g. 1 for mainnet)
|
|
406337
406628
|
*/
|
|
406338
406629
|
chainId: z.number().int().nonnegative().nullish().transform((v) => v || void 0),
|
|
406630
|
+
/**
|
|
406631
|
+
* Optional address provider pverride
|
|
406632
|
+
*/
|
|
406633
|
+
addressProvider: Address.nullish(),
|
|
406634
|
+
/**
|
|
406635
|
+
* Optional market configurators override
|
|
406636
|
+
*/
|
|
406637
|
+
marketConfigurators: z.array(Address).nullish(),
|
|
406339
406638
|
/**
|
|
406340
406639
|
* Will set appropriate RPC urls
|
|
406341
406640
|
*/
|
|
@@ -417607,7 +417906,7 @@ function getRenderer(opts) {
|
|
|
417607
417906
|
var package_default = {
|
|
417608
417907
|
name: "@gearbox-protocol/deploy-tools",
|
|
417609
417908
|
description: "Gearbox deploy tools",
|
|
417610
|
-
version: "5.16.
|
|
417909
|
+
version: "5.16.2",
|
|
417611
417910
|
homepage: "https://gearbox.fi",
|
|
417612
417911
|
keywords: [
|
|
417613
417912
|
"gearbox"
|
|
@@ -417650,7 +417949,7 @@ var package_default = {
|
|
|
417650
417949
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
417651
417950
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
417652
417951
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
417653
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
417952
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.265",
|
|
417654
417953
|
"@gearbox-protocol/sdk-gov": "^2.36.5",
|
|
417655
417954
|
"@types/lodash-es": "^4.17.12",
|
|
417656
417955
|
"@types/node": "^22.13.5",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/deploy-tools",
|
|
3
3
|
"description": "Gearbox deploy tools",
|
|
4
|
-
"version": "5.16.
|
|
4
|
+
"version": "5.16.2",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
45
45
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
46
46
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
47
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
47
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.265",
|
|
48
48
|
"@gearbox-protocol/sdk-gov": "^2.36.5",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"@types/node": "^22.13.5",
|