solidity部署erc1155合约,执行mint,报错cannot map from map to EVM bytes
CyrusLiu158 opened this issue · comments
Brief of the issue
solidity部署erc1155合约,执行mint,报错:cannot map from map to EVM bytes
Your environment
XuperIDE, docker本地环境,3.10.0
Repo steps
合约代码:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
/// @Custom:security-contact dev@yfbudong.com
contract Atun is ERC1155, Ownable, Pausable, ERC1155Burnable, ERC1155Supply {
constructor() ERC1155("") {}
function setURI(string memory newuri) public onlyOwner {
_setURI(newuri);
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
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);
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
}
}
Expected behaviours
希望执行mint操作
What actually happened
报错信息cannot map from map to EVM bytes
data 应该传bytes吧, 可以在本地搭建一条开源版本链测试,更方便一些。