-
Notifications
You must be signed in to change notification settings - Fork 224
/
Copy pathNFTContract.sol
35 lines (30 loc) · 1.24 KB
/
NFTContract.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
//import 1155 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/utils/math/SafeMath.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";
// Example contract to be deployed via https://remix.ethereum.org/ for testing purposes.
contract NFTContract is ERC1155, Ownable {
using SafeMath for uint256;
constructor()
ERC1155(
"ipfs://INSERT_YOUR_CID_METAHASH/metadata/{id}.json" // You can get this saved in dasboard of your Moralis server instance.
)
{
// account, token_id, number
_mint(msg.sender, 1, 1, "");
_mint(msg.sender, 2, 1, "");
_mint(msg.sender, 3, 1, "");
}
/*
// More to come here.
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);
}
*/
}