Skip to content

Commit ceb75cd

Browse files
jungcome7claude
andcommitted
fix: pass full tx structure to simulateOpStackL1Fee
Include authorizationList, gasLimit, and chainId so that the serialized transaction matches the actual EIP-7702 tx shape, giving an accurate L1 data fee estimate. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4db5d6f commit ceb75cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

apps/extension/src/pages/wallet/smart-account/confirm/hooks/use-smart-account-fee.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,17 @@ export function useSmartAccountFee(
7171

7272
let l1DataFee: Dec | undefined;
7373
if (hasOpStackFee) {
74+
const gasLimit = Math.ceil(result.gasUsed * 1.3);
7475
const l1Fee = await ethereumAccount.simulateOpStackL1Fee({
7576
to: hexAddress,
7677
value: "0x0",
7778
data: "0x",
79+
gasLimit,
80+
chainId: evmChainId,
81+
authorizationList: buildDummyAuthorizationList(
82+
ALLOWED_DELEGATORS[0],
83+
evmChainId
84+
),
7885
});
7986
l1DataFee = new Dec(BigInt(l1Fee));
8087
}

0 commit comments

Comments
 (0)