@gearbox-protocol/deploy-tools 5.38.3 → 5.38.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 +416 -187
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
|
@@ -4409,7 +4409,7 @@ var init_size = __esm({
|
|
|
4409
4409
|
var version2;
|
|
4410
4410
|
var init_version2 = __esm({
|
|
4411
4411
|
"../../node_modules/viem/_esm/errors/version.js"() {
|
|
4412
|
-
version2 = "2.
|
|
4412
|
+
version2 = "2.33.0";
|
|
4413
4413
|
}
|
|
4414
4414
|
});
|
|
4415
4415
|
|
|
@@ -12964,7 +12964,7 @@ var init_ccip2 = __esm({
|
|
|
12964
12964
|
|
|
12965
12965
|
// ../../node_modules/viem/_esm/actions/public/call.js
|
|
12966
12966
|
async function call(client, args) {
|
|
12967
|
-
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
12967
|
+
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
12968
12968
|
const account = account_ ? parseAccount(account_) : void 0;
|
|
12969
12969
|
if (code && (factory || factoryData))
|
|
12970
12970
|
throw new BaseError2("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
@@ -13073,7 +13073,7 @@ function shouldPerformMulticall({ request }) {
|
|
|
13073
13073
|
}
|
|
13074
13074
|
async function scheduleMulticall(client, args) {
|
|
13075
13075
|
const { batchSize = 1024, wait: wait2 = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
|
|
13076
|
-
const { blockNumber, blockTag = "latest", data, multicallAddress: multicallAddress_, to } = args;
|
|
13076
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", data, multicallAddress: multicallAddress_, to } = args;
|
|
13077
13077
|
let multicallAddress = multicallAddress_;
|
|
13078
13078
|
if (!multicallAddress) {
|
|
13079
13079
|
if (!client.chain)
|
|
@@ -24124,6 +24124,7 @@ var require_form_data = __commonJS({
|
|
|
24124
24124
|
var parseUrl = __require("url").parse;
|
|
24125
24125
|
var fs3 = __require("fs");
|
|
24126
24126
|
var Stream = __require("stream").Stream;
|
|
24127
|
+
var crypto3 = __require("crypto");
|
|
24127
24128
|
var mime = require_mime_types();
|
|
24128
24129
|
var asynckit = require_asynckit();
|
|
24129
24130
|
var setToStringTag = require_es_set_tostringtag();
|
|
@@ -24329,11 +24330,7 @@ var require_form_data = __commonJS({
|
|
|
24329
24330
|
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
24330
24331
|
};
|
|
24331
24332
|
FormData2.prototype._generateBoundary = function() {
|
|
24332
|
-
|
|
24333
|
-
for (var i = 0; i < 24; i++) {
|
|
24334
|
-
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
24335
|
-
}
|
|
24336
|
-
this._boundary = boundary;
|
|
24333
|
+
this._boundary = "--------------------------" + crypto3.randomBytes(12).toString("hex");
|
|
24337
24334
|
};
|
|
24338
24335
|
FormData2.prototype.getLengthSync = function() {
|
|
24339
24336
|
var knownLength = this._overheadLength + this._valueLength;
|
|
@@ -166546,7 +166543,7 @@ var require_version28 = __commonJS({
|
|
|
166546
166543
|
"use strict";
|
|
166547
166544
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
166548
166545
|
exports2.version = void 0;
|
|
166549
|
-
exports2.version = "2.
|
|
166546
|
+
exports2.version = "2.33.0";
|
|
166550
166547
|
}
|
|
166551
166548
|
});
|
|
166552
166549
|
|
|
@@ -174855,8 +174852,7 @@ var require_getBlock = __commonJS({
|
|
|
174855
174852
|
var block_js_1 = require_block();
|
|
174856
174853
|
var toHex_js_1 = require_toHex();
|
|
174857
174854
|
var block_js_2 = require_block2();
|
|
174858
|
-
async function getBlock2(client, { blockHash, blockNumber, blockTag
|
|
174859
|
-
const blockTag = blockTag_ ?? "latest";
|
|
174855
|
+
async function getBlock2(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? "latest", includeTransactions: includeTransactions_ } = {}) {
|
|
174860
174856
|
const includeTransactions = includeTransactions_ ?? false;
|
|
174861
174857
|
const blockNumberHex = blockNumber !== void 0 ? (0, toHex_js_1.numberToHex)(blockNumber) : void 0;
|
|
174862
174858
|
let block = null;
|
|
@@ -175495,7 +175491,7 @@ var require_getBalance = __commonJS({
|
|
|
175495
175491
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
175496
175492
|
exports2.getBalance = getBalance2;
|
|
175497
175493
|
var toHex_js_1 = require_toHex();
|
|
175498
|
-
async function getBalance2(client, { address, blockNumber, blockTag = "latest" }) {
|
|
175494
|
+
async function getBalance2(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? "latest" }) {
|
|
175499
175495
|
const blockNumberHex = typeof blockNumber === "bigint" ? (0, toHex_js_1.numberToHex)(blockNumber) : void 0;
|
|
175500
175496
|
const balance = await client.request({
|
|
175501
175497
|
method: "eth_getBalance",
|
|
@@ -175531,7 +175527,11 @@ var require_estimateGas2 = __commonJS({
|
|
|
175531
175527
|
const { block: block2, request: request2, rpcStateOverride: rpcStateOverride2 } = parameters;
|
|
175532
175528
|
return client.request({
|
|
175533
175529
|
method: "eth_estimateGas",
|
|
175534
|
-
params: rpcStateOverride2 ? [
|
|
175530
|
+
params: rpcStateOverride2 ? [
|
|
175531
|
+
request2,
|
|
175532
|
+
block2 ?? client.experimental_blockTag ?? "latest",
|
|
175533
|
+
rpcStateOverride2
|
|
175534
|
+
] : block2 ? [request2, block2] : [request2]
|
|
175535
175535
|
});
|
|
175536
175536
|
};
|
|
175537
175537
|
const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = await (0, prepareTransactionRequest_js_1.prepareTransactionRequest)(client, {
|
|
@@ -179744,7 +179744,7 @@ var require_call = __commonJS({
|
|
|
179744
179744
|
var stateOverride_js_1 = require_stateOverride2();
|
|
179745
179745
|
var assertRequest_js_1 = require_assertRequest();
|
|
179746
179746
|
async function call2(client, args) {
|
|
179747
|
-
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = "latest", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
179747
|
+
const { account: account_ = client.account, authorizationList, batch = Boolean(client.batch?.multicall), blockNumber, blockTag = client.experimental_blockTag ?? "latest", accessList, blobs, blockOverrides, code, data: data_, factory, factoryData, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, to, value, stateOverride, ...rest } = args;
|
|
179748
179748
|
const account = account_ ? (0, parseAccount_js_1.parseAccount)(account_) : void 0;
|
|
179749
179749
|
if (code && (factory || factoryData))
|
|
179750
179750
|
throw new base_js_1.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");
|
|
@@ -179852,7 +179852,7 @@ var require_call = __commonJS({
|
|
|
179852
179852
|
}
|
|
179853
179853
|
async function scheduleMulticall2(client, args) {
|
|
179854
179854
|
const { batchSize = 1024, wait: wait2 = 0 } = typeof client.batch?.multicall === "object" ? client.batch.multicall : {};
|
|
179855
|
-
const { blockNumber, blockTag = "latest", data, multicallAddress: multicallAddress_, to } = args;
|
|
179855
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", data, multicallAddress: multicallAddress_, to } = args;
|
|
179856
179856
|
let multicallAddress = multicallAddress_;
|
|
179857
179857
|
if (!multicallAddress) {
|
|
179858
179858
|
if (!client.chain)
|
|
@@ -181234,6 +181234,7 @@ var require_createClient = __commonJS({
|
|
|
181234
181234
|
var uid_js_1 = require_uid();
|
|
181235
181235
|
function createClient2(parameters) {
|
|
181236
181236
|
const { batch, chain, ccipRead, key = "base", name = "Base Client", type = "base" } = parameters;
|
|
181237
|
+
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : void 0);
|
|
181237
181238
|
const blockTime = chain?.blockTime ?? 12e3;
|
|
181238
181239
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);
|
|
181239
181240
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
|
@@ -181256,7 +181257,8 @@ var require_createClient = __commonJS({
|
|
|
181256
181257
|
request,
|
|
181257
181258
|
transport,
|
|
181258
181259
|
type,
|
|
181259
|
-
uid: (0, uid_js_1.uid)()
|
|
181260
|
+
uid: (0, uid_js_1.uid)(),
|
|
181261
|
+
...experimental_blockTag ? { experimental_blockTag } : {}
|
|
181260
181262
|
};
|
|
181261
181263
|
function extend2(base2) {
|
|
181262
181264
|
return (extendFn) => {
|
|
@@ -183007,6 +183009,23 @@ var require_socket = __commonJS({
|
|
|
183007
183009
|
let error40;
|
|
183008
183010
|
let socket;
|
|
183009
183011
|
let keepAliveTimer;
|
|
183012
|
+
let reconnectInProgress = false;
|
|
183013
|
+
function attemptReconnect() {
|
|
183014
|
+
if (reconnect && reconnectCount < attempts) {
|
|
183015
|
+
if (reconnectInProgress)
|
|
183016
|
+
return;
|
|
183017
|
+
reconnectInProgress = true;
|
|
183018
|
+
reconnectCount++;
|
|
183019
|
+
socket?.close();
|
|
183020
|
+
setTimeout(async () => {
|
|
183021
|
+
await setup().catch(console.error);
|
|
183022
|
+
reconnectInProgress = false;
|
|
183023
|
+
}, delay);
|
|
183024
|
+
} else {
|
|
183025
|
+
requests.clear();
|
|
183026
|
+
subscriptions.clear();
|
|
183027
|
+
}
|
|
183028
|
+
}
|
|
183010
183029
|
async function setup() {
|
|
183011
183030
|
const result = await getSocket({
|
|
183012
183031
|
onClose() {
|
|
@@ -183014,15 +183033,7 @@ var require_socket = __commonJS({
|
|
|
183014
183033
|
request.onError?.(new request_js_1.SocketClosedError({ url: url2 }));
|
|
183015
183034
|
for (const subscription of subscriptions.values())
|
|
183016
183035
|
subscription.onError?.(new request_js_1.SocketClosedError({ url: url2 }));
|
|
183017
|
-
|
|
183018
|
-
setTimeout(async () => {
|
|
183019
|
-
reconnectCount++;
|
|
183020
|
-
await setup().catch(console.error);
|
|
183021
|
-
}, delay);
|
|
183022
|
-
else {
|
|
183023
|
-
requests.clear();
|
|
183024
|
-
subscriptions.clear();
|
|
183025
|
-
}
|
|
183036
|
+
attemptReconnect();
|
|
183026
183037
|
},
|
|
183027
183038
|
onError(error_) {
|
|
183028
183039
|
error40 = error_;
|
|
@@ -183030,16 +183041,7 @@ var require_socket = __commonJS({
|
|
|
183030
183041
|
request.onError?.(error40);
|
|
183031
183042
|
for (const subscription of subscriptions.values())
|
|
183032
183043
|
subscription.onError?.(error40);
|
|
183033
|
-
|
|
183034
|
-
if (reconnect && reconnectCount < attempts)
|
|
183035
|
-
setTimeout(async () => {
|
|
183036
|
-
reconnectCount++;
|
|
183037
|
-
await setup().catch(console.error);
|
|
183038
|
-
}, delay);
|
|
183039
|
-
else {
|
|
183040
|
-
requests.clear();
|
|
183041
|
-
subscriptions.clear();
|
|
183042
|
-
}
|
|
183044
|
+
attemptReconnect();
|
|
183043
183045
|
},
|
|
183044
183046
|
onOpen() {
|
|
183045
183047
|
error40 = void 0;
|
|
@@ -189767,7 +189769,7 @@ var require_simulateBlocks = __commonJS({
|
|
|
189767
189769
|
var stateOverride_js_1 = require_stateOverride2();
|
|
189768
189770
|
var assertRequest_js_1 = require_assertRequest();
|
|
189769
189771
|
async function simulateBlocks2(client, parameters) {
|
|
189770
|
-
const { blockNumber, blockTag = "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
|
189772
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
|
189771
189773
|
try {
|
|
189772
189774
|
const blockStateCalls = [];
|
|
189773
189775
|
for (const block2 of blocks) {
|
|
@@ -192127,8 +192129,16 @@ var require_waitForTransactionReceipt = __commonJS({
|
|
|
192127
192129
|
var getTransaction_js_1 = require_getTransaction();
|
|
192128
192130
|
var getTransactionReceipt_js_1 = require_getTransactionReceipt();
|
|
192129
192131
|
var watchBlockNumber_js_1 = require_watchBlockNumber();
|
|
192130
|
-
async function waitForTransactionReceipt2(client,
|
|
192132
|
+
async function waitForTransactionReceipt2(client, parameters) {
|
|
192133
|
+
const { checkReplacement = true, confirmations = 1, hash: hash2, onReplaced, retryCount = 6, retryDelay = ({ count }) => ~~(1 << count) * 200, timeout = 18e4 } = parameters;
|
|
192131
192134
|
const observerId = (0, stringify_js_1.stringify)(["waitForTransactionReceipt", client.uid, hash2]);
|
|
192135
|
+
const pollingInterval = (() => {
|
|
192136
|
+
if (parameters.pollingInterval)
|
|
192137
|
+
return parameters.pollingInterval;
|
|
192138
|
+
if (client.chain?.experimental_preconfirmationTime)
|
|
192139
|
+
return client.chain.experimental_preconfirmationTime;
|
|
192140
|
+
return client.pollingInterval;
|
|
192141
|
+
})();
|
|
192132
192142
|
let transaction;
|
|
192133
192143
|
let replacedTransaction;
|
|
192134
192144
|
let receipt;
|
|
@@ -192141,7 +192151,14 @@ var require_waitForTransactionReceipt = __commonJS({
|
|
|
192141
192151
|
_unobserve();
|
|
192142
192152
|
reject(new transaction_js_1.WaitForTransactionReceiptTimeoutError({ hash: hash2 }));
|
|
192143
192153
|
}, timeout) : void 0;
|
|
192144
|
-
_unobserve = (0, observe_js_1.observe)(observerId, { onReplaced, resolve: resolve2, reject }, (emit) => {
|
|
192154
|
+
_unobserve = (0, observe_js_1.observe)(observerId, { onReplaced, resolve: resolve2, reject }, async (emit) => {
|
|
192155
|
+
receipt = await (0, getAction_js_1.getAction)(client, getTransactionReceipt_js_1.getTransactionReceipt, "getTransactionReceipt")({ hash: hash2 }).catch(() => void 0);
|
|
192156
|
+
if (receipt && confirmations <= 1) {
|
|
192157
|
+
clearTimeout(timer);
|
|
192158
|
+
emit.resolve(receipt);
|
|
192159
|
+
_unobserve();
|
|
192160
|
+
return;
|
|
192161
|
+
}
|
|
192145
192162
|
_unwatch = (0, getAction_js_1.getAction)(client, watchBlockNumber_js_1.watchBlockNumber, "watchBlockNumber")({
|
|
192146
192163
|
emitMissed: true,
|
|
192147
192164
|
emitOnBegin: true,
|
|
@@ -192164,7 +192181,7 @@ var require_waitForTransactionReceipt = __commonJS({
|
|
|
192164
192181
|
done(() => emit.resolve(receipt));
|
|
192165
192182
|
return;
|
|
192166
192183
|
}
|
|
192167
|
-
if (!transaction) {
|
|
192184
|
+
if (checkReplacement && !transaction) {
|
|
192168
192185
|
retrying = true;
|
|
192169
192186
|
await (0, withRetry_js_1.withRetry)(async () => {
|
|
192170
192187
|
transaction = await (0, getAction_js_1.getAction)(client, getTransaction_js_1.getTransaction, "getTransaction")({ hash: hash2 });
|
|
@@ -192247,7 +192264,7 @@ var require_watchBlocks = __commonJS({
|
|
|
192247
192264
|
var poll_js_1 = require_poll();
|
|
192248
192265
|
var stringify_js_1 = require_stringify();
|
|
192249
192266
|
var getBlock_js_1 = require_getBlock();
|
|
192250
|
-
function watchBlocks2(client, { blockTag = "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
|
192267
|
+
function watchBlocks2(client, { blockTag = client.experimental_blockTag ?? "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
|
192251
192268
|
const enablePolling = (() => {
|
|
192252
192269
|
if (typeof poll_ !== "undefined")
|
|
192253
192270
|
return poll_;
|
|
@@ -196283,6 +196300,7 @@ var require_simulate_tx_accessor3 = __commonJS({
|
|
|
196283
196300
|
"130": ["canonical", "eip155"],
|
|
196284
196301
|
"133": "canonical",
|
|
196285
196302
|
"137": ["canonical", "eip155"],
|
|
196303
|
+
"143": ["canonical", "eip155"],
|
|
196286
196304
|
"146": ["canonical", "eip155"],
|
|
196287
196305
|
"148": "eip155",
|
|
196288
196306
|
"155": "eip155",
|
|
@@ -196704,6 +196722,7 @@ var require_simulate_tx_accessor4 = __commonJS({
|
|
|
196704
196722
|
"130": "canonical",
|
|
196705
196723
|
"133": "canonical",
|
|
196706
196724
|
"137": "canonical",
|
|
196725
|
+
"143": "canonical",
|
|
196707
196726
|
"146": "canonical",
|
|
196708
196727
|
"155": "canonical",
|
|
196709
196728
|
"169": "canonical",
|
|
@@ -197482,6 +197501,7 @@ var require_proxy_factory6 = __commonJS({
|
|
|
197482
197501
|
"130": ["canonical", "eip155"],
|
|
197483
197502
|
"133": "canonical",
|
|
197484
197503
|
"137": ["canonical", "eip155"],
|
|
197504
|
+
"143": ["canonical", "eip155"],
|
|
197485
197505
|
"146": ["canonical", "eip155"],
|
|
197486
197506
|
"148": "eip155",
|
|
197487
197507
|
"155": "eip155",
|
|
@@ -198015,6 +198035,7 @@ var require_safe_proxy_factory2 = __commonJS({
|
|
|
198015
198035
|
"130": "canonical",
|
|
198016
198036
|
"133": "canonical",
|
|
198017
198037
|
"137": "canonical",
|
|
198038
|
+
"143": "canonical",
|
|
198018
198039
|
"146": "canonical",
|
|
198019
198040
|
"155": "canonical",
|
|
198020
198041
|
"169": "canonical",
|
|
@@ -199157,6 +199178,7 @@ var require_compatibility_fallback_handler3 = __commonJS({
|
|
|
199157
199178
|
"130": ["canonical", "eip155"],
|
|
199158
199179
|
"133": "canonical",
|
|
199159
199180
|
"137": ["canonical", "eip155"],
|
|
199181
|
+
"143": ["canonical", "eip155"],
|
|
199160
199182
|
"146": ["canonical", "eip155"],
|
|
199161
199183
|
"148": "eip155",
|
|
199162
199184
|
"155": "eip155",
|
|
@@ -199852,6 +199874,7 @@ var require_compatibility_fallback_handler4 = __commonJS({
|
|
|
199852
199874
|
"130": "canonical",
|
|
199853
199875
|
"133": "canonical",
|
|
199854
199876
|
"137": "canonical",
|
|
199877
|
+
"143": "canonical",
|
|
199855
199878
|
"146": "canonical",
|
|
199856
199879
|
"155": "canonical",
|
|
199857
199880
|
"169": "canonical",
|
|
@@ -204181,6 +204204,7 @@ var require_gnosis_safe7 = __commonJS({
|
|
|
204181
204204
|
"130": ["canonical", "eip155"],
|
|
204182
204205
|
"133": "canonical",
|
|
204183
204206
|
"137": ["canonical", "eip155"],
|
|
204207
|
+
"143": ["canonical", "eip155"],
|
|
204184
204208
|
"146": ["canonical", "eip155"],
|
|
204185
204209
|
"148": "eip155",
|
|
204186
204210
|
"155": "eip155",
|
|
@@ -205584,6 +205608,7 @@ var require_safe = __commonJS({
|
|
|
205584
205608
|
"130": "canonical",
|
|
205585
205609
|
"133": "canonical",
|
|
205586
205610
|
"137": "canonical",
|
|
205611
|
+
"143": "canonical",
|
|
205587
205612
|
"146": "canonical",
|
|
205588
205613
|
"155": "canonical",
|
|
205589
205614
|
"169": "canonical",
|
|
@@ -207944,6 +207969,7 @@ var require_gnosis_safe_l22 = __commonJS({
|
|
|
207944
207969
|
"130": ["canonical", "eip155"],
|
|
207945
207970
|
"133": "canonical",
|
|
207946
207971
|
"137": ["canonical", "eip155"],
|
|
207972
|
+
"143": ["canonical", "eip155"],
|
|
207947
207973
|
"146": ["canonical", "eip155"],
|
|
207948
207974
|
"148": "eip155",
|
|
207949
207975
|
"155": "eip155",
|
|
@@ -209452,6 +209478,7 @@ var require_safe_l22 = __commonJS({
|
|
|
209452
209478
|
"130": "canonical",
|
|
209453
209479
|
"133": "canonical",
|
|
209454
209480
|
"137": "canonical",
|
|
209481
|
+
"143": "canonical",
|
|
209455
209482
|
"146": "canonical",
|
|
209456
209483
|
"155": "canonical",
|
|
209457
209484
|
"169": "canonical",
|
|
@@ -212073,6 +212100,7 @@ var require_multi_send5 = __commonJS({
|
|
|
212073
212100
|
"130": ["canonical", "eip155"],
|
|
212074
212101
|
"133": "canonical",
|
|
212075
212102
|
"137": ["canonical", "eip155"],
|
|
212103
|
+
"143": ["canonical", "eip155"],
|
|
212076
212104
|
"146": ["canonical", "eip155"],
|
|
212077
212105
|
"148": "eip155",
|
|
212078
212106
|
"155": "eip155",
|
|
@@ -212463,6 +212491,7 @@ var require_multi_send6 = __commonJS({
|
|
|
212463
212491
|
"130": "canonical",
|
|
212464
212492
|
"133": "canonical",
|
|
212465
212493
|
"137": "canonical",
|
|
212494
|
+
"143": "canonical",
|
|
212466
212495
|
"146": "canonical",
|
|
212467
212496
|
"155": "canonical",
|
|
212468
212497
|
"169": "canonical",
|
|
@@ -212865,6 +212894,7 @@ var require_multi_send_call_only3 = __commonJS({
|
|
|
212865
212894
|
"130": ["canonical", "eip155"],
|
|
212866
212895
|
"133": "canonical",
|
|
212867
212896
|
"137": ["canonical", "eip155"],
|
|
212897
|
+
"143": ["canonical", "eip155"],
|
|
212868
212898
|
"146": ["canonical", "eip155"],
|
|
212869
212899
|
"148": "eip155",
|
|
212870
212900
|
"155": "eip155",
|
|
@@ -213250,6 +213280,7 @@ var require_multi_send_call_only4 = __commonJS({
|
|
|
213250
213280
|
"130": "canonical",
|
|
213251
213281
|
"133": "canonical",
|
|
213252
213282
|
"137": "canonical",
|
|
213283
|
+
"143": "canonical",
|
|
213253
213284
|
"146": "canonical",
|
|
213254
213285
|
"155": "canonical",
|
|
213255
213286
|
"169": "canonical",
|
|
@@ -213642,6 +213673,7 @@ var require_create_call3 = __commonJS({
|
|
|
213642
213673
|
"130": ["canonical", "eip155"],
|
|
213643
213674
|
"133": "canonical",
|
|
213644
213675
|
"137": ["canonical", "eip155"],
|
|
213676
|
+
"143": ["canonical", "eip155"],
|
|
213645
213677
|
"146": ["canonical", "eip155"],
|
|
213646
213678
|
"148": "eip155",
|
|
213647
213679
|
"155": "eip155",
|
|
@@ -214080,6 +214112,7 @@ var require_create_call4 = __commonJS({
|
|
|
214080
214112
|
"130": "canonical",
|
|
214081
214113
|
"133": "canonical",
|
|
214082
214114
|
"137": "canonical",
|
|
214115
|
+
"143": "canonical",
|
|
214083
214116
|
"146": "canonical",
|
|
214084
214117
|
"155": "canonical",
|
|
214085
214118
|
"169": "canonical",
|
|
@@ -214578,6 +214611,7 @@ var require_sign_message_lib3 = __commonJS({
|
|
|
214578
214611
|
"130": ["canonical", "eip155"],
|
|
214579
214612
|
"133": "canonical",
|
|
214580
214613
|
"137": ["canonical", "eip155"],
|
|
214614
|
+
"143": ["canonical", "eip155"],
|
|
214581
214615
|
"146": ["canonical", "eip155"],
|
|
214582
214616
|
"148": "eip155",
|
|
214583
214617
|
"155": "eip155",
|
|
@@ -214995,6 +215029,7 @@ var require_sign_message_lib4 = __commonJS({
|
|
|
214995
215029
|
"130": "canonical",
|
|
214996
215030
|
"133": "canonical",
|
|
214997
215031
|
"137": "canonical",
|
|
215032
|
+
"143": "canonical",
|
|
214998
215033
|
"146": "canonical",
|
|
214999
215034
|
"155": "canonical",
|
|
215000
215035
|
"169": "canonical",
|
|
@@ -215416,6 +215451,7 @@ var require_safe_migration = __commonJS({
|
|
|
215416
215451
|
"130": "canonical",
|
|
215417
215452
|
"133": "canonical",
|
|
215418
215453
|
"137": "canonical",
|
|
215454
|
+
"143": "canonical",
|
|
215419
215455
|
"146": "canonical",
|
|
215420
215456
|
"177": "canonical",
|
|
215421
215457
|
"181": "canonical",
|
|
@@ -215916,6 +215952,7 @@ var require_safe_to_l2_migration = __commonJS({
|
|
|
215916
215952
|
"130": "canonical",
|
|
215917
215953
|
"133": "canonical",
|
|
215918
215954
|
"137": "canonical",
|
|
215955
|
+
"143": "canonical",
|
|
215919
215956
|
"146": "canonical",
|
|
215920
215957
|
"177": "canonical",
|
|
215921
215958
|
"181": "canonical",
|
|
@@ -216337,6 +216374,7 @@ var require_safe_to_l2_setup = __commonJS({
|
|
|
216337
216374
|
"130": "canonical",
|
|
216338
216375
|
"133": "canonical",
|
|
216339
216376
|
"137": "canonical",
|
|
216377
|
+
"143": "canonical",
|
|
216340
216378
|
"146": "canonical",
|
|
216341
216379
|
"177": "canonical",
|
|
216342
216380
|
"181": "canonical",
|
|
@@ -217810,6 +217848,7 @@ var require_allowance_module2 = __commonJS({
|
|
|
217810
217848
|
"100": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217811
217849
|
"130": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217812
217850
|
"137": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217851
|
+
"143": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217813
217852
|
"3338": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217814
217853
|
"43111": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
217815
217854
|
"80094": "0xAA46724893dedD72658219405185Fb0Fc91e091C",
|
|
@@ -218580,6 +218619,7 @@ var require_safe_4337_module = __commonJS({
|
|
|
218580
218619
|
"100": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218581
218620
|
"130": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218582
218621
|
"137": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218622
|
+
"143": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218583
218623
|
"480": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218584
218624
|
"3338": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
218585
218625
|
"8453": "0x75cf11467937ce3F2f357CE24ffc3DBF8fD5c226",
|
|
@@ -219807,6 +219847,7 @@ var require_safe_module_setup = __commonJS({
|
|
|
219807
219847
|
"100": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219808
219848
|
"130": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219809
219849
|
"137": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219850
|
+
"143": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219810
219851
|
"480": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219811
219852
|
"3338": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
219812
219853
|
"8453": "0x2dd68b007B46fBe91B9A7c3EDa5A7a1063cB5b47",
|
|
@@ -224024,7 +224065,7 @@ var require_base3 = __commonJS({
|
|
|
224024
224065
|
"../../node_modules/viem/_cjs/chains/definitions/base.js"(exports2) {
|
|
224025
224066
|
"use strict";
|
|
224026
224067
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
224027
|
-
exports2.base = void 0;
|
|
224068
|
+
exports2.basePreconf = exports2.base = void 0;
|
|
224028
224069
|
var chainConfig_js_1 = require_chainConfig2();
|
|
224029
224070
|
var defineChain_js_1 = require_defineChain();
|
|
224030
224071
|
var sourceId5 = 1;
|
|
@@ -224076,6 +224117,15 @@ var require_base3 = __commonJS({
|
|
|
224076
224117
|
},
|
|
224077
224118
|
sourceId: sourceId5
|
|
224078
224119
|
});
|
|
224120
|
+
exports2.basePreconf = (0, defineChain_js_1.defineChain)({
|
|
224121
|
+
...exports2.base,
|
|
224122
|
+
experimental_preconfirmationTime: 200,
|
|
224123
|
+
rpcUrls: {
|
|
224124
|
+
default: {
|
|
224125
|
+
http: ["https://mainnet-preconf.base.org"]
|
|
224126
|
+
}
|
|
224127
|
+
}
|
|
224128
|
+
});
|
|
224079
224129
|
}
|
|
224080
224130
|
});
|
|
224081
224131
|
|
|
@@ -224165,7 +224215,7 @@ var require_baseSepolia = __commonJS({
|
|
|
224165
224215
|
"../../node_modules/viem/_cjs/chains/definitions/baseSepolia.js"(exports2) {
|
|
224166
224216
|
"use strict";
|
|
224167
224217
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
224168
|
-
exports2.baseSepolia = void 0;
|
|
224218
|
+
exports2.baseSepoliaPreconf = exports2.baseSepolia = void 0;
|
|
224169
224219
|
var chainConfig_js_1 = require_chainConfig2();
|
|
224170
224220
|
var defineChain_js_1 = require_defineChain();
|
|
224171
224221
|
var sourceId5 = 11155111;
|
|
@@ -224219,6 +224269,15 @@ var require_baseSepolia = __commonJS({
|
|
|
224219
224269
|
testnet: true,
|
|
224220
224270
|
sourceId: sourceId5
|
|
224221
224271
|
});
|
|
224272
|
+
exports2.baseSepoliaPreconf = (0, defineChain_js_1.defineChain)({
|
|
224273
|
+
...exports2.baseSepolia,
|
|
224274
|
+
experimental_preconfirmationTime: 200,
|
|
224275
|
+
rpcUrls: {
|
|
224276
|
+
default: {
|
|
224277
|
+
http: ["https://sepolia-preconf.base.org"]
|
|
224278
|
+
}
|
|
224279
|
+
}
|
|
224280
|
+
});
|
|
224222
224281
|
}
|
|
224223
224282
|
});
|
|
224224
224283
|
|
|
@@ -243666,19 +243725,19 @@ var require_chains2 = __commonJS({
|
|
|
243666
243725
|
"../../node_modules/viem/_cjs/chains/index.js"(exports2) {
|
|
243667
243726
|
"use strict";
|
|
243668
243727
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
243669
|
-
exports2.
|
|
243670
|
-
exports2.
|
|
243671
|
-
exports2.
|
|
243672
|
-
exports2.
|
|
243673
|
-
exports2.
|
|
243674
|
-
exports2.
|
|
243675
|
-
exports2.
|
|
243676
|
-
exports2.
|
|
243677
|
-
exports2.
|
|
243678
|
-
exports2.
|
|
243679
|
-
exports2.
|
|
243680
|
-
exports2.
|
|
243681
|
-
exports2.zoraTestnet = exports2.zoraSepolia = exports2.zora = exports2.zksyncSepoliaTestnet = exports2.zkSyncSepoliaTestnet = exports2.zksyncLocalNode = exports2.zkSyncLocalNode = void 0;
|
|
243728
|
+
exports2.bearNetworkChainTestnet = exports2.bearNetworkChainMainnet = exports2.beamTestnet = exports2.beam = exports2.baseSepoliaPreconf = exports2.baseSepolia = exports2.baseGoerli = exports2.basecampTestnet = exports2.basePreconf = exports2.base = exports2.bahamut = exports2.b3Sepolia = exports2.b3 = exports2.avalancheFuji = exports2.avalanche = exports2.auroria = exports2.auroraTestnet = exports2.aurora = exports2.atletaOlympia = exports2.astarZkyoto = exports2.astarZkEVM = exports2.astar = exports2.assetChainTestnet = exports2.assetChain = exports2.artheraTestnet = exports2.arthera = exports2.artelaTestnet = exports2.areonNetworkTestnet = exports2.areonNetwork = exports2.arenaz = exports2.arbitrumSepolia = exports2.arbitrumNova = exports2.arbitrumGoerli = exports2.arbitrum = exports2.apexTestnet = exports2.apeChain = exports2.anvil = exports2.ancient8Sepolia = exports2.ancient8 = exports2.alienxHalTestnet = exports2.alienx = exports2.alephZeroTestnet = exports2.alephZero = exports2.aioz = exports2.adf = exports2.acria = exports2.acala = exports2.abstractTestnet = exports2.abstract = exports2.abey = void 0;
|
|
243729
|
+
exports2.coreDao = exports2.confluxESpaceTestnet = exports2.confluxESpace = exports2.coinex = exports2.coinbit = exports2.classic = exports2.citreaTestnet = exports2.chips = exports2.chiliz = exports2.chang = exports2.celoAlfajores = exports2.celo = exports2.canto = exports2.cannon = exports2.bxnTestnet = exports2.bxn = exports2.btrTestnet = exports2.btr = exports2.bsquaredTestnet = exports2.bsquared = exports2.bscTestnet = exports2.bscGreenfield = exports2.bsc = exports2.bronosTestnet = exports2.bronos = exports2.bounceBitTestnet = exports2.bounceBit = exports2.botanixTestnet = exports2.boolBetaMainnet = exports2.bobSepolia = exports2.bobaSepolia = exports2.boba = exports2.bob = exports2.blastSepolia = exports2.blast = exports2.birdlayer = exports2.bitTorrentTestnet = exports2.bitTorrent = exports2.bitrock = exports2.bitlayerTestnet = exports2.bitlayer = exports2.bitkubTestnet = exports2.bitkub = exports2.bitgert = exports2.bifrost = exports2.bevmMainnet = exports2.berachainTestnetbArtio = exports2.berachainTestnet = exports2.berachainBepolia = exports2.berachain = void 0;
|
|
243730
|
+
exports2.electroneum = exports2.elastosTestnet = exports2.elastos = exports2.ektaTestnet = exports2.ekta = exports2.eduChainTestnet = exports2.eduChain = exports2.edgewareTestnet = exports2.edgeware = exports2.edgelessTestnet = exports2.edgeless = exports2.edexa = exports2.edexaTestnet = exports2.dymension = exports2.dustboyIoT = exports2.dreyerxTestnet = exports2.dreyerxMainnet = exports2.dosChainTestnet = exports2.dosChain = exports2.donatuz = exports2.dogechain = exports2.dodochainTestnet = exports2.disChain = exports2.diode = exports2.dfk = exports2.degen = exports2.defichainEvmTestnet = exports2.defichainEvm = exports2.dchainTestnet = exports2.dchain = exports2.dbkchain = exports2.darwinia = exports2.dailyNetworkTestnet = exports2.dailyNetwork = exports2.cyberTestnet = exports2.cyber = exports2.curtis = exports2.crossbell = exports2.cronoszkEVMTestnet = exports2.cronoszkEVM = exports2.cronosTestnet = exports2.cronos = exports2.creditCoin3Testnet = exports2.creditCoin3Mainnet = exports2.creatorTestnet = exports2.crab = exports2.cornTestnet = exports2.corn = exports2.coreTestnet2 = exports2.coreTestnet1 = void 0;
|
|
243731
|
+
exports2.garnet = exports2.fusionTestnet = exports2.fusion = exports2.fuseSparknet = exports2.fuse = exports2.funkiSepolia = exports2.funkiMainnet = exports2.fraxtalTestnet = exports2.fraxtal = exports2.foundry = exports2.forta = exports2.formTestnet = exports2.formicarium = exports2.form = exports2.forma = exports2.fluentTestnet = exports2.fluenceTestnet = exports2.fluenceStage = exports2.fluence = exports2.flowTestnet = exports2.flowPreviewnet = exports2.flowMainnet = exports2.flareTestnet = exports2.flare = exports2.flame = exports2.fireChain = exports2.filecoinHyperspace = exports2.filecoinCalibration = exports2.filecoin = exports2.fibo = exports2.fantomTestnet = exports2.fantomSonicTestnet = exports2.fantom = exports2.exsatTestnet = exports2.exsat = exports2.expanse = exports2.excelonMainnet = exports2.evmosTestnet = exports2.evmos = exports2.etp = exports2.ethernity = exports2.etherlinkTestnet = exports2.etherlink = exports2.eosTestnet = exports2.eos = exports2.eon = exports2.enuls = exports2.energy = exports2.elysiumTestnet = exports2.electroneumTestnet = void 0;
|
|
243732
|
+
exports2.iota = exports2.inkSepolia = exports2.ink = exports2.initVerseGenesis = exports2.initVerse = exports2.inEVM = exports2.immutableZkEvmTestnet = exports2.immutableZkEvm = exports2.idchain = exports2.hychainTestnet = exports2.hychain = exports2.humanodeTestnet5 = exports2.humanode = exports2.huddle01Testnet = exports2.huddle01Mainnet = exports2.hpb = exports2.hoodi = exports2.holesky = exports2.hemiSepolia = exports2.hemi = exports2.hela = exports2.hederaTestnet = exports2.hederaPreviewnet = exports2.hedera = exports2.haustTestnet = exports2.hashkeyTestnet = exports2.hashkey = exports2.harmonyOne = exports2.hardhat = exports2.haqqTestedge2 = exports2.haqqMainnet = exports2.happychainTestnet = exports2.ham = exports2.guruTestnet = exports2.guruNetwork = exports2.gunz = exports2.gravity = exports2.graphiteTestnet = exports2.graphite = exports2.goerli = exports2.godwoken = exports2.goChain = exports2.gobi = exports2.goat = exports2.gnosisChiado = exports2.gnosis = exports2.glideL2Protocol = exports2.glideL1Protocol = exports2.genesys = exports2.geist = void 0;
|
|
243733
|
+
exports2.liskSepolia = exports2.lisk = exports2.lineaTestnet = exports2.lineaSepolia = exports2.lineaGoerli = exports2.linea = exports2.lightlinkPhoenix = exports2.lightlinkPegasus = exports2.lestnet = exports2.lensTestnet = exports2.lens = exports2.lavita = exports2.l3xTestnet = exports2.l3x = exports2.kromaSepolia = exports2.kroma = exports2.koi = exports2.klaytnBaobab = exports2.kairos = exports2.kaia = exports2.klaytn = exports2.kinto = exports2.kcc = exports2.kavaTestnet = exports2.kava = exports2.kardiaChain = exports2.kakarotStarknetSepolia = exports2.kakarotSepolia = exports2.karura = exports2.juneoUSDT1Chain = exports2.juneoUSD1Chain = exports2.juneoSocotraTestnet = exports2.juneoSGD1Chain = exports2.juneomBTC1Chain = exports2.juneoLTC1Chain = exports2.juneoLINK1Chain = exports2.juneoGLD1Chain = exports2.juneoEUR1Chain = exports2.juneoDOGE1Chain = exports2.juneoDAI1Chain = exports2.juneoBCH1Chain = exports2.juneo = exports2.jocTestnet = exports2.jocMainnet = exports2.jbcTestnet = exports2.jbc = exports2.iSunCoin = exports2.iotexTestnet = exports2.iotex = exports2.iotaTestnet = void 0;
|
|
243734
|
+
exports2.morph = exports2.moonriver = exports2.moonbeamDev = exports2.moonbeam = exports2.moonbaseAlpha = exports2.monadTestnet = exports2.modeTestnet = exports2.mode = exports2.mitosisTestnet = exports2.mintSepoliaTestnet = exports2.mint = exports2.mevTestnet = exports2.mev = exports2.metisGoerli = exports2.metisSepolia = exports2.metis = exports2.meterTestnet = exports2.meter = exports2.metalL2 = exports2.metadium = exports2.metachainIstanbul = exports2.metachain = exports2.merlinErigonTestnet = exports2.merlin = exports2.memecore = exports2.meld = exports2.mekong = exports2.megaethTestnet = exports2.mchVerse = exports2.matchainTestnet = exports2.matchain = exports2.mapProtocol = exports2.mantleTestnet = exports2.mantleSepoliaTestnet = exports2.mantle = exports2.mantaTestnet = exports2.mantaSepoliaTestnet = exports2.manta = exports2.mandala = exports2.mainnet = exports2.lyra = exports2.lycan = exports2.lumozTestnet = exports2.lumoz = exports2.lumiaTestnet = exports2.lumiaMainnet = exports2.luksoTestnet = exports2.lukso = exports2.loop = exports2.localhost = void 0;
|
|
243735
|
+
exports2.polygon = exports2.polterTestnet = exports2.plumeTestnet = exports2.plumeSepolia = exports2.plumeMainnet = exports2.plumeDevnet = exports2.plume = exports2.plinga = exports2.playfiAlbireo = exports2.plasmaTestnet = exports2.planq = exports2.phoenix = exports2.pgnTestnet = exports2.pgn = exports2.peaq = exports2.palmTestnet = exports2.palm = exports2.otimDevnet = exports2.orderlySepolia = exports2.orderly = exports2.optopiaTestnet = exports2.optopia = exports2.optimismSepolia = exports2.optimismGoerli = exports2.optimism = exports2.opBNBTestnet = exports2.opBNB = exports2.oortMainnetDev = exports2.oneWorld = exports2.omniOmega = exports2.omni = exports2.omax = exports2.okc = exports2.odysseyTestnet = exports2.oasys = exports2.oasisTestnet = exports2.nibiru = exports2.nexilix = exports2.nexi = exports2.newton = exports2.neoxT4 = exports2.neoxMainnet = exports2.neonMainnet = exports2.neonDevnet = exports2.nearTestnet = exports2.near = exports2.nautilus = exports2.nahmii = exports2.morphSepolia = exports2.morphHolesky = void 0;
|
|
243736
|
+
exports2.shardeum = exports2.shapeSepolia = exports2.shape = exports2.sepolia = exports2.seiTestnet = exports2.seismicDevnet = exports2.seiDevnet = exports2.sei = exports2.scrollSepolia = exports2.satoshiVMTestnet = exports2.satoshiVM = exports2.sapphireTestnet = exports2.sapphire = exports2.sanko = exports2.saigon = exports2.saga = exports2.saakuru = exports2.rss3Sepolia = exports2.rss3 = exports2.rootstockTestnet = exports2.rootstock = exports2.rootPorcini = exports2.root = exports2.ronin = exports2.rolluxTestnet = exports2.rollux = exports2.rivalz = exports2.riseTestnet = exports2.reddioSepolia = exports2.reyaNetwork = exports2.rei = exports2.redstone = exports2.redbellyTestnet = exports2.redbellyMainnet = exports2.real = exports2.qTestnet = exports2.qMainnet = exports2.ql1 = exports2.pyrope = exports2.pumpfiTestnet = exports2.pulsechainV4 = exports2.pulsechain = exports2.premiumBlockTestnet = exports2.polynomialSepolia = exports2.polynomial = exports2.polygonZkEvmTestnet = exports2.polygonZkEvmCardona = exports2.polygonZkEvm = exports2.polygonMumbai = exports2.polygonAmoy = void 0;
|
|
243737
|
+
exports2.superseedSepolia = exports2.superseed = exports2.superposition = exports2.superlumio = exports2.stratis = exports2.storyTestnet = exports2.storyOdyssey = exports2.storyAeneid = exports2.story = exports2.step = exports2.statusNetworkSepolia = exports2.statusSepolia = exports2.spicy = exports2.sophonTestnet = exports2.sophon = exports2.songbirdTestnet = exports2.songbird = exports2.sonicBlazeTestnet = exports2.sonicTestnet = exports2.sonic = exports2.soneiumMinato = exports2.soneium = exports2.somniaTestnet = exports2.snaxTestnet = exports2.snax = exports2.sketchpad = exports2.skaleTitanTestnet = exports2.skaleTitan = exports2.skaleRazor = exports2.skaleNebulaTestnet = exports2.skaleNebula = exports2.skaleHumanProtocol = exports2.skaleExorde = exports2.skaleEuropaTestnet = exports2.skaleEuropa = exports2.skaleCryptoColosseum = exports2.skaleCryptoBlades = exports2.skaleCalypsoTestnet = exports2.skaleCalypso = exports2.skaleBlockBrawlers = exports2.sixProtocol = exports2.siliconSepolia = exports2.silicon = exports2.sidraChain = exports2.shimmerTestnet = exports2.shimmer = exports2.shiden = exports2.shibariumTestnet = exports2.shibarium = exports2.shardeumSphinx = void 0;
|
|
243738
|
+
exports2.victionTestnet = exports2.viction = exports2.velas = exports2.vechain = exports2.vanar = exports2.unreal = exports2.uniqueQuartz = exports2.uniqueOpal = exports2.unique = exports2.unichainSepolia = exports2.unichain = exports2.ultronTestnet = exports2.ultron = exports2.ultraTestnet = exports2.ultra = exports2.ubiq = exports2.tronShasta = exports2.tron = exports2.treasureTopaz = exports2.treasure = exports2.tomb = exports2.tiktrixTestnet = exports2.thunderTestnet = exports2.thunderCore = exports2.thetaTestnet = exports2.theta = exports2.that = exports2.thaiChain = exports2.ternoa = exports2.tenet = exports2.telosTestnet = exports2.telos = exports2.telcoinTestnet = exports2.taraxaTestnet = exports2.taraxa = exports2.taikoTestnetSepolia = exports2.taikoKatla = exports2.taikoJolnir = exports2.taikoHekla = exports2.taiko = exports2.tacSPB = exports2.tac = exports2.syscoinTestnet = exports2.syscoin = exports2.swissdlt = exports2.swellchainTestnet = exports2.swellchain = exports2.swanSaturnTestnet = exports2.swanProximaTestnet = exports2.swan = void 0;
|
|
243739
|
+
exports2.zksyncLocalCustomHyperchain = exports2.zksyncInMemoryNode = exports2.zkSyncInMemoryNode = exports2.zksync = exports2.zkSync = exports2.zkLinkNovaSepoliaTestnet = exports2.zkLinkNova = exports2.zkFairTestnet = exports2.zkFair = exports2.zircuitTestnet = exports2.zircuitGarfieldTestnet = exports2.zircuit = exports2.zilliqaTestnet = exports2.zilliqa = exports2.zhejiang = exports2.zetachainAthensTestnet = exports2.zetachain = exports2.zeroNetwork = exports2.zeroG = exports2.zeniq = exports2.zenchainTestnet = exports2.yooldoVerseTestnet = exports2.yooldoVerse = exports2.xrSepolia = exports2.xrplevmTestnet = exports2.xrplevmDevnet = exports2.xrOne = exports2.xphereTestnet = exports2.xphereMainnet = exports2.xLayerTestnet = exports2.x1Testnet = exports2.xLayer = exports2.xdcTestnet = exports2.xdc = exports2.xaiTestnet = exports2.xai = exports2.worldLand = exports2.worldchainSepolia = exports2.worldchain = exports2.wmcTestnet = exports2.whitechainTestnet = exports2.whitechain = exports2.westendAssetHub = exports2.wemixTestnet = exports2.wemix = exports2.weaveVMAlphanet = exports2.wanchainTestnet = exports2.wanchain = exports2.visionTestnet = exports2.vision = void 0;
|
|
243740
|
+
exports2.zoraTestnet = exports2.zoraSepolia = exports2.zora = exports2.zksyncSepoliaTestnet = exports2.zkSyncSepoliaTestnet = exports2.zksyncLocalNode = exports2.zkSyncLocalNode = exports2.zksyncLocalHyperchainL1 = exports2.zksyncLocalHyperchain = void 0;
|
|
243682
243741
|
var abey_js_1 = require_abey();
|
|
243683
243742
|
Object.defineProperty(exports2, "abey", { enumerable: true, get: function() {
|
|
243684
243743
|
return abey_js_1.abey;
|
|
@@ -243843,6 +243902,9 @@ var require_chains2 = __commonJS({
|
|
|
243843
243902
|
Object.defineProperty(exports2, "base", { enumerable: true, get: function() {
|
|
243844
243903
|
return base_js_1.base;
|
|
243845
243904
|
} });
|
|
243905
|
+
Object.defineProperty(exports2, "basePreconf", { enumerable: true, get: function() {
|
|
243906
|
+
return base_js_1.basePreconf;
|
|
243907
|
+
} });
|
|
243846
243908
|
var basecampTestnet_js_1 = require_basecampTestnet();
|
|
243847
243909
|
Object.defineProperty(exports2, "basecampTestnet", { enumerable: true, get: function() {
|
|
243848
243910
|
return basecampTestnet_js_1.basecampTestnet;
|
|
@@ -243855,6 +243917,9 @@ var require_chains2 = __commonJS({
|
|
|
243855
243917
|
Object.defineProperty(exports2, "baseSepolia", { enumerable: true, get: function() {
|
|
243856
243918
|
return baseSepolia_js_1.baseSepolia;
|
|
243857
243919
|
} });
|
|
243920
|
+
Object.defineProperty(exports2, "baseSepoliaPreconf", { enumerable: true, get: function() {
|
|
243921
|
+
return baseSepolia_js_1.baseSepoliaPreconf;
|
|
243922
|
+
} });
|
|
243858
243923
|
var beam_js_1 = require_beam();
|
|
243859
243924
|
Object.defineProperty(exports2, "beam", { enumerable: true, get: function() {
|
|
243860
243925
|
return beam_js_1.beam;
|
|
@@ -364367,8 +364432,7 @@ function formatBlock(block) {
|
|
|
364367
364432
|
var defineBlock = /* @__PURE__ */ defineFormatter("block", formatBlock);
|
|
364368
364433
|
|
|
364369
364434
|
// ../../node_modules/viem/_esm/actions/public/getBlock.js
|
|
364370
|
-
async function getBlock(client, { blockHash, blockNumber, blockTag
|
|
364371
|
-
const blockTag = blockTag_ ?? "latest";
|
|
364435
|
+
async function getBlock(client, { blockHash, blockNumber, blockTag = client.experimental_blockTag ?? "latest", includeTransactions: includeTransactions_ } = {}) {
|
|
364372
364436
|
const includeTransactions = includeTransactions_ ?? false;
|
|
364373
364437
|
const blockNumberHex = blockNumber !== void 0 ? numberToHex(blockNumber) : void 0;
|
|
364374
364438
|
let block = null;
|
|
@@ -364838,7 +364902,7 @@ async function prepareTransactionRequest(client, args) {
|
|
|
364838
364902
|
|
|
364839
364903
|
// ../../node_modules/viem/_esm/actions/public/getBalance.js
|
|
364840
364904
|
init_toHex();
|
|
364841
|
-
async function getBalance(client, { address, blockNumber, blockTag = "latest" }) {
|
|
364905
|
+
async function getBalance(client, { address, blockNumber, blockTag = client.experimental_blockTag ?? "latest" }) {
|
|
364842
364906
|
const blockNumberHex = typeof blockNumber === "bigint" ? numberToHex(blockNumber) : void 0;
|
|
364843
364907
|
const balance = await client.request({
|
|
364844
364908
|
method: "eth_getBalance",
|
|
@@ -364856,7 +364920,11 @@ async function estimateGas(client, args) {
|
|
|
364856
364920
|
const { block: block2, request: request2, rpcStateOverride: rpcStateOverride2 } = parameters;
|
|
364857
364921
|
return client.request({
|
|
364858
364922
|
method: "eth_estimateGas",
|
|
364859
|
-
params: rpcStateOverride2 ? [
|
|
364923
|
+
params: rpcStateOverride2 ? [
|
|
364924
|
+
request2,
|
|
364925
|
+
block2 ?? client.experimental_blockTag ?? "latest",
|
|
364926
|
+
rpcStateOverride2
|
|
364927
|
+
] : block2 ? [request2, block2] : [request2]
|
|
364860
364928
|
});
|
|
364861
364929
|
};
|
|
364862
364930
|
const { accessList, authorizationList, blobs, blobVersionedHashes, blockNumber, blockTag, data, gas, gasPrice, maxFeePerBlobGas, maxFeePerGas, maxPriorityFeePerGas, nonce, value, stateOverride, ...rest } = await prepareTransactionRequest(client, {
|
|
@@ -366310,6 +366378,7 @@ function uid(length = 11) {
|
|
|
366310
366378
|
// ../../node_modules/viem/_esm/clients/createClient.js
|
|
366311
366379
|
function createClient(parameters) {
|
|
366312
366380
|
const { batch, chain, ccipRead, key = "base", name = "Base Client", type = "base" } = parameters;
|
|
366381
|
+
const experimental_blockTag = parameters.experimental_blockTag ?? (typeof chain?.experimental_preconfirmationTime === "number" ? "pending" : void 0);
|
|
366313
366382
|
const blockTime = chain?.blockTime ?? 12e3;
|
|
366314
366383
|
const defaultPollingInterval = Math.min(Math.max(Math.floor(blockTime / 2), 500), 4e3);
|
|
366315
366384
|
const pollingInterval = parameters.pollingInterval ?? defaultPollingInterval;
|
|
@@ -366332,7 +366401,8 @@ function createClient(parameters) {
|
|
|
366332
366401
|
request,
|
|
366333
366402
|
transport,
|
|
366334
366403
|
type,
|
|
366335
|
-
uid: uid()
|
|
366404
|
+
uid: uid(),
|
|
366405
|
+
...experimental_blockTag ? { experimental_blockTag } : {}
|
|
366336
366406
|
};
|
|
366337
366407
|
function extend2(base2) {
|
|
366338
366408
|
return (extendFn) => {
|
|
@@ -368725,7 +368795,7 @@ init_transactionRequest();
|
|
|
368725
368795
|
init_stateOverride2();
|
|
368726
368796
|
init_assertRequest();
|
|
368727
368797
|
async function simulateBlocks(client, parameters) {
|
|
368728
|
-
const { blockNumber, blockTag = "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
|
368798
|
+
const { blockNumber, blockTag = client.experimental_blockTag ?? "latest", blocks, returnFullTransactions, traceTransfers, validation } = parameters;
|
|
368729
368799
|
try {
|
|
368730
368800
|
const blockStateCalls = [];
|
|
368731
368801
|
for (const block2 of blocks) {
|
|
@@ -370108,17 +370178,25 @@ function watchBlockNumber(client, { emitOnBegin = false, emitMissed = false, onB
|
|
|
370108
370178
|
}
|
|
370109
370179
|
|
|
370110
370180
|
// ../../node_modules/viem/_esm/actions/public/waitForTransactionReceipt.js
|
|
370111
|
-
async function waitForTransactionReceipt(client, {
|
|
370112
|
-
|
|
370113
|
-
|
|
370114
|
-
|
|
370115
|
-
|
|
370116
|
-
|
|
370117
|
-
|
|
370118
|
-
|
|
370119
|
-
|
|
370120
|
-
|
|
370181
|
+
async function waitForTransactionReceipt(client, parameters) {
|
|
370182
|
+
const {
|
|
370183
|
+
checkReplacement = true,
|
|
370184
|
+
confirmations = 1,
|
|
370185
|
+
hash: hash2,
|
|
370186
|
+
onReplaced,
|
|
370187
|
+
retryCount = 6,
|
|
370188
|
+
retryDelay = ({ count }) => ~~(1 << count) * 200,
|
|
370189
|
+
// exponential backoff
|
|
370190
|
+
timeout = 18e4
|
|
370191
|
+
} = parameters;
|
|
370121
370192
|
const observerId = stringify(["waitForTransactionReceipt", client.uid, hash2]);
|
|
370193
|
+
const pollingInterval = (() => {
|
|
370194
|
+
if (parameters.pollingInterval)
|
|
370195
|
+
return parameters.pollingInterval;
|
|
370196
|
+
if (client.chain?.experimental_preconfirmationTime)
|
|
370197
|
+
return client.chain.experimental_preconfirmationTime;
|
|
370198
|
+
return client.pollingInterval;
|
|
370199
|
+
})();
|
|
370122
370200
|
let transaction;
|
|
370123
370201
|
let replacedTransaction;
|
|
370124
370202
|
let receipt;
|
|
@@ -370131,7 +370209,14 @@ async function waitForTransactionReceipt(client, {
|
|
|
370131
370209
|
_unobserve();
|
|
370132
370210
|
reject(new WaitForTransactionReceiptTimeoutError({ hash: hash2 }));
|
|
370133
370211
|
}, timeout) : void 0;
|
|
370134
|
-
_unobserve = observe(observerId, { onReplaced, resolve: resolve2, reject }, (emit) => {
|
|
370212
|
+
_unobserve = observe(observerId, { onReplaced, resolve: resolve2, reject }, async (emit) => {
|
|
370213
|
+
receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash2 }).catch(() => void 0);
|
|
370214
|
+
if (receipt && confirmations <= 1) {
|
|
370215
|
+
clearTimeout(timer);
|
|
370216
|
+
emit.resolve(receipt);
|
|
370217
|
+
_unobserve();
|
|
370218
|
+
return;
|
|
370219
|
+
}
|
|
370135
370220
|
_unwatch = getAction(client, watchBlockNumber, "watchBlockNumber")({
|
|
370136
370221
|
emitMissed: true,
|
|
370137
370222
|
emitOnBegin: true,
|
|
@@ -370154,7 +370239,7 @@ async function waitForTransactionReceipt(client, {
|
|
|
370154
370239
|
done(() => emit.resolve(receipt));
|
|
370155
370240
|
return;
|
|
370156
370241
|
}
|
|
370157
|
-
if (!transaction) {
|
|
370242
|
+
if (checkReplacement && !transaction) {
|
|
370158
370243
|
retrying = true;
|
|
370159
370244
|
await withRetry(async () => {
|
|
370160
370245
|
transaction = await getAction(client, getTransaction, "getTransaction")({ hash: hash2 });
|
|
@@ -370226,7 +370311,7 @@ async function waitForTransactionReceipt(client, {
|
|
|
370226
370311
|
|
|
370227
370312
|
// ../../node_modules/viem/_esm/actions/public/watchBlocks.js
|
|
370228
370313
|
init_stringify();
|
|
370229
|
-
function watchBlocks(client, { blockTag = "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
|
370314
|
+
function watchBlocks(client, { blockTag = client.experimental_blockTag ?? "latest", emitMissed = false, emitOnBegin = false, onBlock, onError, includeTransactions: includeTransactions_, poll: poll_, pollingInterval = client.pollingInterval }) {
|
|
370230
370315
|
const enablePolling = (() => {
|
|
370231
370316
|
if (typeof poll_ !== "undefined")
|
|
370232
370317
|
return poll_;
|
|
@@ -373119,7 +373204,10 @@ var tokenDataByNetwork = {
|
|
|
373119
373204
|
WXTZ: NOT_DEPLOYED,
|
|
373120
373205
|
mBASIS: NOT_DEPLOYED,
|
|
373121
373206
|
mTBILL: NOT_DEPLOYED,
|
|
373122
|
-
PT_sUSDX_1SEP2025: NOT_DEPLOYED
|
|
373207
|
+
PT_sUSDX_1SEP2025: NOT_DEPLOYED,
|
|
373208
|
+
lskETH: NOT_DEPLOYED,
|
|
373209
|
+
hemiBTC: NOT_DEPLOYED,
|
|
373210
|
+
bfBTC: NOT_DEPLOYED
|
|
373123
373211
|
},
|
|
373124
373212
|
///
|
|
373125
373213
|
///
|
|
@@ -373330,8 +373418,14 @@ var tokenDataByNetwork = {
|
|
|
373330
373418
|
WXTZ: "0xc9b53ab2679f573e480d01e0f49e2b5cfb7a3eab",
|
|
373331
373419
|
mTBILL: "0xdd629e5241cbc5919847783e6c96b2de4754e438"
|
|
373332
373420
|
},
|
|
373333
|
-
Hemi: {
|
|
373334
|
-
|
|
373421
|
+
Hemi: {
|
|
373422
|
+
hemiBTC: "0xAA40c0c7644e0b2B224509571e10ad20d9C4ef28",
|
|
373423
|
+
bfBTC: "0x623F2774d9f27B59bc6b954544487532CE79d9DF"
|
|
373424
|
+
},
|
|
373425
|
+
Lisk: {
|
|
373426
|
+
wstETH: "0x76D8de471F54aAA87784119c60Df1bbFc852C415",
|
|
373427
|
+
lskETH: "0x1b10E2270780858923cdBbC9B5423e29fffD1A44"
|
|
373428
|
+
}
|
|
373335
373429
|
};
|
|
373336
373430
|
var tickerInfoTokensByNetwork = {
|
|
373337
373431
|
Mainnet: {
|
|
@@ -384451,6 +384545,28 @@ var AddressMap = class _AddressMap {
|
|
|
384451
384545
|
}
|
|
384452
384546
|
};
|
|
384453
384547
|
|
|
384548
|
+
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/utils/AddressSet.js
|
|
384549
|
+
var AddressSet = class extends Set {
|
|
384550
|
+
constructor(entries) {
|
|
384551
|
+
super(Array.from(entries ?? []).map((a) => getAddress(a)));
|
|
384552
|
+
}
|
|
384553
|
+
add(value) {
|
|
384554
|
+
return super.add(getAddress(value));
|
|
384555
|
+
}
|
|
384556
|
+
delete(value) {
|
|
384557
|
+
return super.delete(getAddress(value));
|
|
384558
|
+
}
|
|
384559
|
+
has(value) {
|
|
384560
|
+
return super.has(getAddress(value));
|
|
384561
|
+
}
|
|
384562
|
+
asArray() {
|
|
384563
|
+
return Array.from(this);
|
|
384564
|
+
}
|
|
384565
|
+
map(fn) {
|
|
384566
|
+
return this.asArray().map(fn);
|
|
384567
|
+
}
|
|
384568
|
+
};
|
|
384569
|
+
|
|
384454
384570
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/utils/bytes32ToString.js
|
|
384455
384571
|
function bytes32ToString(bytes) {
|
|
384456
384572
|
return bytesToString(toBytes(bytes)).replaceAll("\0", "");
|
|
@@ -384740,6 +384856,15 @@ var base = /* @__PURE__ */ defineChain({
|
|
|
384740
384856
|
},
|
|
384741
384857
|
sourceId
|
|
384742
384858
|
});
|
|
384859
|
+
var basePreconf = /* @__PURE__ */ defineChain({
|
|
384860
|
+
...base,
|
|
384861
|
+
experimental_preconfirmationTime: 200,
|
|
384862
|
+
rpcUrls: {
|
|
384863
|
+
default: {
|
|
384864
|
+
http: ["https://mainnet-preconf.base.org"]
|
|
384865
|
+
}
|
|
384866
|
+
}
|
|
384867
|
+
});
|
|
384743
384868
|
|
|
384744
384869
|
// ../../node_modules/viem/_esm/chains/definitions/berachain.js
|
|
384745
384870
|
var berachain = /* @__PURE__ */ defineChain({
|
|
@@ -396500,16 +396625,28 @@ var chains = {
|
|
|
396500
396625
|
...hemi,
|
|
396501
396626
|
network: "Hemi",
|
|
396502
396627
|
defaultMarketConfigurators: {},
|
|
396628
|
+
testMarketConfigurators: {
|
|
396629
|
+
"0xc9961b8a0c763779690577f2c76962c086af2fe3": "Invariant"
|
|
396630
|
+
},
|
|
396503
396631
|
isPublic: false,
|
|
396504
396632
|
wellKnownToken: {
|
|
396505
396633
|
address: "0xad11a8BEb98bbf61dbb1aa0F6d6F2ECD87b35afA",
|
|
396506
396634
|
symbol: "USDC.e"
|
|
396635
|
+
},
|
|
396636
|
+
contracts: {
|
|
396637
|
+
multicall3: {
|
|
396638
|
+
address: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
396639
|
+
blockCreated: 484490
|
|
396640
|
+
}
|
|
396507
396641
|
}
|
|
396508
396642
|
}),
|
|
396509
396643
|
Lisk: defineChain({
|
|
396510
396644
|
...lisk,
|
|
396511
396645
|
network: "Lisk",
|
|
396512
396646
|
defaultMarketConfigurators: {},
|
|
396647
|
+
testMarketConfigurators: {
|
|
396648
|
+
"0x25778dbf0e56b7feb8358c4aa2f6f9e19a1c145a": "Re7"
|
|
396649
|
+
},
|
|
396513
396650
|
isPublic: false,
|
|
396514
396651
|
wellKnownToken: {
|
|
396515
396652
|
address: "0xF242275d3a6527d877f2c927a82D9b057609cc71",
|
|
@@ -404590,8 +404727,8 @@ var AbstractRouterContract = class extends BaseContract {
|
|
|
404590
404727
|
hooks = new Hooks();
|
|
404591
404728
|
addHook = this.hooks.addHook.bind(this.hooks);
|
|
404592
404729
|
removeHook = this.hooks.removeHook.bind(this.hooks);
|
|
404593
|
-
getExpectedAndLeftover(ca, cm, balances) {
|
|
404594
|
-
const b = balances || this.getDefaultExpectedAndLeftover(ca);
|
|
404730
|
+
getExpectedAndLeftover(ca, cm, balances, keepAssets) {
|
|
404731
|
+
const b = balances || this.getDefaultExpectedAndLeftover(ca, keepAssets);
|
|
404595
404732
|
const { leftoverBalances, expectedBalances, tokensToClaim } = b;
|
|
404596
404733
|
const expected = new AddressMap();
|
|
404597
404734
|
const leftover = new AddressMap();
|
|
@@ -404609,16 +404746,17 @@ var AbstractRouterContract = class extends BaseContract {
|
|
|
404609
404746
|
tokensToClaim
|
|
404610
404747
|
};
|
|
404611
404748
|
}
|
|
404612
|
-
getDefaultExpectedAndLeftover(ca) {
|
|
404749
|
+
getDefaultExpectedAndLeftover(ca, keepAssets) {
|
|
404613
404750
|
const expectedBalances = new AddressMap();
|
|
404614
404751
|
const leftoverBalances = new AddressMap();
|
|
404752
|
+
const keepAssetsSet = new Set(keepAssets?.map((a) => a.toLowerCase()));
|
|
404615
404753
|
for (const { token: t, balance, mask } of ca.tokens) {
|
|
404616
404754
|
const token = t;
|
|
404617
404755
|
const isEnabled = (mask & ca.enabledTokensMask) !== 0n;
|
|
404618
404756
|
expectedBalances.upsert(token, { token, balance });
|
|
404619
404757
|
const decimals = this.sdk.tokensMeta.decimals(token);
|
|
404620
404758
|
const minBalance = 10n ** BigInt(Math.max(8, decimals) - 8);
|
|
404621
|
-
if (balance < minBalance || !isEnabled) {
|
|
404759
|
+
if (keepAssetsSet.has(token.toLowerCase()) || balance < minBalance || !isEnabled) {
|
|
404622
404760
|
leftoverBalances.upsert(token, { token, balance });
|
|
404623
404761
|
}
|
|
404624
404762
|
}
|
|
@@ -404952,11 +405090,12 @@ var RouterV300Contract = class extends AbstractRouterContract {
|
|
|
404952
405090
|
/**
|
|
404953
405091
|
* Implements {@link IRouterContract.getFindClosePathInput}
|
|
404954
405092
|
*/
|
|
404955
|
-
getFindClosePathInput(ca, cm, balances) {
|
|
405093
|
+
getFindClosePathInput(ca, cm, balances, keepAssets) {
|
|
404956
405094
|
const { expectedBalances, leftoverBalances } = this.getExpectedAndLeftover(
|
|
404957
405095
|
ca,
|
|
404958
405096
|
cm,
|
|
404959
|
-
balances
|
|
405097
|
+
balances,
|
|
405098
|
+
keepAssets
|
|
404960
405099
|
);
|
|
404961
405100
|
const pathOptions = PathOptionFactory.generatePathOptions(
|
|
404962
405101
|
ca.tokens,
|
|
@@ -405213,7 +405352,13 @@ var RouterV310Contract = class extends AbstractRouterContract {
|
|
|
405213
405352
|
* Implements {@link IRouterContract.findBestClosePath}
|
|
405214
405353
|
*/
|
|
405215
405354
|
async findBestClosePath(props) {
|
|
405216
|
-
const {
|
|
405355
|
+
const {
|
|
405356
|
+
creditAccount: ca,
|
|
405357
|
+
creditManager: cm,
|
|
405358
|
+
slippage,
|
|
405359
|
+
balances,
|
|
405360
|
+
keepAssets
|
|
405361
|
+
} = props;
|
|
405217
405362
|
const { expectedBalances, leftoverBalances, tokensToClaim } = this.getExpectedAndLeftover(
|
|
405218
405363
|
ca,
|
|
405219
405364
|
cm,
|
|
@@ -405221,7 +405366,8 @@ var RouterV310Contract = class extends AbstractRouterContract {
|
|
|
405221
405366
|
expectedBalances: assetsMap(balances.expectedBalances),
|
|
405222
405367
|
leftoverBalances: assetsMap(balances.leftoverBalances),
|
|
405223
405368
|
tokensToClaim: assetsMap(balances.tokensToClaim || [])
|
|
405224
|
-
} : void 0
|
|
405369
|
+
} : void 0,
|
|
405370
|
+
keepAssets
|
|
405225
405371
|
);
|
|
405226
405372
|
const getNumSplits = this.#numSplitsGetter(cm, expectedBalances.values());
|
|
405227
405373
|
const tData = [];
|
|
@@ -405870,9 +406016,6 @@ var AbstractCreditAccountService = class extends SDKConstruct {
|
|
|
405870
406016
|
* Methods to get all credit accounts with some optional filtering
|
|
405871
406017
|
* Performs all necessary price feed updates under the hood
|
|
405872
406018
|
*
|
|
405873
|
-
* TODO: do we want to expose pagination?
|
|
405874
|
-
* TODO: do we want to expose "reverting"?
|
|
405875
|
-
* TODO: do we want to expose MarketFilter in any way? If so, we need to check that the MarketFilter is compatibled with attached markets?
|
|
405876
406019
|
* @param options
|
|
405877
406020
|
* @param blockNumber
|
|
405878
406021
|
* @returns returned credit accounts are sorted by health factor in ascending order
|
|
@@ -405989,19 +406132,18 @@ var AbstractCreditAccountService = class extends SDKConstruct {
|
|
|
405989
406132
|
}
|
|
405990
406133
|
/**
|
|
405991
406134
|
* Generates transaction to liquidate credit account
|
|
405992
|
-
* @param
|
|
405993
|
-
* @param to Address to transfer underlying left after liquidation
|
|
405994
|
-
* @param slippage
|
|
405995
|
-
* @param force TODO: legacy v3 option to remove
|
|
406135
|
+
* @param props - {@link FullyLiquidateProps}
|
|
405996
406136
|
* @returns
|
|
405997
406137
|
*/
|
|
405998
|
-
async fullyLiquidate(
|
|
406138
|
+
async fullyLiquidate(props) {
|
|
406139
|
+
const { account, to, slippage = 50n, force = false, keepAssets } = props;
|
|
405999
406140
|
const cm = this.sdk.marketRegister.findCreditManager(account.creditManager);
|
|
406000
406141
|
const routerCloseResult = await this.sdk.routerFor(account).findBestClosePath({
|
|
406001
406142
|
creditAccount: account,
|
|
406002
406143
|
creditManager: cm.creditManager,
|
|
406003
406144
|
slippage,
|
|
406004
|
-
force
|
|
406145
|
+
force,
|
|
406146
|
+
keepAssets
|
|
406005
406147
|
});
|
|
406006
406148
|
const priceUpdates = await this.getPriceUpdatesForFacade(
|
|
406007
406149
|
account.creditManager,
|
|
@@ -407150,12 +407292,12 @@ var CreditAccountServiceV310 = class extends AbstractCreditAccountService {
|
|
|
407150
407292
|
};
|
|
407151
407293
|
|
|
407152
407294
|
// ../../node_modules/@gearbox-protocol/sdk/dist/esm/sdk/accounts/createCreditAccountService.js
|
|
407153
|
-
function createCreditAccountService(sdk, version5) {
|
|
407295
|
+
function createCreditAccountService(sdk, version5, options) {
|
|
407154
407296
|
if (isV300(version5)) {
|
|
407155
|
-
return new CreditAccountServiceV300(sdk);
|
|
407297
|
+
return new CreditAccountServiceV300(sdk, options);
|
|
407156
407298
|
}
|
|
407157
407299
|
if (isV310(version5)) {
|
|
407158
|
-
return new CreditAccountServiceV310(sdk);
|
|
407300
|
+
return new CreditAccountServiceV310(sdk, options);
|
|
407159
407301
|
}
|
|
407160
407302
|
throw new Error(`Unsupported Credit Account Service version ${version5}`);
|
|
407161
407303
|
}
|
|
@@ -413730,6 +413872,28 @@ function parseAccumulatorUpdateData(data) {
|
|
|
413730
413872
|
var PythUpdateTx = class extends PriceUpdateTx {
|
|
413731
413873
|
name = "pyth";
|
|
413732
413874
|
};
|
|
413875
|
+
var PythOptions = external_exports.object({
|
|
413876
|
+
/**
|
|
413877
|
+
* Fixed pyth historic timestamp in seconds
|
|
413878
|
+
* Set to true to enable pyth historical mode using timestamp from attach block
|
|
413879
|
+
*/
|
|
413880
|
+
historicTimestamp: external_exports.union([external_exports.number().nonnegative(), external_exports.literal(true)]).optional(),
|
|
413881
|
+
/**
|
|
413882
|
+
* Override Hermes API with this proxy. Can be used to set caching proxies, to avoid rate limiting
|
|
413883
|
+
*/
|
|
413884
|
+
apiProxy: external_exports.url().optional(),
|
|
413885
|
+
/**
|
|
413886
|
+
* TTL for pyth cache in milliseconds
|
|
413887
|
+
* If 0, disables caching
|
|
413888
|
+
* If not set, uses some default value
|
|
413889
|
+
* Cache is always enabled in historical mode
|
|
413890
|
+
*/
|
|
413891
|
+
cacheTTL: external_exports.number().nonnegative().optional(),
|
|
413892
|
+
/**
|
|
413893
|
+
* When true, no error will be thrown when pyth is unable to fetch data for some feeds
|
|
413894
|
+
*/
|
|
413895
|
+
ignoreMissingFeeds: external_exports.boolean().optional()
|
|
413896
|
+
});
|
|
413733
413897
|
var PythUpdater = class extends SDKConstruct {
|
|
413734
413898
|
#logger;
|
|
413735
413899
|
#cache;
|
|
@@ -413890,6 +414054,32 @@ var import_protocol = __toESM(require_src2(), 1);
|
|
|
413890
414054
|
var RedstoneUpdateTx = class extends PriceUpdateTx {
|
|
413891
414055
|
name = "redstone";
|
|
413892
414056
|
};
|
|
414057
|
+
var RedstoneOptions = external_exports.object({
|
|
414058
|
+
/**
|
|
414059
|
+
* Fixed redstone historic timestamp in ms
|
|
414060
|
+
* Set to true to enable redstone historical mode using timestamp from attach block
|
|
414061
|
+
*/
|
|
414062
|
+
historicTimestamp: external_exports.union([external_exports.number().nonnegative(), external_exports.literal(true)]).optional(),
|
|
414063
|
+
/**
|
|
414064
|
+
* Override redstone gateways. Can be used to set caching proxies, to avoid rate limiting
|
|
414065
|
+
*/
|
|
414066
|
+
gateways: external_exports.array(external_exports.url()).optional(),
|
|
414067
|
+
/**
|
|
414068
|
+
* TTL for redstone cache in milliseconds
|
|
414069
|
+
* If 0, disables caching
|
|
414070
|
+
* If not set, uses some default value
|
|
414071
|
+
* Cache is always enabled in historical mode
|
|
414072
|
+
*/
|
|
414073
|
+
cacheTTL: external_exports.number().nonnegative().optional(),
|
|
414074
|
+
/**
|
|
414075
|
+
* When true, no error will be thrown when redstone is unable to fetch data for some feeds
|
|
414076
|
+
*/
|
|
414077
|
+
ignoreMissingFeeds: external_exports.boolean().optional(),
|
|
414078
|
+
/**
|
|
414079
|
+
* Enable redstone internal logging
|
|
414080
|
+
*/
|
|
414081
|
+
enableLogging: external_exports.boolean().optional()
|
|
414082
|
+
});
|
|
413893
414083
|
var RedstoneUpdater = class extends SDKConstruct {
|
|
413894
414084
|
#logger;
|
|
413895
414085
|
#cache;
|
|
@@ -415544,15 +415734,26 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
415544
415734
|
void 0,
|
|
415545
415735
|
"marketConfigurators"
|
|
415546
415736
|
);
|
|
415547
|
-
|
|
415737
|
+
#ignoreMarkets;
|
|
415738
|
+
constructor(sdk, ignoreMarkets = []) {
|
|
415548
415739
|
super(sdk);
|
|
415549
415740
|
this.#logger = childLogger("MarketRegister", sdk.logger);
|
|
415741
|
+
this.#ignoreMarkets = new Set(
|
|
415742
|
+
ignoreMarkets.map((m) => m.toLowerCase())
|
|
415743
|
+
);
|
|
415550
415744
|
}
|
|
415551
415745
|
hydrate(state) {
|
|
415552
415746
|
this.#markets.clear();
|
|
415553
415747
|
const configurators = new Set(state.map((m) => m.configurator));
|
|
415554
415748
|
this.#setMarketFilter([...configurators]);
|
|
415555
415749
|
for (const data of state) {
|
|
415750
|
+
const pool = data.pool.baseParams.addr;
|
|
415751
|
+
if (this.#ignoreMarkets.has(pool.toLowerCase())) {
|
|
415752
|
+
this.#logger?.debug(
|
|
415753
|
+
`ignoring market of pool ${pool} (${data.pool.name})`
|
|
415754
|
+
);
|
|
415755
|
+
continue;
|
|
415756
|
+
}
|
|
415556
415757
|
this.#markets.upsert(
|
|
415557
415758
|
data.pool.baseParams.addr,
|
|
415558
415759
|
new MarketSuite(this.sdk, data)
|
|
@@ -415653,13 +415854,17 @@ var MarketRegister = class extends SDKConstruct {
|
|
|
415653
415854
|
});
|
|
415654
415855
|
}
|
|
415655
415856
|
for (const data of markets) {
|
|
415656
|
-
|
|
415657
|
-
|
|
415658
|
-
|
|
415659
|
-
|
|
415857
|
+
const pool = data.pool.baseParams.addr;
|
|
415858
|
+
if (this.#ignoreMarkets.has(pool.toLowerCase())) {
|
|
415859
|
+
this.#logger?.debug(
|
|
415860
|
+
`ignoring market of pool ${pool} (${data.pool.name})`
|
|
415861
|
+
);
|
|
415862
|
+
continue;
|
|
415863
|
+
}
|
|
415864
|
+
this.#markets.upsert(pool, new MarketSuite(this.sdk, data));
|
|
415660
415865
|
}
|
|
415661
415866
|
this.#logger?.info(
|
|
415662
|
-
`loaded ${markets.
|
|
415867
|
+
`loaded ${this.#markets.size} markets in block ${this.sdk.currentBlock}`
|
|
415663
415868
|
);
|
|
415664
415869
|
}
|
|
415665
415870
|
/**
|
|
@@ -415869,6 +416074,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
415869
416074
|
redstone,
|
|
415870
416075
|
pyth,
|
|
415871
416076
|
ignoreUpdateablePrices,
|
|
416077
|
+
ignoreMarkets,
|
|
415872
416078
|
marketConfigurators: mcs,
|
|
415873
416079
|
strictContractTypes
|
|
415874
416080
|
} = options;
|
|
@@ -415900,6 +416106,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
415900
416106
|
addressProvider,
|
|
415901
416107
|
blockNumber,
|
|
415902
416108
|
ignoreUpdateablePrices,
|
|
416109
|
+
ignoreMarkets,
|
|
415903
416110
|
marketConfigurators,
|
|
415904
416111
|
redstone,
|
|
415905
416112
|
pyth
|
|
@@ -415933,6 +416140,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
415933
416140
|
addressProvider,
|
|
415934
416141
|
blockNumber,
|
|
415935
416142
|
ignoreUpdateablePrices,
|
|
416143
|
+
ignoreMarkets,
|
|
415936
416144
|
marketConfigurators,
|
|
415937
416145
|
redstone,
|
|
415938
416146
|
pyth
|
|
@@ -415944,7 +416152,8 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
415944
416152
|
chainId: this.provider.chainId,
|
|
415945
416153
|
addressProvider,
|
|
415946
416154
|
marketConfigurators,
|
|
415947
|
-
blockNumber
|
|
416155
|
+
blockNumber,
|
|
416156
|
+
ignoreMarkets
|
|
415948
416157
|
},
|
|
415949
416158
|
`${re}attaching gearbox sdk`
|
|
415950
416159
|
);
|
|
@@ -415976,7 +416185,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
415976
416185
|
`address provider version: ${this.#addressProvider.version}`
|
|
415977
416186
|
);
|
|
415978
416187
|
await this.#addressProvider.syncState(this.currentBlock);
|
|
415979
|
-
this.#marketRegister = new MarketRegister(this);
|
|
416188
|
+
this.#marketRegister = new MarketRegister(this, ignoreMarkets);
|
|
415980
416189
|
await this.#marketRegister.loadMarkets(
|
|
415981
416190
|
marketConfigurators,
|
|
415982
416191
|
ignoreUpdateablePrices
|
|
@@ -416003,7 +416212,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
416003
416212
|
return this;
|
|
416004
416213
|
}
|
|
416005
416214
|
#hydrate(options, state) {
|
|
416006
|
-
const { logger: _logger, ...opts } = options;
|
|
416215
|
+
const { logger: _logger, ignoreMarkets, ...opts } = options;
|
|
416007
416216
|
if (state.version !== STATE_VERSION) {
|
|
416008
416217
|
throw new Error(
|
|
416009
416218
|
`hydrated state version is ${state.version}, but expected ${STATE_VERSION}`
|
|
@@ -416026,7 +416235,7 @@ var GearboxSDK = class _GearboxSDK {
|
|
|
416026
416235
|
this.logger?.debug(
|
|
416027
416236
|
`address provider version: ${this.#addressProvider.version}`
|
|
416028
416237
|
);
|
|
416029
|
-
this.#marketRegister = new MarketRegister(this);
|
|
416238
|
+
this.#marketRegister = new MarketRegister(this, ignoreMarkets);
|
|
416030
416239
|
this.#marketRegister.hydrate(state.markets);
|
|
416031
416240
|
this.#attachConfig = {
|
|
416032
416241
|
...opts,
|
|
@@ -436576,6 +436785,7 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436576
436785
|
#borrower;
|
|
436577
436786
|
#faucet;
|
|
436578
436787
|
#poolDepositMultiplier;
|
|
436788
|
+
#minDebtMultiplier;
|
|
436579
436789
|
constructor(service, options = {}) {
|
|
436580
436790
|
super(service.sdk);
|
|
436581
436791
|
this.#service = service;
|
|
@@ -436591,6 +436801,7 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436591
436801
|
}
|
|
436592
436802
|
this.#borrower = options.borrower;
|
|
436593
436803
|
this.#poolDepositMultiplier = options.poolDepositMultiplier ?? 11000n;
|
|
436804
|
+
this.#minDebtMultiplier = options.minDebtMultiplier ?? 10100n;
|
|
436594
436805
|
}
|
|
436595
436806
|
get borrower() {
|
|
436596
436807
|
if (!this.#borrower) {
|
|
@@ -436649,6 +436860,12 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436649
436860
|
}
|
|
436650
436861
|
}
|
|
436651
436862
|
this.#logger?.info(`opened ${success2}/${targets.length} accounts`);
|
|
436863
|
+
try {
|
|
436864
|
+
await this.#directlyDistributeTokens(results);
|
|
436865
|
+
this.#logger?.info("distributed direct transfer tokens");
|
|
436866
|
+
} catch (e) {
|
|
436867
|
+
this.#logger?.error(`failed to distribute tokens: ${e}`);
|
|
436868
|
+
}
|
|
436652
436869
|
return results;
|
|
436653
436870
|
}
|
|
436654
436871
|
async #openAccount(input, index2, total) {
|
|
@@ -436722,7 +436939,8 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436722
436939
|
target: symbol2
|
|
436723
436940
|
});
|
|
436724
436941
|
const leverage = this.#getLeverage(input);
|
|
436725
|
-
const {
|
|
436942
|
+
const { underlying } = cm.creditFacade;
|
|
436943
|
+
const minDebt = this.#minDebtMultiplier * cm.creditFacade.minDebt / PERCENTAGE_FACTOR;
|
|
436726
436944
|
const expectedUnderlyingBalance = minDebt * leverage / PERCENTAGE_FACTOR;
|
|
436727
436945
|
const expectedBalances = [];
|
|
436728
436946
|
const leftoverBalances = [];
|
|
@@ -436804,7 +437022,7 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436804
437022
|
for (const t of targets) {
|
|
436805
437023
|
const leverage = this.#getLeverage(t);
|
|
436806
437024
|
const cm = this.sdk.marketRegister.findCreditManager(t.creditManager);
|
|
436807
|
-
const
|
|
437025
|
+
const minDebt = this.#minDebtMultiplier * cm.creditFacade.minDebt / PERCENTAGE_FACTOR;
|
|
436808
437026
|
minAvailableByPool[cm.pool] = (minAvailableByPool[cm.pool] ?? 0n) + minDebt * (leverage - PERCENTAGE_FACTOR) / PERCENTAGE_FACTOR * this.#poolDepositMultiplier / PERCENTAGE_FACTOR;
|
|
436809
437027
|
}
|
|
436810
437028
|
let totalUSD = 0n;
|
|
@@ -436904,7 +437122,8 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
436904
437122
|
const market = this.sdk.marketRegister.findByCreditManager(
|
|
436905
437123
|
target.creditManager
|
|
436906
437124
|
);
|
|
436907
|
-
const {
|
|
437125
|
+
const { degenNFT } = cm.creditFacade;
|
|
437126
|
+
const minDebt = this.#minDebtMultiplier * cm.creditFacade.minDebt / PERCENTAGE_FACTOR;
|
|
436908
437127
|
claimUSD += market.priceOracle.convertToUSD(cm.underlying, minDebt);
|
|
436909
437128
|
if (isAddress(degenNFT) && degenNFT !== ADDRESS_0X0) {
|
|
436910
437129
|
degenNFTS[degenNFT] = (degenNFTS[degenNFT] ?? 0) + 1;
|
|
@@ -437035,6 +437254,87 @@ var AccountOpener = class extends SDKConstruct {
|
|
|
437035
437254
|
});
|
|
437036
437255
|
return acc;
|
|
437037
437256
|
}
|
|
437257
|
+
/**
|
|
437258
|
+
* Claims tokens from faucet, uniformly distributes them to accounts
|
|
437259
|
+
* @param targets
|
|
437260
|
+
* @returns
|
|
437261
|
+
*/
|
|
437262
|
+
async #directlyDistributeTokens(targets) {
|
|
437263
|
+
const tokens = new AddressSet(
|
|
437264
|
+
targets.flatMap((t) => t.input.directTransfer ?? [])
|
|
437265
|
+
);
|
|
437266
|
+
if (tokens.size === 0) {
|
|
437267
|
+
return;
|
|
437268
|
+
}
|
|
437269
|
+
const distributorKey = generatePrivateKey();
|
|
437270
|
+
const distributor = privateKeyToAccount(distributorKey);
|
|
437271
|
+
await this.#anvil.setBalance({
|
|
437272
|
+
address: distributor.address,
|
|
437273
|
+
value: parseEther("100")
|
|
437274
|
+
});
|
|
437275
|
+
await claimFromFaucet({
|
|
437276
|
+
publicClient: this.#anvil,
|
|
437277
|
+
wallet: this.#anvil,
|
|
437278
|
+
faucet: this.faucet,
|
|
437279
|
+
amountUSD: (minAmountUSD) => minAmountUSD * BigInt(targets.length),
|
|
437280
|
+
claimer: distributor,
|
|
437281
|
+
role: "reward token distributor",
|
|
437282
|
+
logger: this.#logger
|
|
437283
|
+
});
|
|
437284
|
+
const actualBalances = await this.#anvil.multicall({
|
|
437285
|
+
contracts: tokens.map(
|
|
437286
|
+
(token) => ({
|
|
437287
|
+
address: token,
|
|
437288
|
+
abi: erc20Abi,
|
|
437289
|
+
functionName: "balanceOf",
|
|
437290
|
+
args: [distributor.address]
|
|
437291
|
+
})
|
|
437292
|
+
),
|
|
437293
|
+
allowFailure: false
|
|
437294
|
+
});
|
|
437295
|
+
const tokensArr = tokens.asArray();
|
|
437296
|
+
for (let i = 0; i < tokensArr.length; i++) {
|
|
437297
|
+
const token = tokensArr[i];
|
|
437298
|
+
const balance = actualBalances[i];
|
|
437299
|
+
this.#logger?.debug(`${token} balance: ${balance}`);
|
|
437300
|
+
}
|
|
437301
|
+
for (const { account, input } of targets) {
|
|
437302
|
+
if (!account) {
|
|
437303
|
+
continue;
|
|
437304
|
+
}
|
|
437305
|
+
const directTransfer = new AddressSet(input.directTransfer);
|
|
437306
|
+
for (let i = 0; i < tokensArr.length; i++) {
|
|
437307
|
+
const token = tokensArr[i];
|
|
437308
|
+
if (!directTransfer.has(token)) {
|
|
437309
|
+
continue;
|
|
437310
|
+
}
|
|
437311
|
+
const balance = actualBalances[i] / BigInt(targets.length);
|
|
437312
|
+
this.#logger?.debug(
|
|
437313
|
+
`sending ${balance} ${token} to ${account.creditAccount}`
|
|
437314
|
+
);
|
|
437315
|
+
const hash2 = await this.#anvil.writeContract({
|
|
437316
|
+
account: distributor,
|
|
437317
|
+
address: token,
|
|
437318
|
+
abi: erc20Abi,
|
|
437319
|
+
functionName: "transfer",
|
|
437320
|
+
args: [account.creditAccount, balance],
|
|
437321
|
+
chain: this.#anvil.chain
|
|
437322
|
+
});
|
|
437323
|
+
const receipt = await this.#anvil.waitForTransactionReceipt({
|
|
437324
|
+
hash: hash2
|
|
437325
|
+
});
|
|
437326
|
+
if (receipt.status === "reverted") {
|
|
437327
|
+
this.#logger?.error(
|
|
437328
|
+
`failed to send ${token} to ${account.creditAccount}, tx ${hash2} reverted`
|
|
437329
|
+
);
|
|
437330
|
+
} else {
|
|
437331
|
+
this.#logger?.debug(
|
|
437332
|
+
`sent ${token} to ${account.creditAccount}, tx: ${hash2}`
|
|
437333
|
+
);
|
|
437334
|
+
}
|
|
437335
|
+
}
|
|
437336
|
+
}
|
|
437337
|
+
}
|
|
437038
437338
|
#getCollateralQuota(cm, collateral, collateralAmount, debt, logger2) {
|
|
437039
437339
|
const {
|
|
437040
437340
|
underlying,
|
|
@@ -448164,11 +448464,6 @@ function openAccounts() {
|
|
|
448164
448464
|
new Option("--input-json <file>", "json with accounts to open").env(
|
|
448165
448465
|
"INPUT_JSON"
|
|
448166
448466
|
)
|
|
448167
|
-
).addOption(
|
|
448168
|
-
new Option(
|
|
448169
|
-
"--send-reward-tokens <tokens>",
|
|
448170
|
-
"send reward tokens to accounts"
|
|
448171
|
-
).argParser(parseAddressList).env("SEND_REWARD_TOKENS")
|
|
448172
448467
|
).action(async (opts) => {
|
|
448173
448468
|
log_default.info("starting sdk v3.1 example");
|
|
448174
448469
|
const {
|
|
@@ -448177,8 +448472,7 @@ function openAccounts() {
|
|
|
448177
448472
|
anvilUrl = "http://127.0.0.1:8545",
|
|
448178
448473
|
sharedDir = ".",
|
|
448179
448474
|
castBin = "cast",
|
|
448180
|
-
inputJson
|
|
448181
|
-
sendRewardTokens
|
|
448475
|
+
inputJson
|
|
448182
448476
|
} = opts;
|
|
448183
448477
|
await mkdir2(path8.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
448184
448478
|
const transportOptions = getSDKTransportOptions({
|
|
@@ -448282,12 +448576,6 @@ function openAccounts() {
|
|
|
448282
448576
|
});
|
|
448283
448577
|
}
|
|
448284
448578
|
}
|
|
448285
|
-
await distributeExtraTokens(
|
|
448286
|
-
anvil,
|
|
448287
|
-
faucetAddr,
|
|
448288
|
-
sendRewardTokens,
|
|
448289
|
-
openedAccounts
|
|
448290
|
-
);
|
|
448291
448579
|
} catch (e) {
|
|
448292
448580
|
log_default.error(`failed to open accounts: ${e}`);
|
|
448293
448581
|
} finally {
|
|
@@ -448357,65 +448645,6 @@ async function runCastCmd(args, traceId, opts) {
|
|
|
448357
448645
|
log_default.warn(`failed to save trace: ${e}`);
|
|
448358
448646
|
}
|
|
448359
448647
|
}
|
|
448360
|
-
async function distributeExtraTokens(anvil, faucet, tokens, accounts) {
|
|
448361
|
-
if (!tokens.length || !accounts.length) {
|
|
448362
|
-
return;
|
|
448363
|
-
}
|
|
448364
|
-
const borrowerKey = generatePrivateKey();
|
|
448365
|
-
const borrower = privateKeyToAccount(borrowerKey);
|
|
448366
|
-
await anvil.setBalance({
|
|
448367
|
-
address: borrower.address,
|
|
448368
|
-
value: parseEther("100")
|
|
448369
|
-
});
|
|
448370
|
-
await claimFromFaucet({
|
|
448371
|
-
publicClient: anvil,
|
|
448372
|
-
wallet: anvil,
|
|
448373
|
-
faucet,
|
|
448374
|
-
amountUSD: (minAmountUSD) => minAmountUSD * BigInt(accounts.length),
|
|
448375
|
-
claimer: borrower,
|
|
448376
|
-
role: "reward token distributor",
|
|
448377
|
-
logger: log_default
|
|
448378
|
-
});
|
|
448379
|
-
const actualBalances = await anvil.multicall({
|
|
448380
|
-
contracts: tokens.map(
|
|
448381
|
-
(token) => ({
|
|
448382
|
-
address: token,
|
|
448383
|
-
abi: erc20Abi,
|
|
448384
|
-
functionName: "balanceOf",
|
|
448385
|
-
args: [borrower.address]
|
|
448386
|
-
})
|
|
448387
|
-
),
|
|
448388
|
-
allowFailure: false
|
|
448389
|
-
});
|
|
448390
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
448391
|
-
const token = tokens[i];
|
|
448392
|
-
const balance = actualBalances[i];
|
|
448393
|
-
log_default.debug(`${token} balance: ${balance}`);
|
|
448394
|
-
}
|
|
448395
|
-
for (const acc of accounts) {
|
|
448396
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
448397
|
-
const token = tokens[i];
|
|
448398
|
-
const balance = actualBalances[i] / BigInt(accounts.length);
|
|
448399
|
-
log_default.debug(`sending ${balance} ${token} to ${acc}`);
|
|
448400
|
-
const hash2 = await anvil.writeContract({
|
|
448401
|
-
account: borrower,
|
|
448402
|
-
address: token,
|
|
448403
|
-
abi: erc20Abi,
|
|
448404
|
-
functionName: "transfer",
|
|
448405
|
-
args: [acc, balance],
|
|
448406
|
-
chain: anvil.chain
|
|
448407
|
-
});
|
|
448408
|
-
const receipt = await anvil.waitForTransactionReceipt({
|
|
448409
|
-
hash: hash2
|
|
448410
|
-
});
|
|
448411
|
-
if (receipt.status === "reverted") {
|
|
448412
|
-
log_default.error(`failed to send ${token} to ${acc}, tx ${hash2} reverted`);
|
|
448413
|
-
} else {
|
|
448414
|
-
log_default.debug(`sent ${token} to ${acc}, tx: ${hash2}`);
|
|
448415
|
-
}
|
|
448416
|
-
}
|
|
448417
|
-
}
|
|
448418
|
-
}
|
|
448419
448648
|
|
|
448420
448649
|
// src/commands/parse.ts
|
|
448421
448650
|
import { writeFile as writeFile6 } from "node:fs/promises";
|
|
@@ -448464,7 +448693,7 @@ function getRenderer(opts) {
|
|
|
448464
448693
|
var package_default = {
|
|
448465
448694
|
name: "@gearbox-protocol/deploy-tools",
|
|
448466
448695
|
description: "Gearbox deploy tools",
|
|
448467
|
-
version: "5.38.
|
|
448696
|
+
version: "5.38.5",
|
|
448468
448697
|
homepage: "https://gearbox.fi",
|
|
448469
448698
|
keywords: [
|
|
448470
448699
|
"gearbox"
|
|
@@ -448504,17 +448733,17 @@ var package_default = {
|
|
|
448504
448733
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
448505
448734
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
448506
448735
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
448507
|
-
"@gearbox-protocol/sdk": "8.
|
|
448736
|
+
"@gearbox-protocol/sdk": "8.10.1",
|
|
448508
448737
|
"@gearbox-protocol/sdk-gov": "2.37.0",
|
|
448509
448738
|
"@types/lodash-es": "^4.17.12",
|
|
448510
|
-
"@types/node": "^24.0.
|
|
448739
|
+
"@types/node": "^24.0.15",
|
|
448511
448740
|
"@types/react": "^19.1.8",
|
|
448512
448741
|
"@types/react-dom": "^19.1.6",
|
|
448513
448742
|
abitype: "^1.0.8",
|
|
448514
448743
|
chalk: "^5.4.1",
|
|
448515
448744
|
commander: "^14.0.0",
|
|
448516
448745
|
"date-fns": "^4.1.0",
|
|
448517
|
-
esbuild: "^0.25.
|
|
448746
|
+
esbuild: "^0.25.8",
|
|
448518
448747
|
"lodash-es": "^4.17.21",
|
|
448519
448748
|
"p-retry": "^6.2.1",
|
|
448520
448749
|
pino: "^9.7.0",
|
|
@@ -448524,7 +448753,7 @@ var package_default = {
|
|
|
448524
448753
|
"react-dom": "^19.1.0",
|
|
448525
448754
|
table: "^6.9.0",
|
|
448526
448755
|
tsx: "^4.20.2",
|
|
448527
|
-
viem: "^2.
|
|
448756
|
+
viem: "^2.33.0",
|
|
448528
448757
|
yaml: "^2.8.0",
|
|
448529
448758
|
zod: "^4.0.5"
|
|
448530
448759
|
}
|