until now I have set the owner in a contract like so:
pragma solidity ^0.5.2;
contract SampleContract{
address payable owner = msg.sender;
}
in the docs it is suggested to do it this way:
pragma solidity ^0.5.2;
contract SampleContract{
address payable owner;
constructor() public {
owner = msg.sender;
}
}
I don't notice any difference in the behavior of the contract. Are both ways equivalent or is there a possible security issue with the first one?
Thanks a lot