[英]ParserError ERC721
I am having trouble with solving this issue.我在解决这个问题时遇到了麻烦。 from solidity: ParserError: Expected '{' but got identifier --> Mint.sol:1443:16: |
来自solidity: ParserError: Expected '{' but got identifier --> Mint.sol:1443:16: | 1443 |
第1443章contract Eight Founding Fathers is ERC721A, Ownable, ReentrancyGuard { |
合同八位开国元勋是ERC721A,可拥有,ReentrancyGuard { | ^^^^^^^^
^^^^^^^^
//below is my code//
line 1443 ignore this//
contract Eight Founding Fathers is ERC721A, Ownable, ReentrancyGuard {
string public baseURI;
uint public price = 0.003 ether;
uint public maxPerTx = 20;
uint public totalFree = 1000;
uint public maxSupply = 1776;
uint256 public maxFreePerWallet = 3;
bool public mintEnabled;
mapping(address => uint256) private _mintedFreeAmount;
constructor() ERC721A("8Bit Founding Fathers","8BFF"){}
Your smart contract name shouldn't have space between words.您的智能合约名称不应在单词之间有空格。 Another issue is that missing a '}' for close
EightFoundingFathers
smart contract.另一个问题是关闭的
EightFoundingFathers
智能合约缺少一个“}”。 I adjusted your smart contract code in this way:我以这种方式调整了您的智能合约代码:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract EightFoundingFathers is ERC721A, Ownable, ReentrancyGuard {
string public baseURI;
uint public price = 0.003 ether;
uint public maxPerTx = 20;
uint public totalFree = 1000;
uint public maxSupply = 1776;
uint256 public maxFreePerWallet = 3;
bool public mintEnabled;
mapping(address => uint256) private _mintedFreeAmount;
constructor() ERC721A("8Bit Founding Fathers","8BFF"){
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.