Skip to content

Commit

Permalink
feat: update eip 7702 auth format
Browse files Browse the repository at this point in the history
  • Loading branch information
adamegyed committed Feb 7, 2025
1 parent 100c836 commit f6d209a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const default7702GasEstimator: (

// Note: does not omit the delegation from estimation if the account is already 7702 delegated.

(struct as UserOperationStruct<"0.7.0">).eip7702auth = {
(struct as UserOperationStruct<"0.7.0">).eip7702Auth = {
chainId: toHex(params.client.chain.id),
nonce: toHex(accountNonce),
address: implementationAddress,
Expand All @@ -81,7 +81,7 @@ export const default7702GasEstimator: (

const estimatedUO = await gasEstimator_(struct, params);

estimatedUO.eip7702auth = undefined; // Strip out the auth after estimation.
estimatedUO.eip7702Auth = undefined; // Strip out the auth after estimation.

return estimatedUO;
};
2 changes: 1 addition & 1 deletion aa-sdk/core/src/middleware/defaults/7702signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const default7702UserOpSigner: (

return {
...uo,
eip7702auth: {
eip7702Auth: {
// deepHexlify doesn't encode number(0) correctly, it returns "0x"
chainId: toHex(client.chain.id),
nonce: toHex(accountNonce),
Expand Down
2 changes: 1 addition & 1 deletion aa-sdk/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export interface UserOperationRequest_v7 {
// [!endregion UserOperationRequest_v7]

export type Eip7702ExtendedFields = {
eip7702auth?: {
eip7702Auth?: {
chainId: Hex;
nonce: Hex;
address: Address;
Expand Down

0 comments on commit f6d209a

Please sign in to comment.