Skip to content

Instantly share code, notes, and snippets.

View FreeMintToken.sol
// SPDX-License-Identifier: MIT
// Made by @Web3Club
pragma solidity ^0.8.4;
import "erc721a/contracts/ERC721A.sol";
contract FreeMintToken is ERC721A {
uint256 public constant USER_LIMIT = 10;
View MyToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.1/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts@4.7.1/access/Ownable.sol";
import "@openzeppelin/contracts@4.7.1/utils/Counters.sol";
contract MyToken is ERC721, Ownable {
using Counters for Counters.Counter;
@shobhitic
shobhitic / ERC721r.sol
Last active Jul 17, 2022
Mint random NFTs from a smart contract - https://www.youtube.com/watch?v=WV2cTebHQi8
View ERC721r.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
@shobhitic
shobhitic / Soulbound.sol
Last active Aug 3, 2022
Soulbound or Account bound non transferable NFT - https://youtu.be/90vWC4Z8aPo
View Soulbound.sol
// Try using this as URI ipfs://bafkreic6ov4qo4ucd4g4uuyve4h72nc4y2lg7ugtq3n3vxnfp3lojvtmdu
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.0/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts@4.7.0/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts@4.7.0/access/Ownable.sol";
import "@openzeppelin/contracts@4.7.0/utils/Counters.sol";
View BASENFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "erc721a/contracts/ERC721A.sol";
contract BASENFT is ERC721A {
constructor() ERC721A("BASE URI NFT", "BUN") {}
function mint(uint256 quantity) external payable {
// `_mint`'s second argument now takes in a `quantity`, not a `tokenId`.
@shobhitic
shobhitic / MyNFT.sol
Last active Jul 27, 2022
Bulk Upload NFTs to Opensea and other marketplaces through blockchain - https://www.youtube.com/watch?v=wxynC7aL5k8
View MyNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "erc721a/contracts/ERC721A.sol";
contract MyNFT is ERC721A {
constructor() ERC721A("MyNFT", "MNFT") {}
function mint(uint256 quantity) external payable {
// `_mint`'s second argument now takes in a `quantity`, not a `tokenId`.
@shobhitic
shobhitic / ABToken.sol
Last active Jul 11, 2022
Soulbound tokens or Account Bound Tokens - https://youtu.be/_6Zt70PZbAs
View ABToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./EIP4973.sol";
contract ABT is ERC4973 {
address public owner;
uint256 public count = 0;
constructor () ERC4973("MyToken", "MTK") {
View FractionalizedNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.6.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.6.0/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts@4.6.0/access/Ownable.sol";
import "@openzeppelin/contracts@4.6.0/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts@4.6.0/token/ERC721/utils/ERC721Holder.sol";
contract FractionalizedNFT is ERC20, Ownable, ERC20Permit, ERC721Holder {
@shobhitic
shobhitic / MyNFT.sol
Last active Jul 11, 2022
Simple NFT Staking Smart Contract - https://youtu.be/m0w6JyqJKks
View MyNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.6.0/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts@4.6.0/access/Ownable.sol";
contract MyNFT is ERC721, Ownable {
uint256 public totalSupply;
constructor() ERC721("MyNFT", "MNFT") {}
@shobhitic
shobhitic / MyToken.sol
Last active May 26, 2022
Upgradeable NFT Smart Contract - UUPS Proxy https://www.youtube.com/watch?v=tIHrNhr_OOQ
View MyToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
contract MyToken is Initializable, ERC721Upgradeable, OwnableUpgradeable, UUPSUpgradeable {