Skip to content

Commit 4c61a24

Browse files
committed
chore: remove deprecated types
1 parent 63f21e8 commit 4c61a24

File tree

3 files changed

+20
-221
lines changed

3 files changed

+20
-221
lines changed

packages/sdk/src/client/common/contract/caller.ts

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -225,25 +225,6 @@ export type DeployAppOptions = (CLIModeOptions | WalletClientModeOptions) & {
225225
imageRef: string;
226226
};
227227

228-
/**
229-
* @deprecated Use DeployAppOptions with walletClient/publicClient for frontend mode
230-
* Legacy interface for backward compatibility
231-
*/
232-
export interface DeployAppOptionsLegacy {
233-
privateKey: string;
234-
rpcUrl: string;
235-
environmentConfig: EnvironmentConfig;
236-
salt: Uint8Array;
237-
release: Release;
238-
publicLogs: boolean;
239-
imageRef: string;
240-
/** Optional gas params from estimation */
241-
gas?: {
242-
maxFeePerGas?: bigint;
243-
maxPriorityFeePerGas?: bigint;
244-
};
245-
}
246-
247228
/**
248229
* CLI mode options for calculateAppID
249230
*/
@@ -482,25 +463,6 @@ export type UpgradeAppOptions = (CLIModeOptions | WalletClientModeOptions) & {
482463
imageRef: string;
483464
};
484465

485-
/**
486-
* @deprecated Use UpgradeAppOptions with walletClient/publicClient for frontend mode
487-
*/
488-
export interface UpgradeAppOptionsLegacy {
489-
privateKey: string;
490-
rpcUrl: string;
491-
environmentConfig: EnvironmentConfig;
492-
appID: Address;
493-
release: Release;
494-
publicLogs: boolean;
495-
needsPermissionChange: boolean;
496-
imageRef: string;
497-
/** Optional gas params from estimation */
498-
gas?: {
499-
maxFeePerGas?: bigint;
500-
maxPriorityFeePerGas?: bigint;
501-
};
502-
}
503-
504466
/**
505467
* Upgrade app on-chain
506468
*
@@ -638,25 +600,6 @@ export type SendTransactionOptions = (
638600
txDescription: string;
639601
};
640602

641-
/**
642-
* @deprecated Use SendTransactionOptions with walletClient/publicClient for frontend mode
643-
*/
644-
export interface SendTransactionOptionsLegacy {
645-
privateKey: string;
646-
rpcUrl: string;
647-
environmentConfig: EnvironmentConfig;
648-
to: Address;
649-
data: Hex;
650-
value?: bigint;
651-
pendingMessage: string;
652-
txDescription: string;
653-
/** Optional gas params from estimation */
654-
gas?: {
655-
maxFeePerGas?: bigint;
656-
maxPriorityFeePerGas?: bigint;
657-
};
658-
}
659-
660603
export async function sendAndWaitForTransaction(
661604
options: SendTransactionOptions,
662605
logger: Logger

packages/sdk/src/client/common/contract/eip7702.ts

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ export interface EstimateBatchGasOptions {
4343

4444
/**
4545
* Estimate gas cost for a batch transaction
46-
*
46+
*
4747
* Use this to get cost estimate before prompting user for confirmation.
4848
* Note: This provides a conservative estimate since batch transactions
4949
* through EIP-7702 can have variable costs.
5050
*/
5151
export async function estimateBatchGas(
52-
options: EstimateBatchGasOptions,
52+
options: EstimateBatchGasOptions
5353
): Promise<GasEstimate> {
5454
const { publicClient, executions } = options;
5555

@@ -60,8 +60,8 @@ export async function estimateBatchGas(
6060
// Each execution adds ~50k gas, plus base cost of ~100k for the delegator call
6161
const baseGas = 100000n;
6262
const perExecutionGas = 50000n;
63-
const estimatedGas = baseGas + (BigInt(executions.length) * perExecutionGas);
64-
63+
const estimatedGas = baseGas + BigInt(executions.length) * perExecutionGas;
64+
6565
// Add 20% buffer for safety
6666
const gasLimit = (estimatedGas * 120n) / 100n;
6767

@@ -89,14 +89,11 @@ export interface ExecuteBatchOptions {
8989
callData: Hex;
9090
}>;
9191
pendingMessage: string;
92-
<<<<<<< HEAD
93-
privateKey?: Hex; // Private key for signing raw hash (required for authorization signing)
9492
/** Optional gas params from estimation */
9593
gas?: {
9694
maxFeePerGas?: bigint;
9795
maxPriorityFeePerGas?: bigint;
9896
};
99-
=======
10097
/**
10198
* Private key for signing authorization (CLI mode).
10299
* If not provided, walletClient.signAuthorization() will be used (wallet client mode).
@@ -108,7 +105,6 @@ export interface ExecuteBatchOptions {
108105
* where the private key is not directly accessible.
109106
*/
110107
useWalletClientSigning?: boolean;
111-
>>>>>>> 12f912b (feat: add support for external signer instead of private key)
112108
}
113109

114110
/**
@@ -149,11 +145,8 @@ export async function executeBatch(
149145
executions,
150146
pendingMessage,
151147
privateKey,
152-
<<<<<<< HEAD
153148
gas,
154-
=======
155149
useWalletClientSigning = false,
156-
>>>>>>> 12f912b (feat: add support for external signer instead of private key)
157150
} = options;
158151

159152
const account = walletClient.account;
@@ -286,26 +279,7 @@ export async function executeBatch(
286279
}
287280
}
288281

289-
<<<<<<< HEAD
290282
// 5. Show pending message
291-
=======
292-
// 5. Send transaction using viem
293-
if (needsConfirmation) {
294-
try {
295-
const fees = await publicClient.estimateFeesPerGas();
296-
const estimatedGas = 2000000n;
297-
const maxCostWei = estimatedGas * fees.maxFeePerGas;
298-
const costEth = formatETH(maxCostWei);
299-
logger.info(
300-
`${confirmationPrompt} on ${environmentConfig.name} (estimated max cost: ${costEth} ETH)`
301-
);
302-
// TODO: Add confirmation prompt
303-
} catch (error) {
304-
logger.warn(`Could not estimate cost for confirmation: ${error}`);
305-
}
306-
}
307-
308-
>>>>>>> 12f912b (feat: add support for external signer instead of private key)
309283
if (pendingMessage) {
310284
logger.info(pendingMessage);
311285
}
@@ -364,4 +338,4 @@ export async function executeBatch(
364338
}
365339

366340
return hash;
367-
}
341+
}

0 commit comments

Comments
 (0)