This is a modification of the greeter project showcased in the start building dApps on ink! workshop.
- 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.
You can find my DEMO Video Here
Take note of the Fetched Message and Fetched Lock State in each image