Skip to content

Commit 3ba2f78

Browse files
update5
1 parent accdaa3 commit 3ba2f78

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/Assignment7.sol

+5-8
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ pragma solidity ^0.8.13;
44
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
55

66
contract Assignment7 is ERC20 {
7-
// Constructor to initialize the token
8-
// Fill in the parameters for the token name and symbol
9-
constructor() ERC20() {}
7+
// Constructor to initialize the token with name and symbol
8+
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
109

1110
// Function to mint tokens
12-
// Fill in the visibility modifier to be external
13-
// Set params as to address and amount
14-
function mint() {
15-
// Fill in the logic
16-
// call _mint function with to and amount params
11+
// Make the function external
12+
function mint(address to, uint256 amount) external {
13+
_mint(to, amount); // Use the _mint function from ERC20 to mint tokens
1714
}
1815
}

0 commit comments

Comments
 (0)