import { ContractDefinition, SourceUnit, StructDefinition } from 'solidity-ast'; import { Node, NodeType, NodeTypeMap, YulNode, YulNodeType, YulNodeTypeMap } from 'solidity-ast/node'; /** * Get all the contract definitions on the given node */ export declare function findAll(astNode: Node | YulNode | (Node | YulNode)[], nodeType: T | T[], filterFn?: (node: (NodeTypeMap & YulNodeTypeMap)[T]) => boolean): (NodeTypeMap & YulNodeTypeMap)[T][]; export declare function findOne(astNode: Node | YulNode | (Node | YulNode)[], nodeType: T | T[], filterFn?: (node: (NodeTypeMap & YulNodeTypeMap)[T]) => boolean): (NodeTypeMap & YulNodeTypeMap)[T] | undefined; export declare function findOneById(astNode: Node | YulNode | (Node | YulNode)[], nodeType: T | T[], nodeId: number, filterFn?: (node: (NodeTypeMap & YulNodeTypeMap)[T]) => boolean): (NodeTypeMap & YulNodeTypeMap)[T]; export declare function findChildren(sourceUnit: SourceUnit, nodeType: T, filterFn?: (node: SourceUnit['nodes'][number]) => boolean): (NodeTypeMap & YulNodeTypeMap)[T][]; /** * Get all the contract definitions on the given node */ export declare function findContractDefinitions(astNode: SourceUnit): ContractDefinition[]; /** * Get all the variable nodes defined on a contract node */ export declare function findContractNodeVariables(contractNode: StructDefinition): import("solidity-ast").VariableDeclaration[]; /** * Get all the structs definitions on a contract node */ export declare function findContractNodeStructs(contractNode: ContractDefinition): StructDefinition[]; /** * Get the state variables from the given contract name */ export declare function findContractStateVariables(contractNode: StructDefinition): import("solidity-ast").VariableDeclaration[]; /** * Find all the slot definitions on the given AST node */ export declare function findYulStorageSlotAssignments(contractNode: ContractDefinition): unknown[]; /** * Get the complete tree of dependencies from the given contract. This method recursevely * finds the inherited contracts following variable references. */ export declare function findContractDependencies(contractFullyQualifiedName: string, astNodes: SourceUnit[]): string[]; /** * Find a contracts node on the ASTs trees. */ export declare function findContractNode(contractFullyQualifiedName: string, astNodes: SourceUnit[]): ContractDefinition | undefined; /** * Find a contracts node on the ASTs trees, and returns both */ export declare function findContractNodeWithAst(contractFullyQualifiedName: string, astNodes: SourceUnit[]): [SourceUnit, ContractDefinition]; /** * Get the fully qualified name of a local contract on a given AST node. Takes * into account any possible aliases given to it during import. */ export declare function findImportedContractFullyQualifiedName(localContractName: string, baseAstNode: SourceUnit, astNodes: SourceUnit[]): string | null | undefined; /** * Get all the function selectors definitions from the complete tree of contract * nodes starting from the given root contract definition */ export declare function findFunctionSelectors(contractFullyQualifiedName: string, astNodes: SourceUnit[]): { selector: string; }[]; /** * Get all the function definitions from the complete tree of contract * nodes starting from the given root contract definition. */ export declare function findFunctionNodes(contractFullyQualifiedName: string, astNodes: SourceUnit[]): import("solidity-ast").FunctionDefinition[]; export declare function findImportsRecursive(sourceName: string, allSourceUnits: SourceUnit[]): string[]; //# sourceMappingURL=finders.d.ts.map