Skip to content

Feature Request: extract common structs to separate file #5

Open
@Maksandre

Description

@Maksandre

Suppose we generate different solidity contracts that share common structs. In that case, these structs will be defined in every generated file, which is a bit inconvenient if we import this struct in a single file later.

Now we have to do something like that:

import { ContractA, CommonStruct, AnotherCommonStruct } from "./ContractA.sol";
import { 
    ContractB, CommonStruct as CommonStructB, AnotherCommonStruct as AnotherCommonStructB 
} from "./ContractB.sol";

...

Is it possible to make evm-coder extract common structs into a separate file?
How it could be in that case:

import "./ContractA.sol";
import "./ContractB.sol";
import "./SomeCommonStructsHere.sol";

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions