為了實現更即時的回應,我添加了一個 Tenderly Alert。可惜的是,它無法直接喚醒 GitHub Actions,所以我必須加入一個中間的 Cloudflare Worker。 但後來我想,為什麼不乾脆全面遷移到 Cloudflare Worker 呢?最終的架構是這樣的:一個 Worker 負責提供靜態頁面服務。然後,當有新事務到達時,Tenderly 可以透過 Webhook 來觸發它。 它會將新交易索引到 D1 SQL 資料庫中,並重建一個 JSON 儀表板,然後透過鍵值對將其作為 API 提供給靜態頁面。 我還新增了一個每日定時任務作為備用方案,以防 Webhook 沒有觸發。整個架構非常簡單,運作良好,而且無需維護。 你也可以使用佇列來擴展到更複雜的工作流程。總的來說,我發現 Cloudflare 的基本功能非常容易使用。 對於 Web3 Webhook,我知道的選項有 Tenderly(免費套餐提供 3 個警報)和 Alchemy(免費套餐提供 5 個警報)。
本文為機器翻譯
展示原文

banteg
@banteg
04-01
learned a slightly cursed technique from @wavey0x but the more i thought of it, the more it grew on me.
he made a page to see all yearn/curve vesting escrows and it works really fast. when i asked what he uses to fetch the events so fast, he said that he doesn't fetch them at

來自推特
免責聲明:以上內容僅為作者觀點,不代表Followin的任何立場,不構成與Followin相關的任何投資建議。
喜歡
收藏
評論
分享


