Skip to content

Conversation

@isSerge
Copy link
Contributor

@isSerge isSerge commented Jul 17, 2025

Summary

Closes #283

Mostly refactoring here:

  • Remove discord, slack and telegram notifiers
  • Remove Notifier trait
  • Introduce PayloadBuilder trait that encapsulates logic to format message and build JSON for a specific channel
  • Introduce AsWebhookComponents trait for TriggerTypeConfig to consolidate all logic to create webhook config, choose payload builder, etc.
  • Fix payload serialization issue described in Re-design Webhook notifier(s) #283

Testing Process

  • add Network configuration
  • add Trigger configuration with Telegram, Discord, Slack or generic Webhook
  • add Monitor configuration (default big USDC transfer will do) and include above triggers
  • run monitor: cargo run

Checklist

  • Add a reference to related issues in the PR description.
  • Add unit tests if applicable.
  • Add integration tests if applicable.
  • Add property-based tests if applicable.
  • Update documentation if applicable.

isSerge added 30 commits July 15, 2025 11:22
…date Webhook tests to use NotificationService for formatting
… methods to accept templates and variables
@codecov
Copy link

codecov bot commented Jul 17, 2025

Codecov Report

❌ Patch coverage is 93.38843% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.2%. Comparing base (b6301aa) to head (fbddb5b).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
src/services/notification/email.rs 69.7% 23 Missing ⚠️
src/services/notification/mod.rs 95.9% 9 Missing ⚠️
src/services/notification/webhook.rs 89.8% 6 Missing ⚠️
src/services/notification/payload_builder.rs 99.2% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #314     +/-   ##
=======================================
- Coverage   96.3%   96.2%   -0.1%     
=======================================
  Files         78      76      -2     
  Lines      25229   24771    -458     
=======================================
- Hits       24308   23847    -461     
- Misses       921     924      +3     
Flag Coverage Δ
integration 59.9% <51.5%> (-1.5%) ⬇️
properties 30.0% <2.3%> (-1.4%) ⬇️
unittests 86.1% <91.9%> (-0.3%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@shahnami shahnami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @isSerge 🥇

The code LGTM, I just need to test it, I'll get it done by EOW.

Copy link
Contributor

@NicoMolinaOZ NicoMolinaOZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
I have tested all channels, working well.

Copy link
Member

@shahnami shahnami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for testing Nico

@shahnami shahnami merged commit e314db4 into OpenZeppelin:main Aug 6, 2025
16 of 17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-design Webhook notifier(s)

3 participants