Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Feb 5, 2025
1 parent 4ed0ca0 commit 56482d1
Show file tree
Hide file tree
Showing 7 changed files with 1,442 additions and 1,727 deletions.
2 changes: 1 addition & 1 deletion packages/bundler/src/runBundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export async function runBundler (argv: string[], overrideExit = true): Promise<
entryPoint
} = await connectContracts(wallet, !config.rip7560)

if (entryPoint != null && entryPoint.address != null && entryPoint.address !== config.entryPoint && [1337, 31337].includes(chainId)) {
if (entryPoint != null && entryPoint?.address !== config.entryPoint && [1337, 31337].includes(chainId)) {
console.log('NOTICE: overriding config entrypoint: ', { entryPoint: entryPoint.address })
config.entryPoint = entryPoint.address
config.senderCreator = await entryPoint.senderCreator()
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler/test/BundlerServer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('BundleServer', function () {
try {
entryPoint = await deployEntryPoint(provider)
} catch (e) {
throw new Error('Failed to deploy entry point - no RPC node?\n' + e)
throw new Error(`Failed to deploy entry point - no RPC node?\n ${e as string}`)
}

const config: BundlerConfig = {
Expand Down
3 changes: 0 additions & 3 deletions packages/utils/src/ERC4337Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ import {
import { abi as entryPointAbi } from '@account-abstraction/contracts/artifacts/IEntryPoint.json'

import { BigNumber, BigNumberish, BytesLike, ethers, TypedDataDomain, TypedDataField } from 'ethers'
import Debug from 'debug'
import { PackedUserOperation } from './Utils'
import { UserOperation } from './interfaces/UserOperation'

const debug = Debug('aa.utils')

// UserOperation is the first parameter of getUserOpHash
const getUserOpHashMethod = 'getUserOpHash'
const PackedUserOpType = entryPointAbi.find(entry => entry.name === getUserOpHashMethod)?.inputs[0]
Expand Down
3 changes: 1 addition & 2 deletions packages/validation-manager/src/ERC7562Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { FunctionFragment, hexZeroPad, Interface, keccak256 } from 'ethers/lib/u

import {
AddressZero,
IAccount__factory,
IEntryPoint__factory,
IPaymaster__factory,
OperationBase,
Expand Down Expand Up @@ -383,7 +382,7 @@ export class ERC7562Parser {
const arr = (call.accessedSlots as any)[access]
if (arr != null) {
for (const [idx, val] of Object.entries(arr)) {
console.log(`${indent} - ${access} ${idx}: ${val}`)
console.log(`${indent} - ${access} ${idx}: ${val as string}`)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/validation-manager/src/ValidationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ export class ValidationManager implements IValidationManager {
const validationData = this.decodeValidateUserOp(tracerResult.calls[callIndex])
const aggregator = validationData.aggregator
let paymasterValidationData: ValidationData = { validAfter: 0, validUntil: maxUint48, aggregator: AddressZero }
let paymasterContext: string | undefined
if (op.paymaster != null) {
callIndex++
const pmRet = this.decodeValidatePaymasterUserOp(tracerResult.calls[callIndex])
paymasterContext = pmRet.context
// paymasterContext = pmRet.context
paymasterValidationData = pmRet.validationData
}

Expand Down
1 change: 0 additions & 1 deletion packages/validation-manager/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { bundlerJSTracerName, debug_traceCall, GethNativeTracerName } from './Ge
import { ValidateUserOpResult } from './IValidationManager'
import { ValidationManager } from './ValidationManager'
import { ERC7562Parser } from './ERC7562Parser'
import { ERC7562Call } from './ERC7562Call'

export * from './ValidationManager'
export * from './ValidationManagerRIP7560'
Expand Down
Loading

0 comments on commit 56482d1

Please sign in to comment.