" Satyapanik Pramanpatram"
git clone https://github.com/${GitHub Username}/Styaapan.git
Example => git clone https://github.com/PaLangCODE/Styaapan.git
cd Styaapan
cd client
npm install
npm install -D tailwindcss@latest postcss@latest autoprefixer@latest
cd ..
cd CONTRACT
npm install
Create a file in
CONTRACT
folder named as.projectId
This will keep the projectID which we'll get from the RPC provider sites for deployement in polygon testnet.
Paste the Project ID in it.
Get a Test Wallet by the following command
npx hardhat node
Copy any Private Key from a specific wallet.
Open a New Terminal at
Styaapan
Create a file in
CONTRACT
folder named as.secret
Paste the Test Wallet
Private Address
in it.
SetUp the Metamask Test Wallet with the same private address.
Import the account from the wallet private address.
Switch to CONTRACT Directory
cd CONTRACT
Run The Nodes
npx hardhat node
The nodes will start running, now we'll have to switch to a new terminal window
Deploy the Contracts
on the LocalHost
npx hardhat run scripts/deploy.js --network localhost
Copy the NFT CONTRACT ADDRESS
and the NFT TRANSFER ADDRESS
, and paste them in the CONTRACT/config.js
const provider = new ethers.providers.JsonRpcProvider();
CONTRACT/artifacts/contracts/NFT.sol/NFT.json
client/abi/NFT.json
client/abi/NFTTransfer.json
Make sure to download and enable the metamask extension to connect to web3.
npm run dev
Copy the Project Id from the RPC URL Provider and paste it in CONTRACT/hardhat.config.js
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${projectID}`,
accounts: [prvKey]
}
export const rpc_url = `rpcUrl`;
Get some matic tokens by requesting some token from Matic/Polygon Faucet
sites. e.g. https://faucet.polygon.technology/
const prvKey = 'privateKey'
Make sure terminal is under Contract
folder
npx hardhat run scripts/deploy.js --network mumbai
Copy the NFT CONTRACT ADDRESS and the NFT TRANSFER ADDRESS, and paste them in the CONTRACT/config.js
For the Mumbai Testnet
const provider = new ethers.providers.JsonRpcProvider(rpc_url);
CONTRACT/artifacts/contracts/NFT.sol/NFT.json
and replace it with the
client/abi/NFT.json
CONTRACT/artifacts/contracts/NFTTransfer.sol/NFTTransfer.json
and replace it with the
client/abi/NFTTransfer.json
npm run dev