Inspiration

The story behind Triggr stems from a desire to make my smart contract (dapp) development lifecycle easily and smoother. I don't like stress and i like seamless. I realized i was doing a lot of indexing or breaking down (Decoding) of events to do. basic things. Also, i couldn't figure how how to make my app update immediately without the inefficiencies of indexing (or polling) sticking it's head out. I wanted an intelligent system that i could just send commands to and tell things to and then immediately it reacts and does stuff in my app.

What it does

Triggr (MVP) is a simple backend (database) that allows you to specify the events you want to react to in real-time and the empowers you to specify exactly how to react when they occur. You do not need to know anything besides the events you want to react to and what you want to do after. Very simple! Right now it is a database, we plan to extend it into a full fledged invaluable backend.

How we built it

Triggr is built using rust and many libraries from Polkadot (and associates) e.g scale-info, substrate-api-client etc. We setup a websocket connection to PassetHub(in a thread) and then listen for events that a dev has specified to react to (through the Triggr console). After the event is emitted, we parse the DSL (triggers ) and understand what the dev said to do (mostly storage modification for now) and then it executes! Simple!

Challenges we ran into

SCALE-decoding multiple contracts events consistently without errors. We have faced issues consistenly scale-decoding multiple contract events with the same algorithm. It is not still perfect yet.

Accomplishments that we're proud of

Wow, we're proud of the abstractions and dev (and user) experience. It took some effort to map out want was important (we wanted it ridiculously simple) and how to present the interface to the developer.

What we learned

We learned a lot about the parity scale codec, we learn a lot about ink!.

What's next for Triggr - A Reactive Backend For Real-Time Dapps

We intent to make Triggr a full backend product, extending it beyond storage modification triggers to include Telegram integrations, frontend hooks etc. Also a major focus is making it truly decentralized by removing it from a centralized infrastructure provider and putting it on a libp2p network (via SwarmNL).

Built With

Share this project:

Updates