GithubHelp home page GithubHelp logo

Comments (5)

Janther avatar Janther commented on June 26, 2024

mmmh not sure as the order of import does impact the bytecode generated and could potentially affect the way the state is stored and the amount of gas it uses on different calls.

doesn't feel right with me even as an option.

@fvictorio any thoughts?

from prettier-plugin-solidity.

RyanRHall avatar RyanRHall commented on June 26, 2024

@Janther Can you explain to me how import order impacts the bytecode? From my (albeit limited) experimenting, it seems to have no affect. Thanks!

from prettier-plugin-solidity.

Janther avatar Janther commented on June 26, 2024

I think I was mistaken, I was thinking of the order of inheritance in a contract.
Still would like to hear the community's feedback on this one as it does change the parsed AST.

from prettier-plugin-solidity.

Janther avatar Janther commented on June 26, 2024

Parking this for now, it seems to add some complexity (specially if we add comments for the imports into the mix).

from prettier-plugin-solidity.

fvictorio avatar fvictorio commented on June 26, 2024

I am of the opinion that this kind of thing belongs in a linter (tagging @juanpcapurro, who is maintaining solhint-community).

That being said, not everyone agrees with that point of view. For example, rustfmt does sort imports (and a lot of other things).

from prettier-plugin-solidity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.