Reputation:
I am trying to create a contract for an ERC20 token and am getting this error when I try to deploy it:
contracts/YourToken.sol:11:33: ParserError: Expected ';' but got identifier const yourToken = await deployments.get("plonCoin");
Any thoughts on why this might be happening?
Upvotes: 0
Views: 3412
Reputation: 43481
You're mixing together Solidity code of the contract and JavasScript code of an off-chain app working with the contract.
const yourToken = await deployments.get("plonCoin");
const result = await yourToken.transfer("<address>", utils.parseEther("1000"));
This is the JS code that doesn't belong to the contract.
Upvotes: 1