Skip to content

Commit

Permalink
dumpCalls
Browse files Browse the repository at this point in the history
  • Loading branch information
drortirosh committed Feb 19, 2025
1 parent f616408 commit c85351a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/utils/contracts/Imports.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ import "@account-abstraction/contracts/core/EntryPointSimulations.sol";
import "@account-abstraction/contracts/interfaces/IStakeManager.sol";
import "@account-abstraction/contracts/accounts/SimpleAccountFactory.sol";
import "@account-abstraction/rip7560/contracts/predeploys/Rip7560StakeManager.sol";
import "@account-abstraction/rip7560/contracts/interfaces/IRip7560Account.sol";
import "@account-abstraction/rip7560/contracts/interfaces/IRip7560Paymaster.sol";

import {NonceManager as NonceManagerRIP7712} from "@account-abstraction/rip7560/contracts/predeploys/NonceManager.sol";
3 changes: 2 additions & 1 deletion packages/validation-manager/src/ERC7562Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { bannedOpCodes, opcodesOnlyInStakedEntities } from './ERC7562BannedOpcod
import { ValidationResult } from './IValidationManager'
import { ERC7562Call } from './ERC7562Call'
import { getOpcodeName } from './enum/EVMOpcodes'
import { _tryDetectKnownMethod } from './decodeHelper'
import { _tryDetectKnownMethod, dumpCallTree } from './decodeHelper'

export interface ERC7562ValidationResults {
storageMap: StorageMap
Expand Down Expand Up @@ -81,6 +81,7 @@ export class ERC7562Parser {
throw new Error('Unexpected traceCall result: no calls from entrypoint.')
}
this.stakeValidationResult = validationResult
dumpCallTree(erc7562Call, { ...userOp })
this._innerStepRecursive(userOp, erc7562Call, 0, erc7562Call.to)
return {
contractAddresses: this.contractAddresses,
Expand Down
3 changes: 3 additions & 0 deletions packages/validation-manager/src/decodeHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { ERC7562Call } from './ERC7562Call'
import Debug from 'debug'
import { IEntryPoint__factory, IPaymaster__factory, SenderCreator__factory } from '@account-abstraction/utils'
import { FunctionFragment, Interface } from 'ethers/lib/utils'
import { IRip7560Account__factory, IRip7560Paymaster__factory } from '@account-abstraction/utils/dist/src/types'

const debug = Debug('aa.dump')

Expand Down Expand Up @@ -234,6 +235,8 @@ const RIP7560EntryPointABI = [

const abis = [
...RIP7560EntryPointABI,
...IRip7560Account__factory.abi,
...IRip7560Paymaster__factory.abi,
...SenderCreator__factory.abi,
...IEntryPoint__factory.abi,
...IPaymaster__factory.abi
Expand Down

0 comments on commit c85351a

Please sign in to comment.