Skip to content
Discussions/App Development/Events in damlForum ↗

Events in daml

App Development9 posts327 views1 likesLast activity Dec 2021
BE
Bels3OP
Nov 2021

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.

NE
nemanja
Nov 2021

Hi @Bels3 and welcome to the Daml forum :wave:

Can you provide an example of what exactly you’re struggling with? Knowing things like

  1. The workflow you’d like to implement
  2. What you’ve implemented so far in Daml

Would help us in answering your question better :grinning:

BE
Bels3
Nov 2021

attached is the work flow.
I am thinking on how to implement the functionality of earning and redeeming points using Daml. I recently started learning Daml and it’s been quite an experience. I need guidance on the best way to implement it.

NE
nemanja
Nov 2021

Thnx for posting the workflow @Bels3 :slight_smile:

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.

QU
quidagis
Nov 2021

That workflow diagram is terrific. What was it created with?

ST
SteveSeow
Nov 2021

@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?

NE
nemanja
Dec 2021

Hi @Bels3 :wave:

Were you able to make progress with the loyalty points system?

BE
Bels3
Dec 2021

Yes I actually made a breakthrough for sure. I appreciate the concern.

NE
nemanja
Dec 2021

Thnx for letting us know @Bels3 :slight_smile: Anything you can share here?

← Back to Discussions