-
Notifications
You must be signed in to change notification settings - Fork 1
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
notify telegram webhook #7
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and works great to me! Gj!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job @technophile-04 !! Working great to me 🙏
Some nitpick/improvement we could tackle in a future PR:
- If grantee registers a github URL without http, for example: "github.com/telegramBot", we need to add an extra check to form the url correctly. Right now the bot would send "https://github.com/github.com/telegramBot"
- It would be awesome to add ENS resolution in the "Builder" field from the bot msg.
Updated both the things, Tysm all merging this 🙌
will create an issue for this 🙌 |
Ohh also forgot to mention, I did some research weather having
Like we want that part of the code to be "fire and forgot" but since we have added Ideally if we would have remove Digging in more I found But while playing around with |
Description:
Went with simpler approach. Exposed an endpoint from bot side which when hit by some server with valid secret (
WEBHOOK_SECRET
) will send notification to configured group.Another approach would be using PostgreSQL's
LISTEN/NOTIFY
where we use ENS-PG postgres DB directly in TG bot and setupLISTEN/NOTIFY
triggers wherever an insert in grant and stage table happens.To test:
In this repo:
Switch to this branch.
Add the following variables in
.env.local
:Setup the dev environment:
Update `Stream.sol` to lower frequency
export const MINIMAL_VOTES_FOR_FINAL_APPROVAL = 1;
chains.hardhat
bot repo:
Follow the README instructions in https://github.com/technophile-04/ens-pg-bot
Testing: