CORIONplatform / solidity

GNU General Public License v3.0
12 stars 9 forks source link

Structure of module contract. #37

Closed Dexaran closed 7 years ago

Dexaran commented 7 years ago

module.sol contract contains only internal functions now (example _connectModule). External module functions are implemented by other contracts independently (example external connectModule). I think that it will be better to implement the external functions inside module.sol contract and to inherit them in contracts that are modules. If you need any specific functionality for these functions (for example, providers connectModule), then certain functions can be overridden in contracts that are modules.

iFA88 commented 7 years ago

Yes, we can put some external functions into the module.sol, but not every. These externals muss be unique: connectModule (provider), replaceModule, transferEvent, newSchellingRoundEvent

iFA88 commented 7 years ago

I can put disableModule, isActive, replaceModuleHandler to the module.sol.

Dexaran commented 7 years ago

Unique functions can be overridden in contracts that must have them.

iFA88 commented 7 years ago

https://github.com/CORIONplatform/solidity/pull/38