Author: Elson Tan
yarn install
yarn serve
yarn build
yarn lint
This will generate artifacts abi needed for your web app
npx hardhat compile
-
Start a Hardhat Node
npx hardhat node
-
Open a new terminal and deploy smart contract in the
localhost
networknpx hardhat run --network localhost scripts/deploy.js
-
Step (2) will output your contract address to be placed in
App.vue
mounted
when initiaing the contract.const contract = new ethers.Contract( '0x5FbDB2315678afecb367f032d93F642f64180aa3', // change this when deploy new contract ContractAbi.abi, signer )
-
When you started a Hardhat Node you will have 10 Accounts created each with 1000 ETH, you can import to your MetaMask by adding the private keys (ensure you have added the localhost to your MetaMask network first)
RPC URL: http://localhost:8545 ChainId 31337