Skip to content

Commit 36a1c6c

Browse files
nhussein110xLuccaeshaben
committed
Add "Deploy a NFT" with remix tutorial (#340)
* fix: boiler plate added * add: wip * fix: complete tutorial finished + images * fix: adding link to OZ * fix: moving smart contract to code snippet * fix: wording * fix: adding tip to mention oz contracts wizards * fix: wording * Apply suggestions from code review Co-authored-by: 0xLucca <95830307+0xLucca@users.noreply.github.com> * fix: feedback * Apply suggestions from code review Co-authored-by: 0xLucca <95830307+0xLucca@users.noreply.github.com> * fix: wording * Apply suggestions from code review Co-authored-by: Erin Shaben <eshaben@icloud.com> * Update tutorials/smart-contracts/deploy-nft.md Co-authored-by: Erin Shaben <eshaben@icloud.com> * fix: bold list items * fix: wording * fix: wording --------- Co-authored-by: 0xLucca <95830307+0xLucca@users.noreply.github.com> Co-authored-by: Erin Shaben <eshaben@icloud.com>
1 parent 39e293c commit 36a1c6c

File tree

20 files changed

+168
-0
lines changed

20 files changed

+168
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// SPDX-License-Identifier: MIT
2+
// Compatible with OpenZeppelin Contracts ^5.0.0
3+
pragma solidity ^0.8.22;
4+
5+
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
6+
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
7+
8+
contract MyToken is ERC721, Ownable {
9+
uint256 private _nextTokenId;
10+
11+
constructor(address initialOwner)
12+
ERC721("MyToken", "MTK")
13+
Ownable(initialOwner)
14+
{}
15+
16+
function safeMint(address to) public onlyOwner {
17+
uint256 tokenId = _nextTokenId++;
18+
_safeMint(to, tokenId);
19+
}
20+
}
73.6 KB
Loading
131 KB
Loading
138 KB
Loading
139 KB
Loading
22.5 KB
Loading
132 KB
Loading
72.6 KB
Loading
102 KB
Loading
117 KB
Loading

0 commit comments

Comments
 (0)