Note: the first three steps are meant to be run on the hardhat project, not on the frontend
Step 1 - Compile contracts into Typechain and export to frontend
# NOTE: In root directory of hardhat project NOT frontend project
npx hardhat typechain
# Import to frontend - Assuming "../badge-app/artificacts" is in frontend code
cp -rf typechain/ ../badge-app/typechain/
Step 2 - ****Run local node
npx hardhat node
Step 3 - Deploy to local node
```bash
npx hardhat run scripts/deploy.ts --network localhost
This should log something like this: Badge deployed to: 0x5FbDB2315678afecb367f032d93F642f64180aa3
Step 4 - Copy and paste contract address logged from step 3 into configs/blockchain.config.js.
Make sure isLocal is set to true
"module.exports = {
isLocal: true,
local : {
url: 'http://localhost:8545',
badgeContractAddress: <INPUT ADDRESS HERE>
},
mumbai: {
url: 'https://polygon-mumbai.infura.io/v3/9c0e4231c73e40da8c90be9e43411cd6',
badgeContractAddress: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512"
},
mainnet: {
url: 'https://polygon-mainnet.infura.io/v3/9c0e4231c73e40da8c90be9e43411cd6',
badgeContractAddress: "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512"
}
}"
Step 5 - Run frontend locally
npx run dev