- Solidity (Writing Smart Contract)
- Javascript (React & Testing)
- Web3 (Blockchain Interaction)
- Truffle (Development Framework)
- Ganache (For Local Blockchain)
- Infura.io (For copying the Ethereum mainnet)
- MetaMask (Ethereum Wallet)
- Git/GitHub (Commit our code)
- Fleek (Website Deployment)
- Install NodeJS, Recommended version is 14.16.0
- Install Truffle, In your terminal, you can check to see if you have truffle by running
truffle --version
. To install truffle runnpm i -g truffle
. - Install Ganache.
- Install MetaMask in your browser.
$ npm install
Create a .env file or rename the .env.example file, and update the values. The API & IPFS keys are technically optional for local testing, if you plan to deploy to the testnet or mainnet, you'll need to update those values.
$ truffle migrate --reset
In a separate CMD prompt/terminal run:
$ npm start
$ truffle test
-
Create or log in to your Infura.io account and create a new project, and save your project ID located in your project settings, you'll need this if deploying to Ethereum Mainnet, or Rinkeby Testnet.
-
If deploying to Polygon, you may need to setup the network in MetaMask. To do this, open MetaMask, in the top right click on your profile icon -> Settings -> Networks -> Add Network.
- For Polygon Mainnet fill in the following:
- Network Name: Polygon
- New RPC URL: https://rpc-mainnet.maticvigil.com/
- Chain ID: 137
- Currency Symbol: MATIC
- Block Explorer URL: https://polygonscan.com/
- For the Polygon Mumbai Testnet fill in the following:
- Network Name: Polygon Mumbai
- New RPC URL: https://rpc-mumbai.maticvigil.com/
- Chain ID: 80001
- Currency Symbol: MATIC
- Block Explorer URL: https://mumbai.polygonscan.com/
- For Polygon Mainnet fill in the following:
-
If deploying to Polygon Mainnet, you will need to fund your MetaMask account with MATIC on the polygon chain, How you decide to transfer/fund is entirely upto you. Keep in mind if you have MATIC currently on the Ethereum Mainnet, you will need to bridge your MATIC over to the polygon chain. You can do this by visiting https://wallet.polygon.technology/, also keep in mind you will have to have ETH in your account to cover gas fees!
-
If deploying to Rinkeby testnet, you may use this ETH faucet supplied by chainlink to fund your account: https://faucets.chain.link/rinkeby.
-
If deploying to Polygon Mumbai testnet, you may use this MATIC faucet: https://faucet.polygon.technology/
Create a .env file in the root directory of your project, and fill in the following:
-
DEPLOYER_PRIVATE_KEY="YOUR_PRIVATE_KEY"
-
INFURA_API_KEY="PROJECT_ID"
-
ETHERSCAN_API_KEY="API_TOKEN"
-
PROJECT_NAME="YOUR_PROJECT_NAME"
-
PROJECT_SYMBOL="YOUR_PROJECT_SYMBOL"
-
MINT_COST=0
-
MAX_SUPPLY=1000
-
IPFS_IMAGE_METADATA_CID="IPFS_CID"
-
IPFS_HIDDEN_IMAGE_METADATA_CID="IPFS_CID"
-
NFT_MINT_DATE="Oct 27, 2021 20:00:00"
- For Rinkeby testnet:
truffle migrate --reset --network rinkeby
- For Polygon Mainnet:
truffle migrate --reset --network matic
- For Rinkeby testnet:
truffle run verify JitashPunks --network rinkeby
- For Polygon Mainnet:
truffle run verify JitashPunks --network matic
Input the name of your project, and a description if you wish. You may also choose to make the repository public or private
If you have downloaded this code, you may need to initialize it as a git repository, to do this back in your terminal run:
$ git init
Add files for staging:
$ git add .
This will ready your files for the commit, you may see if they have been added by running:
$ git status
Finally commit your code
$ git commit -m "Deployment Setup"
If you cloned from a repository, go ahead and update the origin link to the repository you created on GitHub by running:
$ git remote set-url origin <YOUR-GITHUB-REPO-LINK>
Otherwise run this command instead:
$ git remote add origin <YOUR-GITHUB-REPO-LINK>
Finally, push the code to the repoository:
$ git push origin master
Easiest option is to sign in with your GitHub account.
Click on Add new site & Connect with GitHub
Configure and select your repo to deploy
For deploy location, select IPFS hosting
On the build options and deploy tab, under the section Basic Build Settings, for framework select Create React App, then click on Deploy site.