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

Recommendations #4

Open
fvictorio opened this issue Jul 14, 2021 · 5 comments
Open

Recommendations #4

fvictorio opened this issue Jul 14, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@fvictorio
Copy link

Hi, I have some suggestions for this plugin in case you're interested:

  1. Instead of making the user do await hre.storageLayout.export() in a script, create a task for that. It's probably just a matter of doing this:

    task("storage-layout", async (taskArgs, hre) => {
      await hre.storageLayout.export();
    })

    And then users can just run hh storage-layout

  2. In line with the previous item, maybe it's worth adding an optional argument to select the contract that will be printed, defaulting to printing all of them if no argument is passed.

  3. Finally, I think you could avoid making users configure the compiler by overriding the TASK_COMPILE_SOLIDITY_GET_COMPILATION_JOB_FOR_FILE subtask to change the compiler settings. The downside of this approach is that that setting will be enabled for all compilations, but that's probably fine. (You could also override it only when the storage-layout task is used, but that's a bit more involved and has other trade-offs.)

Let me know if you have questions about any of these items!

@Leon-Africa
Copy link

I like 1 and 2!

To reference: #6 (comment)

hh storage-layout --outputdir myoutputdir

@qzirak
Copy link

qzirak commented Feb 14, 2022

@fvictorio Is there any update on this ?

@fvictorio
Copy link
Author

@qzirak I'm not one of the plugin's authors, I was just suggesting some potential improvements 🙂

@qzirak
Copy link

qzirak commented Feb 15, 2022

@fvictorio Yeah, I was asking about the suggested update. For me it does not work. I get an error of 'storage of undefined' for some reason.

@0x3bfc
Copy link
Contributor

0x3bfc commented Apr 29, 2022

@fvictorio @qzirak sorry for the late reply. I will handle this issue as soon as I can.

@0x3bfc 0x3bfc self-assigned this Apr 29, 2022
@0x3bfc 0x3bfc added the enhancement New feature or request label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants