diff --git a/packages/bundler/src/modules/BundleManager.ts b/packages/bundler/src/modules/BundleManager.ts index 58054c3d..3974c4f2 100644 --- a/packages/bundler/src/modules/BundleManager.ts +++ b/packages/bundler/src/modules/BundleManager.ts @@ -410,7 +410,7 @@ export class BundleManager implements IBundleManager { } mergeStorageMap(storageMap, validationResult.storageMap) - for (const eip7702Authorization of entry.userOp.authorizationList) { + for (const eip7702Authorization of entry.userOp.authorizationList ?? []) { const existingAuthorization = sharedAuthorizationList .find(it => { return getEip7702AuthorizationSigner(it) === getEip7702AuthorizationSigner(eip7702Authorization) @@ -420,7 +420,7 @@ export class BundleManager implements IBundleManager { // eslint-disable-next-line no-labels continue mainLoop } - if (existingAuthorization == null) { + if (existingAuthorization == null && entry.userOp.authorizationList != null) { sharedAuthorizationList.push(...entry.userOp.authorizationList) } } diff --git a/packages/utils/src/interfaces/OperationBase.ts b/packages/utils/src/interfaces/OperationBase.ts index 42e7e8ce..ec540598 100644 --- a/packages/utils/src/interfaces/OperationBase.ts +++ b/packages/utils/src/interfaces/OperationBase.ts @@ -22,5 +22,5 @@ export interface OperationBase { verificationGasLimit: BigNumberish paymasterVerificationGasLimit?: BigNumberish paymasterPostOpGasLimit?: BigNumberish - authorizationList: EIP7702Authorization[] + authorizationList?: EIP7702Authorization[] } diff --git a/packages/validation-manager/src/ValidationManager.ts b/packages/validation-manager/src/ValidationManager.ts index cee6b08c..6a69a8e3 100644 --- a/packages/validation-manager/src/ValidationManager.ts +++ b/packages/validation-manager/src/ValidationManager.ts @@ -222,7 +222,7 @@ export class ValidationManager implements IValidationManager { addresses: [], hash: '' } - const stateOverrideForEip7702 = await this.getAuthorizationsStateOverride(userOp.authorizationList) + const stateOverrideForEip7702 = await this.getAuthorizationsStateOverride(userOp.authorizationList ?? []) let storageMap: StorageMap = {} if (!this.unsafe) { let tracerResult: BundlerTracerResult