[英]ParserError ERC721
我在解決這個問題時遇到了麻煩。 來自solidity: ParserError: Expected '{' but got identifier --> Mint.sol:1443:16: | 第1443章合同八位開國元勛是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"){}
您的智能合約名稱不應在單詞之間有空格。 另一個問題是關閉的EightFoundingFathers
智能合約缺少一個“}”。 我以這種方式調整了您的智能合約代碼:
// 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.