Simple solidity contract start project using hardhat
- Install dependencies:
npm install
npm run build
- Query contract's getSeed()
function once (and console.log the output).
npm run watch
- Watch for changes to the contract and re-compile/deploy if we make changes (Note: changes to build.js will not trigger a re-compile/deploy).
We've defined a very simple ERC-721 contract in /contracts/dungeons.sol
(note: contracts always have to be in this folder w/ hardhat) and added a global variable called seed
. We also added a function called getSeed()
to get the value of said variable.
We tell hardhat to compile and deploy said contract on our local machine via build.js
. We then run a query against it to read the function getSeed()
.