@gnus.ai/upgrade-safe-transpiler-diamond
Version:
Solidity preprocessor used to generate OpenZeppelin Contracts Upgrade Safe using Diamond Pattern (EIP-2535).
10 lines (8 loc) • 447 B
text/typescript
import { TransformerTools } from "../../transform";
import {ContractDefinition, VariableDeclaration} from "solidity-ast";
import assert from "assert";
export function getVarStorageName(varDecl: VariableDeclaration, { resolver }: TransformerTools) : string {
const contract = resolver.resolveContract(varDecl.scope);
assert(contract, `Could not locate Contract with id ${varDecl.scope}`);
return contract.name + 'Storage.layout().';
}