Parsererror ERC721

发布于 2025-02-12 21:27:27 字数 690 浏览 0 评论 0原文

我在解决这个问题时遇到了麻烦。 从坚固性: ParserError:预期'{'但有识别符 - > Mint.Sol:1443:16: | 1443 |合同八个开国元勋是ERC721A | ^^^^^^^^

//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"){}

I am having trouble with solving this issue.
from solidity:
ParserError: Expected '{' but got identifier
--> Mint.sol:1443:16:
|
1443 | contract Eight Founding Fathers is ERC721A, Ownable, 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"){}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£冰雨忧蓝° 2025-02-19 21:27:27

您的智能合同名称不应在单词之间有空间。另一个问题是,对于八FUNDINGINGFATHERS智能合约缺少A'}'。
我以这种方式调整了您的智能合同代码:

// 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"){

  }
}

Your smart contract name shouldn't have space between words. Another issue is that missing a '}' for close EightFoundingFathers smart contract.
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"){

  }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文