Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: solidity编译erc1155,调用mint报错 #10

Open
CyrusLiu158 opened this issue May 19, 2022 · 0 comments
Open

Bug: solidity编译erc1155,调用mint报错 #10

CyrusLiu158 opened this issue May 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@CyrusLiu158
Copy link

Description

// 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 [email protected]
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);
}
}

Is IDE

Yes

Client

Desktop

How to reproduce

执行mint

Actual result

image

Error log

cannot map from map to EVM bytes

Expected result

No response

@CyrusLiu158 CyrusLiu158 added the bug Something isn't working label May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant