Skip to content

Instantly share code, notes, and snippets.

@nhancv
Created October 16, 2021 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhancv/84f9372708e04b46d569c0e2e03b09fc to your computer and use it in GitHub Desktop.
Save nhancv/84f9372708e04b46d569c0e2e03b09fc to your computer and use it in GitHub Desktop.
MockERC1155
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
contract MockERC1155 is ERC1155 {
constructor() public ERC1155("https://nhancv.com/{id}.json") {
mint(msg.sender, 0, 1);
}
function mint(
address account,
uint256 id,
uint256 amount
) public {
_mint(account, id, amount, "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment