Closed Dexaran closed 7 years ago
Here you have function isOwner() https://github.com/CORIONplatform/solidity/blob/master/owned.sol#L12 The purpose of this function is to create functions that are only available to the owner. In this case you placed a requirement inside the function code.
isOwner()
owner
Here you have hardcoded the check for the owner: https://github.com/CORIONplatform/solidity/blob/master/ico.sol#L218 The purpose of this check is exactly the same with isOwner.
isOwner
Here you have a modifier: https://github.com/CORIONplatform/solidity/blob/master/schelling.sol#L44 The purpose of this modifier is exactly the same with isOwner.
Using similar implementations for similar things will simplify your code a lot and reduce a probability of mistake. Common pattern is to use only_owner modifier.
only_owner
Approved!
Here you have function
isOwner()
https://github.com/CORIONplatform/solidity/blob/master/owned.sol#L12 The purpose of this function is to create functions that are only available to theowner
. In this case you placed a requirement inside the function code.Here you have hardcoded the check for the owner: https://github.com/CORIONplatform/solidity/blob/master/ico.sol#L218 The purpose of this check is exactly the same with
isOwner
.Here you have a modifier: https://github.com/CORIONplatform/solidity/blob/master/schelling.sol#L44 The purpose of this modifier is exactly the same with
isOwner
.Using similar implementations for similar things will simplify your code a lot and reduce a probability of mistake. Common pattern is to use
only_owner
modifier.