This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Import ethers package and destructure ethers object | |
*/ | |
import { ethers } from "ethers"; | |
import type { NextPage } from "next"; | |
import Head from "next/head"; | |
import { useState, useCallback, useEffect } from "react"; | |
import styles from "../styles/Home.module.css"; | |
import MintingContract from "../MintingContract.json"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* We require the Hardhat Runtime Environment explicitly here. This is optional | |
* but useful for running the script in a standalone fashion through `node <script>`. | |
* | |
* When running the script with `npx hardhat run <script>` you'll find the Hardhat | |
* Runtime Environment's members available in the global scope. | |
* | |
* Check: https://hardhat.org/guides/scripts.html#standalone-scripts-using-hardhat-as-a-library | |
*/ | |
const hre = require("hardhat"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* importing secrets file that contains secret keys | |
*/ | |
const secret = require('./secrets.json'); | |
require("@nomiclabs/hardhat-waffle"); | |
/** | |
* This is a sample Hardhat task. To learn how to create your own go to | |
* https://hardhat.org/guides/create-task.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* We require the Hardhat Runtime Environment explicitly here. This is optional | |
* but useful for running the script in a standalone fashion through `node <script>`. | |
* | |
* When running the script with `npx hardhat run <script>` you'll find the Hardhat | |
* Runtime Environment's members available in the global scope. | |
* | |
* Check: https://hardhat.org/guides/scripts.html#standalone-scripts-using-hardhat-as-a-library | |
*/ | |
const hre = require("hardhat"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "hardhat/console.sol"; | |
contract MintingContract is ERC721URIStorage { | |
/* | |
State variable tokenCount is used as unique identifier to generate unique number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { NextApiRequest, NextApiResponse } from "next"; | |
/** | |
* | |
* @param req | |
* @param res | |
* | |
* This endpoint will return success response with an object that complies | |
* with OpenSea NFT standard. The object contains an image link to a giphy | |
* and the name of the asset. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { NextPage } from "next"; | |
import Head from "next/head"; | |
import { useState, useCallback, useEffect } from "react"; | |
import styles from "../styles/Home.module.css"; | |
const Home: NextPage = () => { | |
/** | |
* comments state will be used as console log | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* We require the Hardhat Runtime Environment explicitly here. This is optional | |
* but useful for running the script in a standalone fashion through `node <script>`. | |
* | |
* When running the script with `npx hardhat run <script>` you'll find the Hardhat | |
* Runtime Environment's members available in the global scope. | |
* | |
* Check: https://hardhat.org/guides/scripts.html#standalone-scripts-using-hardhat-as-a-library | |
*/ | |
const hre = require("hardhat"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Since your contract code will be publicly available, this line | |
will let the readers know if you are cool with letting them use | |
your code. I have seen UNLICENSED and MIT so far. | |
*/ | |
// SPDX-License-Identifier: UNLICENSED | |
/* | |
This line is important to let solidity know which version of the | |
language would this contract run on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {FunctionComponent} from 'react'; | |
import {DevSettings, Alert} from 'react-native'; | |
import {enableScreens} from 'react-native-screens'; | |
import {NavigationContainer} from '@react-navigation/native'; | |
import {SafeAreaProvider} from 'react-native-safe-area-context'; | |
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; | |
import {useFocusEffect} from '@react-navigation/native'; | |
import {CenteredView} from './components'; |
NewerOlder