Hello everyone I get this Compilation error
I guess I make a mistake in the constructor ?
Can someone get some hints please ?
token.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import '../node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol';
contract GameToken is ERC20 {
constructor () ERC20(string memory name_, string memory symbol_) {
_mint(msg.sender, 10000);
}
}
with :
2_token_migration.js
const GameToken = artifacts.require("GameToken");
module.exports = function (deployer) {
deployer.deploy(GameToken,"GameTK","GTK");
};
I get this error msg below :
ParserError: Expected ‘,’ but got ‘memory’
–> project:/contracts/token.sol:7:33:
|
7 | constructor () ERC20(string memory name_, string memory symbol_) {
| ^^^^^^
Compilation failed. See above.
- Fetching solc version list from solc-bin. Attempt #1
- Fetching solc version list from solc-bin. Attempt #1
Compilation is all Ok if I use
constructor () ERC20(“GameTK”,“GTK”) {
and
deployer.deploy(GameToken);