https://github.com/willdera/paid-getter
Submission for Encode x Polkadot Hackathon
https://github.com/willdera/paid-getter
Last synced: 4 months ago
JSON representation
Submission for Encode x Polkadot Hackathon
- Host: GitHub
- URL: https://github.com/willdera/paid-getter
- Owner: WillDera
- License: gpl-3.0
- Created: 2024-03-09T16:18:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-09T18:04:09.000Z (over 1 year ago)
- Last Synced: 2025-01-16T02:26:11.339Z (6 months ago)
- Language: TypeScript
- Size: 5.19 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Paid Greeter
This is a modification of the greeter project showcased in the [start building dApps on ink!](https://encodeclub.notion.site/Start-building-dApps-on-ink-a1b0072e07574dc0916ea66658854163) workshop.## Modification
- Callers have to pay a small amount to write a message to the contract
- Contract keeps track of how many messages have been set in the contract or basically how many times the set message endpoint has been called.
- At every 5th interval of messages, the caller wins the total amount of tokens that the contract received from previous callers.
- The next caller or the current caller then has to unlock the contract to set a new message, or else the contract remains locked.## Demo Video
You can find my [DEMO Video Here](https://www.veed.io/view/43212011-22ac-46bc-82a7-36dbf389d541?panel=share)## Images
> Take note of the Fetched Message and Fetched Lock State in each image
- Caller paying to set message

- Contract picking a winner

- Caller unlocking contract before new message can be set

