Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement UPDATE Event Triggers for escrow_transactions Status Changes #97

Open
14 tasks
sotoJ24 opened this issue Feb 21, 2025 · 7 comments · May be fixed by #103
Open
14 tasks

Implement UPDATE Event Triggers for escrow_transactions Status Changes #97

sotoJ24 opened this issue Feb 21, 2025 · 7 comments · May be fixed by #103

Comments

@sotoJ24
Copy link
Contributor

sotoJ24 commented Feb 21, 2025

Description

Implement Hasura event triggers that fire when the status or refund_status of an escrow_transaction record changes, to ensure proper communication with third-party APIs based on transaction state transitions.

Requirements

  • Create event trigger for UPDATE operations when status field changes
  • Create separate event trigger for UPDATE operations when refund_status field changes
  • Configure triggers to include before/after values in the payload
  • Set up filtering conditions to only trigger on meaningful status transitions

Status Transitions to Monitor

  • PENDING → AWAITING_SIGNATURE
  • AWAITING_SIGNATURE → SIGNED
  • SIGNED → PROCESSING
  • PROCESSING → COMPLETE
  • Any status → FAILED
  • Any status → CANCELLED

Acceptance Criteria

  • Both event triggers successfully fire on appropriate field changes
  • Triggers correctly include previous and new status values
  • Events only fire when the monitored fields actually change
  • Payload includes all contextual information needed for API communication

Technical Implementation Details

  • Use column-specific update triggers in Hasura
  • Include proper payload transformations if needed
  • Document the expected status transition flows

Make sure to follow the Git Guidelines for Atomic Commits and read Contributing Guide

The Pull request needs to have the format mentioned below in the Git Guideline

Hasura Event-Triggers Documentation

https://hasura.io/docs/2.0/event-triggers/overview/

@sotoJ24 sotoJ24 changed the title # Implement UPDATE Event Triggers for escrow_transactions Status Changes Implement UPDATE Event Triggers for escrow_transactions Status Changes Feb 21, 2025
@psychemist
Copy link

Hello SafeTrust maintainers! I am an OnlyDust diamond contributor and I have relevant experience building and testing fullstack web applications. I would like to handle this task by setting up the Hasura event trigger network to update operations when specific attributes change. I will also add unit test suites to ensure proper functionality. I can achieve this in 3 days and am looking forward to contributing to this project!

@Pvsaint
Copy link

Pvsaint commented Feb 22, 2025

Let me try this one!

@Bosun-Josh121
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged:

software engineering background, backend & smart contract dev (https://app.onlydust.com/users/Bosun-Josh121/overview) looking to make first contribution on this project

How I plan on tackling this issue

I have made contribution to similar issue as sighted in (Trustless-Work/Product#44) for instance. I've gone through highlighted docs to implement here as well. I will work on feedback & recommendation ensuring contact. Can deliver within 48hrs upon assignment

@Jagadeeshftw
Copy link
Contributor

Hi, I’d love to take on this issue! With my expertise in Cairo, StarkNet, and smart contract development, I can implement a clean and efficient solution.

🚀 Why Me?

  • Proven Blockchain Experience – Hands-on work with StarkNet, Solidity, and Rust, building secure and optimized smart contracts.
  • Open Source Contributor – Actively contributed to 30+ open-source projects, showcasing adaptability and collaboration.
  • Efficient & Reliable – I deliver high-quality, production-ready solutions quickly, ensuring security and scalability.

Timeline

I estimate completing this within 1 day. Let me know if I can proceed!

🌐 My Profile

Check out my OnlyDust profile for more insights: Jagadeeshftw on OnlyDust

Looking forward to contributing. 🚀

@ekumamatthew
Copy link

Can I attempt this issue?

@Runtee
Copy link

Runtee commented Feb 24, 2025

May I take care of this?

@Villarley
Copy link

I’m Santiago Villarreal Arley, a proactive and communicative developer with a strong background in both front-end and back-end Web3 development. As a proud Diamond Contributor and member of Dojo Coding, I have collaborated on various impactful projects built on StarkNet and Stellar, focusing on creating scalable and efficient blockchain-based solutions.

Notably, I won the Buildathon Web3 Hackathon for my work on BuildMyEvent, an open-source blockchain project designed to solve real-world challenges by integrating innovative and user-centric features.

I would love to tackle this issue!

@Villarley Villarley linked a pull request Mar 4, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants