Skip to content

Commit

Permalink
Create Owner.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 20, 2024
1 parent c178442 commit 9f2fdfe
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions genesis-smart-contracts/Owner.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// genesis-smart-contracts/Owner.sol
pragma solidity ^0.8.0;

contract Owner {
address public owner;

constructor() public {
owner = msg.sender;
}

modifier onlyOwner() {
require(msg.sender == owner, "Only the owner can execute this function");
_;
}

function transferOwnership(address newOwner) public onlyOwner {
owner = newOwner;
}
}

0 comments on commit 9f2fdfe

Please sign in to comment.