0

Is it possible to eliminate specifying the solc compiler version at the beginning of each smart contract. This would help in separating the compiler version from the smart contract, so if the compiler version changes one could still possibly compile the contract if there are no major changes.

  • 1
    1. It is not possible, because that's what the language standard specifies (here). 2. It would not be helpful, because that's exactly what allows you to "still compile the contract if there are no major changes" (i.e., using the ^ character). – goodvibration Jan 3 at 12:57
  • @goodvibration that's exactly my point. It shouldnt be that way. For eg. in Java, we do not specify compiler version in each program. if compiler version changes the older programs still compile as long as there no major changes, we just have to update jdk. Something similar could also be done here too. – Sowmya Kannan Jan 3 at 13:13
  • A lot of things can be done here, but this is a relatively new eco-system, so many of the related utilities / infrastructures / platforms are in a sort of a beta phase. Also, to my understanding, the compiler version in every contract is due to the fact that once the contract is deployed, it resides at that address for eternity. So unlike other kind of deployments, where a new piece of code overrides the old one, you actually want / need to explicitly state how the binary was generated. – goodvibration Jan 3 at 13:43
  • Ok, fair enough. I understand that this is a new eco system and there is a lot of evolution that is happening as different technologies get more mature. This however would be nice to have option for future. – Sowmya Kannan Jan 6 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.