Events in daml
How would you write a redeem function for a loyalty points system in a manner that you set the conversion ratio and whenever a user uses his or her points it burns the points in the wallet thus eventually reflecting on the account balance? In java script this is possible through the use of events but am having a hard time to implement the same using daml. Any assistance will be appreciated.
Hi @Bels3 and welcome to the Daml forum 
Can you provide an example of what exactly you’re struggling with? Knowing things like
- The workflow you’d like to implement
- What you’ve implemented so far in Daml
Would help us in answering your question better 
Thnx for posting the workflow @Bels3 
I’d suggest looking into the Daml part of the IOU example in the docs as a starting point. It explains how to issue and transfer tokens.
Also check out our free introduction to Daml course that explains how to create an NFT marketplace with royalty payments.
Sorry, I guess looking at an example code snippet that you’re struggling with might give more information on what’s the starting issue that you’re having with implementing the loyalty rewards system.
That workflow diagram is terrific. What was it created with?
@Bels3 Awesome project to tackle! I’m one of the Developer Advocates at DA and I will be happy to explore this with you.
First off, your scenario is perfect for a Daml implementation! Two: This would probably take more than this forum to do a proper architecture overview, information architecture, etc.
Beyond the architecture and design, you would probably want to start with breakdown the templates that are required in your specific use case, and what data you need, etc. Nemanja has already asked, but what is your familiarity with Daml at this moment?
Hi @Bels3 
Were you able to make progress with the loyalty points system?
Yes I actually made a breakthrough for sure. I appreciate the concern.
Thnx for letting us know @Bels3
Anything you can share here?
