Skip to content

WillDera/Paid-Getter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paid Greeter

This is a modification of the greeter project showcased in the start building dApps on ink! 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

Images

Take note of the Fetched Message and Fetched Lock State in each image

  • Caller paying to set message Screenshot from 2024-03-09 17-44-05
  • Contract picking a winner Screenshot from 2024-03-09 17-45-54
  • Caller unlocking contract before new message can be set Screenshot from 2024-03-09 17-45-54 Screenshot from 2024-03-09 17-47-24

About

Submission for Encode x Polkadot Hackathon

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published