0

I made mistake in this section solution needed.

constructor(string memory name, string memory symbol, uint8 decimals,address totalSupply, address marketingWallet, 
address devWallet, address payable feeReceiver, address tokenOwnerAddress) public payable {
_name = "Mytoken";
_symbol = "MYT";
_decimals = 18;
totalSupply = 15 * 10**9 * 10**18; // 15 billion tokens with 18 decimals
devTokens = (totalSupply * 5) / 100; // 5% for dev wallet
marketingTokens = (totalSupply * 5) / 100; // 5% for marketing wallet
  // set tokenOwnerAddress as owner of all tokens
_mint(tokenOwnerAddress, totalSupply);
  // pay the service fee for contract deployment
feeReceiver.transfer(msg.value);
}

Error massage mytoken.sol:435:5: ParserError: Expected '{' but got 'constructor' constructor(string memory name, string memory symbol, uint8 decimals,address totalSupply, address marketingWallet,

^---------^
2
  • The issue seems to be before that. Can you share the whole contract?
    – Foxxxey
    Jun 10, 2023 at 22:18
  • Assuming that you're implementing an ERC20 smart contract, you must change to uint the parameter inside constructor called 'totalSupply'. The same datatype must have 'marketingToken' variable. It's also possible that you forgot a '{' in other part of your smart contract Jun 12, 2023 at 23:19

1 Answer 1

0

Well you are missing a semicolon at the marketingTokens line.

marketingTokens = (totalSupply * 5)
2
  • They didnt, the full line is marketingTokens = (totalSupply * 5) / 100;
    – Foxxxey
    Jun 10, 2023 at 22:19
  • Look at his post
    – wnmarc
    Jun 13, 2023 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.