Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
moved beneficiary zero address check to Ownable
  • Loading branch information
NishantKoyalwar committed Aug 17, 2023
commit a55eac5a63a630b3fbe3a71680971818e78c6440
3 changes: 3 additions & 0 deletions contracts/access/Ownable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ abstract contract Ownable is Context {
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}

Expand Down
5 changes: 1 addition & 4 deletions contracts/finance/VestingWallet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ contract VestingWallet is Context, Ownable {
* vesting duration of the vesting wallet.
*/
constructor(address beneficiary, uint64 startTimestamp, uint64 durationSeconds) payable Ownable(beneficiary) {
if (beneficiary == address(0)) {
revert VestingWalletInvalidBeneficiary(address(0));
}


_start = startTimestamp;
_duration = durationSeconds;
}
Expand Down