To run the demo follow these steps:
-
Clone the github project on the terminal
git clone https://github.com/kumarsidd/dApp-Transaction
. -
Follow this tutorial get your keys together.
-
Open the project in VS Code >> smart_contract >> hardhat.config.js and replace its content with the codes below.
require("@nomiclabs/hardhat-waffle"); module.exports = { solidity: "0.8.0", networks: { sepolia: { url: "<YOUR_ALCHEMY_APP_URL_GOES_HERE>", accounts: ["<YOUR_SEPOLIA_ACCOUNT_PRIVATE_KEY_GOES_HERE>"], }, }, };
-
Open client >> src >> utils >> constants.js and replace the content with yours.
-
import abi from "./Transactions.json"; export const contractAbi = abi.abi; export const contractAddress = "<YOUR_DEPLOYED_SMART_CONTRACT_ADDRESS_GOES_HERE>";
-
On the terminal, CD to the smart_contract directory and run the following code.
yarn install yarn hardhat run scripts/deploy.js --network sepolia
-
On the smart_contract directory goto smart_contract >> artifacts >> contracts >> Transactions.sol >> Transactions.json. Copy the entire code and paste them in client >> src >> utils >> Transactions.json file.
-
On the terminal, CD to the client directory and run the following code.
yarn install yarn dev # spins it up on the browser...
-
Open the browser and visit the url on the terminal.
Questions about running the demo? Open an issue. We're here to help ✌️