federicobond / solcheck

A Solidity linter written in JS
GNU General Public License v3.0
32 stars 7 forks source link

Write rule to warn about more than one child contract constructor #22

Open federicobond opened 7 years ago

federicobond commented 7 years ago

The child contract code is copied every time the Solidity compiler finds a new MyContract expression [1]. If you need to instantiate your contract in more than one location, write an internal helper function and proxy the construction through that.

[1]: May change with newer versions of Solidity.