Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: extract common structs to separate file #5

Open
Maksandre opened this issue May 25, 2023 · 0 comments
Open

Feature Request: extract common structs to separate file #5

Maksandre opened this issue May 25, 2023 · 0 comments

Comments

@Maksandre
Copy link

Maksandre commented May 25, 2023

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";

...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant