sciencefund / sf-next-dapp

science fund home page with nextjs frontend and hardhat backend.
1 stars 0 forks source link

typechain and deployment and ability to mint NFT on landing page #14

Closed Amirjab21 closed 2 years ago

Amirjab21 commented 2 years ago

To generate the typings, I had to add some variables to hardhat.config so that we have some type chain configuration.

Then I ran npx hardhat compile. This created the type chain files.

Note, if you want to do this again, you must first run npx hardhat clean to remove the old ones.

Then, I have it working on the hardhat network - I’ve initialised my account to receive 1000000 Ether on hardhat.config and I’ve set my private key for my wallet in the .env file.

This initialises my account on the hardhat network with some Eth, which allows me to mint an NFT.

To start the chain, run npx hardhat node

Then run npx hardhat run —network hardhat tasks/deployment/deploy.ts

You’re now ready to interact with the app.