FlashCard is blockchain based app for flash card payment like (Gift Cards) which can be redeemed later with a key and card Id.
Note: This is very basic implementation of my idea or in other words its the first concept draft. Will keep improving and adding feature. End goal is to develop a flashcard payment service to pay on-chain without any wallet. Feel free to contribute or suggest any changes.
How it works:
createNewCard()
with parameters amount
and keyHash
(keccak256) of the password user wanna use.cardId
for the card generated.keyHash
swap meaning it will replace the key for next redemption.redeemCard()
or redeemCardTo()
function respectively.Future integrations:
Try running some of the following tasks:
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat node
npx hardhat run scripts/deploy.ts