@gnus.ai/upgrade-safe-transpiler-diamond
Version:
Solidity preprocessor used to generate OpenZeppelin Contracts Upgrade Safe using Diamond Pattern (EIP-2535).
19 lines • 1.3 kB
TypeScript
import { ContractDefinition, Identifier, VariableDeclaration } from "solidity-ast";
import { TransformerTools } from "../../transform";
import { ASTResolver } from "../../ast-resolver";
import { NodeType, NodeTypeMap } from "solidity-ast/node";
export interface IdentifierVariable {
identifier: Identifier;
varDecl: VariableDeclaration;
}
export declare function getUniqueIdentifierVarsUsed(contractNode: ContractDefinition, tools: TransformerTools): Map<number, IdentifierVariable>;
export declare function addVariableScopedContract(referenceScopes: Map<string, Set<string>>, varDecl: VariableDeclaration, resolver: ASTResolver): void;
/**
* Get a set/map of unique types that are being referenced in the contract
* @param contractNode
* @param tools
*/
export declare function getScopedContractsForVariables(contract: ContractDefinition, tools: TransformerTools): Map<string, Set<string>>;
export declare function getScopedContractName(scope: number, contractPaths: Map<string, Set<string>>, contractScopes: Map<number, string>, tools: TransformerTools, suffix?: string): string;
export declare function getNodeCount<T extends NodeType>(nodeTypes: T | T[], contract: ContractDefinition, filter?: (node: NodeTypeMap[T]) => any): number;
//# sourceMappingURL=get-identifiers-used.d.ts.map