0

我想在https://testnet.bscscan.com/网站上注册我自己的令牌,但是当我在“在下面输入 Solidity 合约代码 *”部分中编写代码时,我收到了这个错误:

Error! Invalid constructor arguments provided. Please verify that they are in ABI-encoded format

这是我写的代码:

pragma solidity ^0.8.0;

//import ERC1155 token contract from Openzeppelin

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";

contract NFTContract is ERC1155, Ownable
{
    uint256 public constant PHOTO = 0;
    
    constructor () ERC1155("https://cduzxer7w1mf.moralishost.com/{id}.json")
    {
        _mint(msg.sender, PHOTO, 1, "");
    }
    
    function mint(address account, uint256 id, uint256 amount) public onlyOwner
    {
        _mint(account, id, amount, "");
    }
    
    function burn(address account, uint256 id, uint256 amount) public
    {
        require(msg.sender == account);
        _burn(account, id, amount);
    }
}
4

0 回答 0