@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/VERSION +2 -2
- package/dist/billing.d.cts +1 -1
- package/dist/billing.d.ts +1 -1
- package/dist/browser.cjs +43 -27
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +43 -27
- package/dist/browser.js.map +1 -1
- package/dist/{compute-CdZxISln.d.ts → compute-BcJuIxc1.d.ts} +1 -1
- package/dist/{compute-Dstl0CA0.d.cts → compute-oD9uqLtr.d.cts} +1 -1
- package/dist/compute.cjs +111 -35
- package/dist/compute.cjs.map +1 -1
- package/dist/compute.d.cts +2 -2
- package/dist/compute.d.ts +2 -2
- package/dist/compute.js +111 -35
- package/dist/compute.js.map +1 -1
- package/dist/{helpers-Dk0zwgms.d.cts → helpers-BNGcO-VX.d.cts} +5 -2
- package/dist/{helpers-4w0Iojmm.d.ts → helpers-Cp8qGRTb.d.ts} +5 -2
- package/dist/{index-C0w92tCs.d.cts → index-5y9NG_Id.d.cts} +5 -1
- package/dist/{index-C0w92tCs.d.ts → index-5y9NG_Id.d.ts} +5 -1
- package/dist/index.cjs +111 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +111 -35
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AppId } from './index-
|
|
2
|
-
export { al as AlreadyActiveResponse, w as AppConfig, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, K as BatchedDeployResult, a5 as BillingEnvironmentConfig, C as CalculateAppIDOptions, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, D as DeployAppOptions, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, a4 as DeployResult, au as DeployStep, aa as DockerImageConfig, a6 as EnvironmentConfig, E as EstimateGasOptions, J as ExecuteDeployBatchedOptions, X as ExecuteDeployResult, H as ExecuteDeploySequentialOptions, Y as ExecuteUpgradeResult, G as GasEstimate, W as GasOpts, a9 as ImageDigestResult, I as IsDelegatedOptions, a1 as LifecycleOpts, ab as Logger, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, P as PrepareDeployBatchOptions, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, x as PrepareUpgradeBatchOptions, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, $ as PreparedDeploy, y as PreparedDeployBatch, Z as PreparedDeployData, a0 as PreparedUpgrade, z as PreparedUpgradeBatch, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, S as SendTransactionOptions, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, B as SuspendOptions, F as UndelegateOptions, U as UpgradeAppOptions, O as UpgradeAppOpts, j as calculateAppID, i as deployApp, e as estimateTransactionGas, h as executeDeployBatch, l as executeDeployBatched, k as executeDeploySequential, o as executeUpgradeBatch, f as formatETH, c as getActiveAppCount, g as getAllAppsByDeveloper, a as getAppsByCreator, b as getAppsByDeveloper, d as getMaxActiveAppsPerUser, r as isDelegated, M as logVisibility, L as noopLogger, p as prepareDeployBatch, n as prepareUpgradeBatch, q as sendAndWaitForTransaction, m as supportsEIP5792, s as supportsEIP7702, t as suspend, v as undelegate, u as upgradeApp } from './index-
|
|
3
|
-
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-
|
|
4
|
-
export { F as AppInfo, J as AppInfoResponse, I as AppMetrics, H as AppProfileInfo, K as BillingApiClient, M as BillingApiClientOptions, ac as BillingApiConfig, af as BillingLoginRequest, ae as BillingLoginResult, ab as BillingSessionError, ad as BillingSessionInfo, z as CreateAppParams, Q as EstimateBatchGasOptions, R as ExecuteBatchOptions, T as Execution, G as GeneratedKey, L as LogVisibility, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, _ as SiweMessageResult, U as UserApiClient, E as UserApiClientOptions, ah as addHexPrefix, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, N as estimateBatchGas, O as executeBatch, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, a7 as getBillingApiSession, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, a8 as isBillingSessionValid, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, a5 as loginToBillingApi, a9 as loginToBothApis, $ as loginToComputeApi, a6 as logoutFromBillingApi, aa as logoutFromBothApis, 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, q as validateDescription, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, o as validateURL, p as validateXURL } from './helpers-
|
|
1
|
+
import { A as AppId } from './index-5y9NG_Id.cjs';
|
|
2
|
+
export { al as AlreadyActiveResponse, w as AppConfig, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, K as BatchedDeployResult, a5 as BillingEnvironmentConfig, C as CalculateAppIDOptions, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, D as DeployAppOptions, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, a4 as DeployResult, au as DeployStep, aa as DockerImageConfig, a6 as EnvironmentConfig, E as EstimateGasOptions, J as ExecuteDeployBatchedOptions, X as ExecuteDeployResult, H as ExecuteDeploySequentialOptions, Y as ExecuteUpgradeResult, G as GasEstimate, W as GasOpts, a9 as ImageDigestResult, I as IsDelegatedOptions, a1 as LifecycleOpts, ab as Logger, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, P as PrepareDeployBatchOptions, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, x as PrepareUpgradeBatchOptions, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, $ as PreparedDeploy, y as PreparedDeployBatch, Z as PreparedDeployData, a0 as PreparedUpgrade, z as PreparedUpgradeBatch, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, S as SendTransactionOptions, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, B as SuspendOptions, F as UndelegateOptions, U as UpgradeAppOptions, O as UpgradeAppOpts, j as calculateAppID, i as deployApp, e as estimateTransactionGas, h as executeDeployBatch, l as executeDeployBatched, k as executeDeploySequential, o as executeUpgradeBatch, f as formatETH, c as getActiveAppCount, g as getAllAppsByDeveloper, a as getAppsByCreator, b as getAppsByDeveloper, d as getMaxActiveAppsPerUser, r as isDelegated, M as logVisibility, L as noopLogger, p as prepareDeployBatch, n as prepareUpgradeBatch, q as sendAndWaitForTransaction, m as supportsEIP5792, s as supportsEIP7702, t as suspend, v as undelegate, u as upgradeApp } from './index-5y9NG_Id.cjs';
|
|
3
|
+
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-BNGcO-VX.cjs';
|
|
4
|
+
export { F as AppInfo, J as AppInfoResponse, I as AppMetrics, H as AppProfileInfo, K as BillingApiClient, M as BillingApiClientOptions, ac as BillingApiConfig, af as BillingLoginRequest, ae as BillingLoginResult, ab as BillingSessionError, ad as BillingSessionInfo, z as CreateAppParams, Q as EstimateBatchGasOptions, R as ExecuteBatchOptions, T as Execution, G as GeneratedKey, L as LogVisibility, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, _ as SiweMessageResult, U as UserApiClient, E as UserApiClientOptions, ah as addHexPrefix, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, N as estimateBatchGas, O as executeBatch, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, a7 as getBillingApiSession, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, a8 as isBillingSessionValid, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, a5 as loginToBillingApi, a9 as loginToBothApis, $ as loginToComputeApi, a6 as logoutFromBillingApi, aa as logoutFromBothApis, 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, q as validateDescription, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, o as validateURL, p as validateXURL } from './helpers-BNGcO-VX.cjs';
|
|
5
5
|
import { WalletClient, Address, Hex } from 'viem';
|
|
6
6
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
7
7
|
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as AppId } from './index-
|
|
2
|
-
export { al as AlreadyActiveResponse, w as AppConfig, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, K as BatchedDeployResult, a5 as BillingEnvironmentConfig, C as CalculateAppIDOptions, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, D as DeployAppOptions, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, a4 as DeployResult, au as DeployStep, aa as DockerImageConfig, a6 as EnvironmentConfig, E as EstimateGasOptions, J as ExecuteDeployBatchedOptions, X as ExecuteDeployResult, H as ExecuteDeploySequentialOptions, Y as ExecuteUpgradeResult, G as GasEstimate, W as GasOpts, a9 as ImageDigestResult, I as IsDelegatedOptions, a1 as LifecycleOpts, ab as Logger, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, P as PrepareDeployBatchOptions, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, x as PrepareUpgradeBatchOptions, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, $ as PreparedDeploy, y as PreparedDeployBatch, Z as PreparedDeployData, a0 as PreparedUpgrade, z as PreparedUpgradeBatch, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, S as SendTransactionOptions, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, B as SuspendOptions, F as UndelegateOptions, U as UpgradeAppOptions, O as UpgradeAppOpts, j as calculateAppID, i as deployApp, e as estimateTransactionGas, h as executeDeployBatch, l as executeDeployBatched, k as executeDeploySequential, o as executeUpgradeBatch, f as formatETH, c as getActiveAppCount, g as getAllAppsByDeveloper, a as getAppsByCreator, b as getAppsByDeveloper, d as getMaxActiveAppsPerUser, r as isDelegated, M as logVisibility, L as noopLogger, p as prepareDeployBatch, n as prepareUpgradeBatch, q as sendAndWaitForTransaction, m as supportsEIP5792, s as supportsEIP7702, t as suspend, v as undelegate, u as upgradeApp } from './index-
|
|
3
|
-
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-
|
|
4
|
-
export { F as AppInfo, J as AppInfoResponse, I as AppMetrics, H as AppProfileInfo, K as BillingApiClient, M as BillingApiClientOptions, ac as BillingApiConfig, af as BillingLoginRequest, ae as BillingLoginResult, ab as BillingSessionError, ad as BillingSessionInfo, z as CreateAppParams, Q as EstimateBatchGasOptions, R as ExecuteBatchOptions, T as Execution, G as GeneratedKey, L as LogVisibility, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, _ as SiweMessageResult, U as UserApiClient, E as UserApiClientOptions, ah as addHexPrefix, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, N as estimateBatchGas, O as executeBatch, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, a7 as getBillingApiSession, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, a8 as isBillingSessionValid, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, a5 as loginToBillingApi, a9 as loginToBothApis, $ as loginToComputeApi, a6 as logoutFromBillingApi, aa as logoutFromBothApis, 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, q as validateDescription, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, o as validateURL, p as validateXURL } from './helpers-
|
|
1
|
+
import { A as AppId } from './index-5y9NG_Id.js';
|
|
2
|
+
export { al as AlreadyActiveResponse, w as AppConfig, ac as AppProfile, ad as AppProfileResponse, a2 as AppRecord, K as BatchedDeployResult, a5 as BillingEnvironmentConfig, C as CalculateAppIDOptions, aq as CancelResponse, ao as CancelSuccessResponse, af as ChainID, ak as CheckoutCreatedResponse, ai as CreateSubscriptionOptions, aj as CreateSubscriptionResponse, D as DeployAppOptions, N as DeployAppOpts, a3 as DeployOptions, at as DeployProgressCallback, a4 as DeployResult, au as DeployStep, aa as DockerImageConfig, a6 as EnvironmentConfig, E as EstimateGasOptions, J as ExecuteDeployBatchedOptions, X as ExecuteDeployResult, H as ExecuteDeploySequentialOptions, Y as ExecuteUpgradeResult, G as GasEstimate, W as GasOpts, a9 as ImageDigestResult, I as IsDelegatedOptions, a1 as LifecycleOpts, ab as Logger, ap as NoActiveSubscriptionResponse, a8 as ParsedEnvironment, am as PaymentIssueResponse, P as PrepareDeployBatchOptions, T as PrepareDeployFromVerifiableBuildOpts, Q as PrepareDeployOpts, x as PrepareUpgradeBatchOptions, V as PrepareUpgradeFromVerifiableBuildOpts, R as PrepareUpgradeOpts, $ as PreparedDeploy, y as PreparedDeployBatch, Z as PreparedDeployData, a0 as PreparedUpgrade, z as PreparedUpgradeBatch, _ as PreparedUpgradeData, ae as ProductID, ar as ProductSubscriptionResponse, a7 as Release, S as SendTransactionOptions, av as SequentialDeployResult, an as SubscribeResponse, ah as SubscriptionLineItem, as as SubscriptionOpts, ag as SubscriptionStatus, B as SuspendOptions, F as UndelegateOptions, U as UpgradeAppOptions, O as UpgradeAppOpts, j as calculateAppID, i as deployApp, e as estimateTransactionGas, h as executeDeployBatch, l as executeDeployBatched, k as executeDeploySequential, o as executeUpgradeBatch, f as formatETH, c as getActiveAppCount, g as getAllAppsByDeveloper, a as getAppsByCreator, b as getAppsByDeveloper, d as getMaxActiveAppsPerUser, r as isDelegated, M as logVisibility, L as noopLogger, p as prepareDeployBatch, n as prepareUpgradeBatch, q as sendAndWaitForTransaction, m as supportsEIP5792, s as supportsEIP7702, t as suspend, v as undelegate, u as upgradeApp } from './index-5y9NG_Id.js';
|
|
3
|
+
import { C as ComputeApiConfig, S as SessionInfo, a as SessionError, b as SiweMessageParams } from './helpers-Cp8qGRTb.js';
|
|
4
|
+
export { F as AppInfo, J as AppInfoResponse, I as AppMetrics, H as AppProfileInfo, K as BillingApiClient, M as BillingApiClientOptions, ac as BillingApiConfig, af as BillingLoginRequest, ae as BillingLoginResult, ab as BillingSessionError, ad as BillingSessionInfo, z as CreateAppParams, Q as EstimateBatchGasOptions, R as ExecuteBatchOptions, T as Execution, G as GeneratedKey, L as LogVisibility, a4 as LoginRequest, a3 as LoginResult, A as LogsParams, _ as SiweMessageResult, U as UserApiClient, E as UserApiClientOptions, ah as addHexPrefix, j as assertValidImageReference, n as assertValidPrivateKey, P as checkERC7702Delegation, V as createSiweMessage, N as estimateBatchGas, O as executeBatch, k as extractAppNameFromImage, D as generateNewPrivateKey, X as generateNonce, d as getAvailableEnvironments, a7 as getBillingApiSession, c as getBillingEnvironmentConfig, e as getBuildType, ag as getChainFromID, a1 as getComputeApiSession, g as getEnvironmentConfig, a8 as isBillingSessionValid, i as isEnvironmentAvailable, f as isMainnet, a2 as isSessionValid, Y as isSiweMessageExpired, Z as isSiweMessageNotYetValid, B as isSubscriptionActive, a5 as loginToBillingApi, a9 as loginToBothApis, $ as loginToComputeApi, a6 as logoutFromBillingApi, aa as logoutFromBothApis, 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, q as validateDescription, h as validateImageReference, l as validateInstanceTypeSKU, s as validateLogVisibility, y as validateLogsParams, m as validatePrivateKeyFormat, o as validateURL, p as validateXURL } from './helpers-Cp8qGRTb.js';
|
|
5
5
|
import { WalletClient, Address, Hex } from 'viem';
|
|
6
6
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
7
7
|
|
package/dist/browser.js
CHANGED
|
@@ -567,7 +567,7 @@ var CanViewAppLogsPermission = "0x2fd3f2fe";
|
|
|
567
567
|
var CanViewSensitiveAppInfoPermission = "0x0e67b22f";
|
|
568
568
|
var CanUpdateAppProfilePermission = "0x036fef61";
|
|
569
569
|
function getDefaultClientId() {
|
|
570
|
-
const version = true ? "0.3.0-dev" : "0.0.0";
|
|
570
|
+
const version = true ? "0.3.0-dev.0" : "0.0.0";
|
|
571
571
|
return `ecloud-sdk/v${version}`;
|
|
572
572
|
}
|
|
573
573
|
var UserApiClient = class {
|
|
@@ -2539,7 +2539,7 @@ function encodeExecuteBatchData(executions) {
|
|
|
2539
2539
|
});
|
|
2540
2540
|
}
|
|
2541
2541
|
async function estimateBatchGas(options) {
|
|
2542
|
-
const { publicClient, account, executions } = options;
|
|
2542
|
+
const { publicClient, account, executions, authorizationList } = options;
|
|
2543
2543
|
const executeBatchData = encodeExecuteBatchData(executions);
|
|
2544
2544
|
const [gasTipCap, block, estimatedGas] = await Promise.all([
|
|
2545
2545
|
publicClient.estimateMaxPriorityFeePerGas(),
|
|
@@ -2547,7 +2547,8 @@ async function estimateBatchGas(options) {
|
|
|
2547
2547
|
publicClient.estimateGas({
|
|
2548
2548
|
account,
|
|
2549
2549
|
to: account,
|
|
2550
|
-
data: executeBatchData
|
|
2550
|
+
data: executeBatchData,
|
|
2551
|
+
authorizationList
|
|
2551
2552
|
})
|
|
2552
2553
|
]);
|
|
2553
2554
|
const baseFee = block.baseFeePerGas ?? 0n;
|
|
@@ -2571,7 +2572,15 @@ async function checkERC7702Delegation(publicClient, account, delegatorAddress) {
|
|
|
2571
2572
|
return code.toLowerCase() === expectedCode.toLowerCase();
|
|
2572
2573
|
}
|
|
2573
2574
|
async function executeBatch(options, logger = noopLogger) {
|
|
2574
|
-
const {
|
|
2575
|
+
const {
|
|
2576
|
+
walletClient,
|
|
2577
|
+
publicClient,
|
|
2578
|
+
environmentConfig,
|
|
2579
|
+
executions,
|
|
2580
|
+
pendingMessage,
|
|
2581
|
+
gas,
|
|
2582
|
+
authorizationList: providedAuthList
|
|
2583
|
+
} = options;
|
|
2575
2584
|
const account = walletClient.account;
|
|
2576
2585
|
if (!account) {
|
|
2577
2586
|
throw new Error("Wallet client must have an account");
|
|
@@ -2581,27 +2590,29 @@ async function executeBatch(options, logger = noopLogger) {
|
|
|
2581
2590
|
throw new Error("Wallet client must have a chain");
|
|
2582
2591
|
}
|
|
2583
2592
|
const executeBatchData = encodeExecuteBatchData(executions);
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2593
|
+
let authorizationList = providedAuthList || [];
|
|
2594
|
+
if (authorizationList.length === 0) {
|
|
2595
|
+
const isDelegated2 = await checkERC7702Delegation(
|
|
2596
|
+
publicClient,
|
|
2597
|
+
account.address,
|
|
2598
|
+
environmentConfig.erc7702DelegatorAddress
|
|
2599
|
+
);
|
|
2600
|
+
if (!isDelegated2) {
|
|
2601
|
+
const transactionNonce = await publicClient.getTransactionCount({
|
|
2602
|
+
address: account.address,
|
|
2603
|
+
blockTag: "pending"
|
|
2604
|
+
});
|
|
2605
|
+
const chainId = await publicClient.getChainId();
|
|
2606
|
+
const authorizationNonce = transactionNonce + 1;
|
|
2607
|
+
logger.debug("Using wallet client signing for EIP-7702 authorization");
|
|
2608
|
+
const signedAuthorization = await walletClient.signAuthorization({
|
|
2609
|
+
account,
|
|
2610
|
+
contractAddress: environmentConfig.erc7702DelegatorAddress,
|
|
2611
|
+
chainId,
|
|
2612
|
+
nonce: Number(authorizationNonce)
|
|
2613
|
+
});
|
|
2614
|
+
authorizationList = [signedAuthorization];
|
|
2615
|
+
}
|
|
2605
2616
|
}
|
|
2606
2617
|
if (pendingMessage) {
|
|
2607
2618
|
logger.info(pendingMessage);
|
|
@@ -2616,6 +2627,9 @@ async function executeBatch(options, logger = noopLogger) {
|
|
|
2616
2627
|
if (authorizationList.length > 0) {
|
|
2617
2628
|
txRequest.authorizationList = authorizationList;
|
|
2618
2629
|
}
|
|
2630
|
+
if (gas?.gasLimit) {
|
|
2631
|
+
txRequest.gas = gas.gasLimit;
|
|
2632
|
+
}
|
|
2619
2633
|
if (gas?.maxFeePerGas) {
|
|
2620
2634
|
txRequest.maxFeePerGas = gas.maxFeePerGas;
|
|
2621
2635
|
}
|
|
@@ -4333,7 +4347,8 @@ async function executeDeployBatch(data, context, gas, logger = noopLogger) {
|
|
|
4333
4347
|
environmentConfig: context.environmentConfig,
|
|
4334
4348
|
executions: data.executions,
|
|
4335
4349
|
pendingMessage,
|
|
4336
|
-
gas
|
|
4350
|
+
gas,
|
|
4351
|
+
authorizationList: data.authorizationList
|
|
4337
4352
|
},
|
|
4338
4353
|
logger
|
|
4339
4354
|
);
|
|
@@ -4612,7 +4627,8 @@ async function executeUpgradeBatch(data, context, gas, logger = noopLogger) {
|
|
|
4612
4627
|
environmentConfig: context.environmentConfig,
|
|
4613
4628
|
executions: data.executions,
|
|
4614
4629
|
pendingMessage,
|
|
4615
|
-
gas
|
|
4630
|
+
gas,
|
|
4631
|
+
authorizationList: data.authorizationList
|
|
4616
4632
|
},
|
|
4617
4633
|
logger
|
|
4618
4634
|
);
|