Skip to content

Commit

Permalink
feat(contracts): openzeppelin v5 ownable migration
Browse files Browse the repository at this point in the history
  • Loading branch information
owieth committed Nov 6, 2023
1 parent eb8138b commit 5a1ead8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/Token.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract Deploy is Script {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(deployerPrivateKey);

new Token();
new Token(msg.sender);

vm.stopBroadcast();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ contract Token is ERC20, Ownable {
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/

constructor() ERC20("Token", "TKN") { }
constructor(address initialOwner) ERC20("Token", "TKN") Ownable(initialOwner) { }

/*//////////////////////////////////////////////////////////////
EXTERNAL
Expand Down
2 changes: 1 addition & 1 deletion tests/Token.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract TokenTest is Test {
Token public token;

function setUp() public {
token = new Token();
token = new Token(msg.sender);
token.setNumber(0);
}

Expand Down

0 comments on commit 5a1ead8

Please sign in to comment.