This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, a sample script that deploys that contract, and an example of a task implementation, which simply lists the available accounts.
Try running some of the following tasks:
npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
node scripts/sample-script.js
npx hardhat help- have metamask installed on your browser
- have setup metamask with your localhost blockchain. You can check how to here. Note chain Id is as in
./hardhat.config.jsand symbol is ETH. - know how to setup localhost account in metamask. Import using private key provided when you run
npx hardhat node.
git clone https://github.com/RyanKoech/Maevents.gitcd Maeventsnpm installnpx hardhat compilenpx hardhat nodeThis steps provides the address of the contract. Copy and paste it in EventTicketingService.js
npx hardhat run scripts/deploy.js --network localhostnpm run startNote that atm, the methods calling the smart contract abi have static parameter meaning you have to modify them in code. Dynamic parameter will be implemented by the frontend team.