@layr-labs/ecloud-sdk 0.3.0-dev → 0.3.0-dev.0

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.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { C as ComputeModule } from './compute-Dstl0CA0.cjs';
2
- export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-Dstl0CA0.cjs';
1
+ import { C as ComputeModule } from './compute-oD9uqLtr.cjs';
2
+ export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-oD9uqLtr.cjs';
3
3
  import { BillingModule } from './billing.cjs';
4
4
  export { BillingModuleConfig, createBillingModule } from './billing.cjs';
5
5
  import { WalletClient, PublicClient, Address, Hex } from 'viem';
6
- import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-Dk0zwgms.cjs';
7
- export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-Dk0zwgms.cjs';
8
- import { G as GasEstimate, ab as Logger, $ as PreparedDeploy, a6 as EnvironmentConfig, a4 as DeployResult, a0 as PreparedUpgrade, A as AppId } from './index-C0w92tCs.cjs';
9
- export { al as AlreadyActiveResponse, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, a5 as BillingEnvironmentConfig, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, au as DeployStep, aa as DockerImageConfig, E as EstimateGasOptions, X as ExecuteDeployResult, Y as ExecuteUpgradeResult, W as GasOpts, a9 as ImageDigestResult, a1 as LifecycleOpts, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, Z as PreparedDeployData, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, O as UpgradeAppOpts, e as estimateTransactionGas, f as formatETH, g as getAllAppsByDeveloper, aw as getAppLatestReleaseBlockNumbers, ax as getBlockTimestamps, M as logVisibility, L as noopLogger } from './index-C0w92tCs.cjs';
6
+ import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-BNGcO-VX.cjs';
7
+ export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-BNGcO-VX.cjs';
8
+ import { G as GasEstimate, ab as Logger, $ as PreparedDeploy, a6 as EnvironmentConfig, a4 as DeployResult, a0 as PreparedUpgrade, A as AppId } from './index-5y9NG_Id.cjs';
9
+ export { al as AlreadyActiveResponse, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, a5 as BillingEnvironmentConfig, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, au as DeployStep, aa as DockerImageConfig, E as EstimateGasOptions, X as ExecuteDeployResult, Y as ExecuteUpgradeResult, W as GasOpts, a9 as ImageDigestResult, a1 as LifecycleOpts, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, Z as PreparedDeployData, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, O as UpgradeAppOpts, e as estimateTransactionGas, f as formatETH, g as getAllAppsByDeveloper, aw as getAppLatestReleaseBlockNumbers, ax as getBlockTimestamps, M as logVisibility, L as noopLogger } from './index-5y9NG_Id.cjs';
10
10
 
11
11
  interface SubmitBuildRequest {
12
12
  repoUrl: string;
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { C as ComputeModule } from './compute-CdZxISln.js';
2
- export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-CdZxISln.js';
1
+ import { C as ComputeModule } from './compute-BcJuIxc1.js';
2
+ export { d as ComputeModuleConfig, a as CreateAppOpts, L as LogsOptions, P as PRIMARY_LANGUAGES, S as SDKCreateAppOpts, c as createApp, b as createComputeModule, e as encodeStartAppData, f as encodeStopAppData, h as encodeTerminateAppData, g as getAvailableTemplates, l as logs } from './compute-BcJuIxc1.js';
3
3
  import { BillingModule } from './billing.js';
4
4
  export { BillingModuleConfig, createBillingModule } from './billing.js';
5
5
  import { WalletClient, PublicClient, Address, Hex } from 'viem';
6
- import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-4w0Iojmm.js';
7
- export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-4w0Iojmm.js';
8
- import { G as GasEstimate, ab as Logger, $ as PreparedDeploy, a6 as EnvironmentConfig, a4 as DeployResult, a0 as PreparedUpgrade, A as AppId } from './index-C0w92tCs.js';
9
- export { al as AlreadyActiveResponse, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, a5 as BillingEnvironmentConfig, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, au as DeployStep, aa as DockerImageConfig, E as EstimateGasOptions, X as ExecuteDeployResult, Y as ExecuteUpgradeResult, W as GasOpts, a9 as ImageDigestResult, a1 as LifecycleOpts, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, Z as PreparedDeployData, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, O as UpgradeAppOpts, e as estimateTransactionGas, f as formatETH, g as getAllAppsByDeveloper, aw as getAppLatestReleaseBlockNumbers, ax as getBlockTimestamps, M as logVisibility, L as noopLogger } from './index-C0w92tCs.js';
6
+ import { L as LogVisibility, aj as ResourceUsageMonitoring } from './helpers-Cp8qGRTb.js';
7
+ export { F as AppInfo, I as AppMetrics, H as AppProfileInfo, al as AppRelease, am as AppReleaseBuild, an as AppResponse, K as BillingApiClient, C as ComputeApiConfig, z as CreateAppParams, as as DeployParams, Q as EstimateBatchGasOptions, G as GeneratedKey, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, a as SessionError, S as SessionInfo, b as SiweMessageParams, _ as SiweMessageResult, au as UpgradeParams, U as UserApiClient, ah as addHexPrefix, ap as assertValidFilePath, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, ak as createViemClients, N as estimateBatchGas, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, $ as loginToComputeApi, a0 as logoutFromComputeApi, W as parseSiweMessage, t as sanitizeString, u as sanitizeURL, w as sanitizeXURL, ai as stripHexPrefix, r as validateAppID, v as validateAppName, x as validateCreateAppParams, at as validateDeployParams, q as validateDescription, ao as validateFilePath, aq as validateImagePath, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, ar as validateResourceUsageMonitoring, o as validateURL, av as validateUpgradeParams, p as validateXURL } from './helpers-Cp8qGRTb.js';
8
+ import { G as GasEstimate, ab as Logger, $ as PreparedDeploy, a6 as EnvironmentConfig, a4 as DeployResult, a0 as PreparedUpgrade, A as AppId } from './index-5y9NG_Id.js';
9
+ export { al as AlreadyActiveResponse, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, a5 as BillingEnvironmentConfig, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, au as DeployStep, aa as DockerImageConfig, E as EstimateGasOptions, X as ExecuteDeployResult, Y as ExecuteUpgradeResult, W as GasOpts, a9 as ImageDigestResult, a1 as LifecycleOpts, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, Z as PreparedDeployData, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, O as UpgradeAppOpts, e as estimateTransactionGas, f as formatETH, g as getAllAppsByDeveloper, aw as getAppLatestReleaseBlockNumbers, ax as getBlockTimestamps, M as logVisibility, L as noopLogger } from './index-5y9NG_Id.js';
10
10
 
11
11
  interface SubmitBuildRequest {
12
12
  repoUrl: string;
package/dist/index.js CHANGED
@@ -2301,7 +2301,7 @@ function encodeExecuteBatchData(executions) {
2301
2301
  });
2302
2302
  }
2303
2303
  async function estimateBatchGas(options) {
2304
- const { publicClient, account, executions } = options;
2304
+ const { publicClient, account, executions, authorizationList } = options;
2305
2305
  const executeBatchData = encodeExecuteBatchData(executions);
2306
2306
  const [gasTipCap, block, estimatedGas] = await Promise.all([
2307
2307
  publicClient.estimateMaxPriorityFeePerGas(),
@@ -2309,7 +2309,8 @@ async function estimateBatchGas(options) {
2309
2309
  publicClient.estimateGas({
2310
2310
  account,
2311
2311
  to: account,
2312
- data: executeBatchData
2312
+ data: executeBatchData,
2313
+ authorizationList
2313
2314
  })
2314
2315
  ]);
2315
2316
  const baseFee = block.baseFeePerGas ?? 0n;
@@ -2332,8 +2333,44 @@ async function checkERC7702Delegation(publicClient, account, delegatorAddress) {
2332
2333
  const expectedCode = `0xef0100${delegatorAddress.slice(2)}`;
2333
2334
  return code.toLowerCase() === expectedCode.toLowerCase();
2334
2335
  }
2336
+ async function createAuthorizationList(options) {
2337
+ const { walletClient, publicClient, environmentConfig } = options;
2338
+ const account = walletClient.account;
2339
+ if (!account) {
2340
+ throw new Error("Wallet client must have an account");
2341
+ }
2342
+ const isDelegated2 = await checkERC7702Delegation(
2343
+ publicClient,
2344
+ account.address,
2345
+ environmentConfig.erc7702DelegatorAddress
2346
+ );
2347
+ if (isDelegated2) {
2348
+ return void 0;
2349
+ }
2350
+ const transactionNonce = await publicClient.getTransactionCount({
2351
+ address: account.address,
2352
+ blockTag: "pending"
2353
+ });
2354
+ const chainId = await publicClient.getChainId();
2355
+ const authorizationNonce = transactionNonce + 1;
2356
+ const signedAuthorization = await walletClient.signAuthorization({
2357
+ account,
2358
+ contractAddress: environmentConfig.erc7702DelegatorAddress,
2359
+ chainId,
2360
+ nonce: Number(authorizationNonce)
2361
+ });
2362
+ return [signedAuthorization];
2363
+ }
2335
2364
  async function executeBatch(options, logger = noopLogger) {
2336
- const { walletClient, publicClient, environmentConfig, executions, pendingMessage, gas } = options;
2365
+ const {
2366
+ walletClient,
2367
+ publicClient,
2368
+ environmentConfig,
2369
+ executions,
2370
+ pendingMessage,
2371
+ gas,
2372
+ authorizationList: providedAuthList
2373
+ } = options;
2337
2374
  const account = walletClient.account;
2338
2375
  if (!account) {
2339
2376
  throw new Error("Wallet client must have an account");
@@ -2343,27 +2380,29 @@ async function executeBatch(options, logger = noopLogger) {
2343
2380
  throw new Error("Wallet client must have a chain");
2344
2381
  }
2345
2382
  const executeBatchData = encodeExecuteBatchData(executions);
2346
- const isDelegated2 = await checkERC7702Delegation(
2347
- publicClient,
2348
- account.address,
2349
- environmentConfig.erc7702DelegatorAddress
2350
- );
2351
- let authorizationList = [];
2352
- if (!isDelegated2) {
2353
- const transactionNonce = await publicClient.getTransactionCount({
2354
- address: account.address,
2355
- blockTag: "pending"
2356
- });
2357
- const chainId = await publicClient.getChainId();
2358
- const authorizationNonce = transactionNonce + 1;
2359
- logger.debug("Using wallet client signing for EIP-7702 authorization");
2360
- const signedAuthorization = await walletClient.signAuthorization({
2361
- account: account.address,
2362
- contractAddress: environmentConfig.erc7702DelegatorAddress,
2363
- chainId,
2364
- nonce: Number(authorizationNonce)
2365
- });
2366
- authorizationList = [signedAuthorization];
2383
+ let authorizationList = providedAuthList || [];
2384
+ if (authorizationList.length === 0) {
2385
+ const isDelegated2 = await checkERC7702Delegation(
2386
+ publicClient,
2387
+ account.address,
2388
+ environmentConfig.erc7702DelegatorAddress
2389
+ );
2390
+ if (!isDelegated2) {
2391
+ const transactionNonce = await publicClient.getTransactionCount({
2392
+ address: account.address,
2393
+ blockTag: "pending"
2394
+ });
2395
+ const chainId = await publicClient.getChainId();
2396
+ const authorizationNonce = transactionNonce + 1;
2397
+ logger.debug("Using wallet client signing for EIP-7702 authorization");
2398
+ const signedAuthorization = await walletClient.signAuthorization({
2399
+ account,
2400
+ contractAddress: environmentConfig.erc7702DelegatorAddress,
2401
+ chainId,
2402
+ nonce: Number(authorizationNonce)
2403
+ });
2404
+ authorizationList = [signedAuthorization];
2405
+ }
2367
2406
  }
2368
2407
  if (pendingMessage) {
2369
2408
  logger.info(pendingMessage);
@@ -2378,6 +2417,9 @@ async function executeBatch(options, logger = noopLogger) {
2378
2417
  if (authorizationList.length > 0) {
2379
2418
  txRequest.authorizationList = authorizationList;
2380
2419
  }
2420
+ if (gas?.gasLimit) {
2421
+ txRequest.gas = gas.gasLimit;
2422
+ }
2381
2423
  if (gas?.maxFeePerGas) {
2382
2424
  txRequest.maxFeePerGas = gas.maxFeePerGas;
2383
2425
  }
@@ -4126,7 +4168,8 @@ async function executeDeployBatch(data, context, gas, logger = noopLogger) {
4126
4168
  environmentConfig: context.environmentConfig,
4127
4169
  executions: data.executions,
4128
4170
  pendingMessage,
4129
- gas
4171
+ gas,
4172
+ authorizationList: data.authorizationList
4130
4173
  },
4131
4174
  logger
4132
4175
  );
@@ -4237,7 +4280,8 @@ async function executeUpgradeBatch(data, context, gas, logger = noopLogger) {
4237
4280
  environmentConfig: context.environmentConfig,
4238
4281
  executions: data.executions,
4239
4282
  pendingMessage,
4240
- gas
4283
+ gas,
4284
+ authorizationList: data.authorizationList
4241
4285
  },
4242
4286
  logger
4243
4287
  );
@@ -4565,7 +4609,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
4565
4609
  var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
4566
4610
  var CanUpdateAppProfilePermission = "0x036fef61";
4567
4611
  function getDefaultClientId() {
4568
- const version = true ? "0.3.0-dev" : "0.0.0";
4612
+ const version = true ? "0.3.0-dev.0" : "0.0.0";
4569
4613
  return `ecloud-sdk/v${version}`;
4570
4614
  }
4571
4615
  var UserApiClient = class {
@@ -6084,16 +6128,24 @@ async function prepareDeployFromVerifiableBuild(options, logger = defaultLogger)
6084
6128
  },
6085
6129
  logger
6086
6130
  );
6131
+ logger.debug("Checking delegation status...");
6132
+ const authorizationList = await createAuthorizationList({
6133
+ walletClient: batch.walletClient,
6134
+ publicClient: batch.publicClient,
6135
+ environmentConfig: batch.environmentConfig
6136
+ });
6087
6137
  logger.debug("Estimating gas...");
6088
6138
  const gasEstimate = await estimateBatchGas({
6089
6139
  publicClient: batch.publicClient,
6090
6140
  account: batch.walletClient.account.address,
6091
- executions: batch.executions
6141
+ executions: batch.executions,
6142
+ authorizationList
6092
6143
  });
6093
6144
  const data = {
6094
6145
  appId: batch.appId,
6095
6146
  salt: batch.salt,
6096
- executions: batch.executions
6147
+ executions: batch.executions,
6148
+ authorizationList
6097
6149
  };
6098
6150
  return {
6099
6151
  prepared: {
@@ -6322,16 +6374,24 @@ async function prepareDeploy(options, logger = defaultLogger) {
6322
6374
  },
6323
6375
  logger
6324
6376
  );
6377
+ logger.debug("Checking delegation status...");
6378
+ const authorizationList = await createAuthorizationList({
6379
+ walletClient: batch.walletClient,
6380
+ publicClient: batch.publicClient,
6381
+ environmentConfig: batch.environmentConfig
6382
+ });
6325
6383
  logger.debug("Estimating gas...");
6326
6384
  const gasEstimate = await estimateBatchGas({
6327
6385
  publicClient: batch.publicClient,
6328
6386
  account: batch.walletClient.account.address,
6329
- executions: batch.executions
6387
+ executions: batch.executions,
6388
+ authorizationList
6330
6389
  });
6331
6390
  const data = {
6332
6391
  appId: batch.appId,
6333
6392
  salt: batch.salt,
6334
- executions: batch.executions
6393
+ executions: batch.executions,
6394
+ authorizationList
6335
6395
  };
6336
6396
  return {
6337
6397
  prepared: {
@@ -6462,15 +6522,23 @@ async function prepareUpgradeFromVerifiableBuild(options, logger = defaultLogger
6462
6522
  needsPermissionChange,
6463
6523
  imageRef: options.imageRef
6464
6524
  });
6525
+ logger.debug("Checking delegation status...");
6526
+ const authorizationList = await createAuthorizationList({
6527
+ walletClient: batch.walletClient,
6528
+ publicClient: batch.publicClient,
6529
+ environmentConfig: batch.environmentConfig
6530
+ });
6465
6531
  logger.debug("Estimating gas...");
6466
6532
  const gasEstimate = await estimateBatchGas({
6467
6533
  publicClient: batch.publicClient,
6468
6534
  account: batch.walletClient.account.address,
6469
- executions: batch.executions
6535
+ executions: batch.executions,
6536
+ authorizationList
6470
6537
  });
6471
6538
  const data = {
6472
6539
  appId: batch.appId,
6473
- executions: batch.executions
6540
+ executions: batch.executions,
6541
+ authorizationList
6474
6542
  };
6475
6543
  return {
6476
6544
  prepared: {
@@ -6643,15 +6711,23 @@ async function prepareUpgrade(options, logger = defaultLogger) {
6643
6711
  needsPermissionChange,
6644
6712
  imageRef: finalImageRef
6645
6713
  });
6714
+ logger.debug("Checking delegation status...");
6715
+ const authorizationList = await createAuthorizationList({
6716
+ walletClient: batch.walletClient,
6717
+ publicClient: batch.publicClient,
6718
+ environmentConfig: batch.environmentConfig
6719
+ });
6646
6720
  logger.debug("Estimating gas...");
6647
6721
  const gasEstimate = await estimateBatchGas({
6648
6722
  publicClient: batch.publicClient,
6649
6723
  account: batch.walletClient.account.address,
6650
- executions: batch.executions
6724
+ executions: batch.executions,
6725
+ authorizationList
6651
6726
  });
6652
6727
  const data = {
6653
6728
  appId: batch.appId,
6654
- executions: batch.executions
6729
+ executions: batch.executions,
6730
+ authorizationList
6655
6731
  };
6656
6732
  return {
6657
6733
  prepared: {