_ _ _
| |__ __ _ _ __ | | _(_) ___
| '_ \ / _` | '_ \| |/ / |/ _ \
| |_) | (_| | | | | <| | __/
|_.__/ \__,_|_| |_|_|\_\_|\___|
Etherlink Pet: Bankie
built chill, by silph <3
Bankie is an on-chain NFT pet you can adopt, feed, and harvest rewards from. Each pet is unique, and you must care for it regularly or risk losing it forever!
- Adopt a Pet: Pay the adoption fee to mint your own Bankie NFT.
- Feed Your Pet: Keep your pet alive by feeding it at least every 2 days.
- Harvest Rewards: After feeding your pet 100 times, you can harvest its "golden egg" (your money back).
- Donation on Death: If you forget to feed your pet for more than 2 days, it "runs away" and any unclaimed funds are donated to the protocol.
Adopt a new Bankie pet by paying the required adoption price. The NFT is minted to the specified address with the given metadata URI.
Feed your pet to keep it alive. You must feed it at least once every 2 days. If you forget, the pet "runs away" and any unclaimed rewards are donated to the protocol.
After feeding your pet 100 times, you can harvest its accumulated rewards.
The contract owner can withdraw accumulated protocol profits (from adoption fees and unclaimed funds).
- Adoption: Pay the adoption fee to mint a new Bankie NFT.
- Care: Feed your pet at least every 2 days to keep it alive.
- Harvest: After 100 feedings, harvest your pet's rewards.
- Neglect: If you fail to feed your pet for 2 days, it "runs away" and any unclaimed funds are donated to the protocol.
npm installnpx hardhat testnpx hardhad node
npx hardhat run test/deploy.ts --network localhostit will print the contract address, mint the first nft and print the owner.
Update your hardhat.config.ts with the correct network and run:
npx hardhat run test/deploy.ts --network <network>contracts/Bankie.sol— Main smart contracttest/Bankie.ts— Hardhat/Chai test suitescripts/deploy.ts— Deployment scriptweb3-dapp- Contains the preact dApp project
Feel free to open issues or PRs to improve Bankie!