我正在使用 ERC1155 的智能合约(Open Zeppelin),它在 Remix 中正确编译,但是当我在 Visual Code 中编译时,我收到
ParserError:预期的标识符,得到'LParen'
智能合约可以成功部署到 Rinkeby 测试网。但是,当我尝试在 Etherscan 中验证合约时,它会给我以下消息:
Note: Unable to determine contructor arguments, please check and replace with correct values (6e65746f70656e2e707974686f6e616e7977686572652e636f6d2f7374617469632f6d6574616461646f732f6d6574616461646f7370617261657263313135352e747874)
这是构造函数的代码。
// contracts/AFSE.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
//import "../../utils/introspection/ERC165.sol";
contract AFSE is ERC1155{
mapping (uint256 => mapping(address => uint256)) internal _balances;
mapping (uint256 => mapping(address => uint256)) internal mapof_urihash;
address public creator; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
event CreateToken(address creator, address owner, uint256 _id, uint256 _value,string uri, uint256 _urihash);
constructor () ERC1155("netopen.pythonanywhere.com/static/metadados/metadadosparaerc1155.txt") {
creator=msg.sender;
}
我怎样才能解决这个问题?