Hi,
I have managed to deploy my ERC1155 contract successfully using remix.
However when I try to mint the token using for example
account: 0x702874002cAA56b8f66587689eBD36e278f3d9d8
id: 0
amount: 10
data:
Nothing entered for data but I get the same whatever I seem to try.
I am getting the following error
transact to CPTURI.mint errored: Error encoding arguments: Error: invalid arrayify value (argument="value", value="", code=INVALID_ARGUMENT, version=bytes/5.5.0)
Any help with this would be greatly appreciated.
Rob
The code I am using
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
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/ERC1155Supply.sol";
contract CPTURI is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply {
constructor()
ERC1155("https://arweave.net/DLfdGm3lim2THiYnnUVXd983pReLNx-IVa04QLpVibA")
{}
function setURI(string memory newuri) public onlyOwner {
_setURI(newuri);
}
function mint(address account, uint256 id, uint256 amount, bytes memory data)
public
onlyOwner
{
_mint(account, id, amount, data);
}
function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
public
onlyOwner
{
_mintBatch(to, ids, amounts, data);
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
override(ERC1155, ERC1155Supply)
{
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
}
}