使用Tenderly为区块链交易设置警报通知

去中心化金融社区Опубліковано о 2022-03-31Востаннє оновлено о 2022-03-31

Анотація

Tenderly有内置的定制警报,即使是新手用户也可以在多个链上事件创建警报。

“Tenderly有内置的定制警报,即使是新手用户也可以在多个链上事件创建警报。”

现在让我们先来看看除了以太坊主网之外,我们还可以使用哪些网络:

Tenderly支持的网络

登录项目后,我们将探索位于Tenderly仪表板侧边栏的“监控->警报”服务:

登录后左侧边栏

有一个免费使用的警告,当我们打开警报页面时将显示:

我们将收到一批在15分钟内发生的警报。升级到TenderlyPro/Dev以接收实时警报。

对于测试来说,这不是一个问题,所以我们可以继续使用免费版本。为了更可靠地使用警报,我们必须升级我们的帐户。

让我们从检查创建新警报时可以完成的事情开始。

创建警报

警报类型是我们为触发通知的链事件设置的条件:

所有的警报类型

“警报目标”指的是为上述事件和条件进行监控的合约:

所有警报目标

警报目的地是当上述合约满足警报条件时将收到通知的地点:

所有警报的目的地

在创建一个新的警报之前,我们必须首先:

决定我们希望被通知哪个合约的哪些事件。

在“Contracts”选项卡中添加我们想要监控的合约,这样我们就可以在步骤2中将它作为目标。

连接将接收消息的目的地(在本指南中我们将使用电报),因此我们将能够在步骤3中向它发送通知。

将Telegram添加为目的地

在警报标签中,点击顶部菜单中的“目的地”,点击“Telegram”:

添加电报为目的地

标记它,并按照说明,让机器人发送消息给我们:

按照指示,让机器人向我们发送消息

要完成上述过程,复制指令第三步中的“魔法字”。将它粘贴到与Tenderly的电报机器人聊天中,点击@TenderlyRobot即可打开聊天。

机器人现在可以在此聊天中发送消息的确认消息!

监控YearnVault存款/取款

让我们从监控Fantom网络上的SPELLyVault上的一些事件开始。我们需要知道SPELLyVault合约地址,我们可以通过进入YearnVaults界面,点击SPELLvault找到它。

Fantom上的YearnVaults

单击它后,我们将看到包含所有金库详细信息的页面,单击“区块浏览器”按钮,就会进入金库的合约:

SPELLyVault详细信息

这将打开FTMScan(Etherscan的Fantom分叉)上的SPELLyVault合约:

在FTMScan上的SPELLyVault合约

我按顺序突出显示了用例的重要信息:

首先是合约地址

然后是“代币名称”(当打开许多合约选项卡时会有所帮助)

最后是合约执行的方法(函数)的历史

对于我们的示例,我们将在有人将代币存入Vault时添加通知。为此,需要复制合约页面URL:

https://ftmscan.com/address/0xD3c19eB022CAC706c898D60d756bf1535d605e1d

然后进入Tenderly的合约标签,点击将该合约导入到他们的仪表盘中,这将使我们能够为其创建警报:

在Tenderly中导入合约

粘贴该地址,选择“VyperContract”(名称如下所示,YearnVaults使用Vyper编程语言)。当它出现时,点击“导入”:

在Tenderly中导入合约

导入合约后,我们就可以为它创建警报了!

在Tenderly中导入合约

让我们创建一个警报:

创建新警报

我们希望每次有人存入SPELLyVault时都会收到通知。为此,我们将检查yVault合约中存在的“存款”方法。“方法”是一个类似于“函数调用”的名称,所以这是我们将在本例中使用的警报类型。

选择警报类型

目标是一个地址:

选择警报目标

我们可以选择之前添加的合约,然后选择其中存在的任何函数。许多函数可能有类似的名称,以“_”开头的函数通常是私有的内部函数,不是我们要寻找的函数。

在本例中,我们有_deposit(私有:供内部使用)和deposit(公共:供外部用户使用)。我们将选择一个公共的:

选择警报目标

最后,选择之前设置的电报目的地并保存警报:

选择警报目的地

警报已被创建,每当有人将SPELL存入该yVault时,我都会收到一条消息!

警报成功创建!

以下是我在设置这个示例并触发它后所得到的通知示例,我在交易确认后立即收到通知!

FantomyVault的新SPELL存款通知已发送至我的电报!

总结

这个Yearn示例展示了一种监控合约函数调用的简单方法。如果探索警报系统的所有选项,我们会发现可以更容易地调整到许多不同的用法,例如:

NFT的开发者可以监控他们的合约何时调用了一个新代币的铸造,并在Discord上自动宣布它。

监控Tokenomics流程的人可以使用通知来关注钱包余额和合约行为,看看开发者是否在做预期要做的事情。

我们可以看到任何一种链上活动,并得到它的通知。

Source:https://medium.com/iearn/setup-notifications-for-blockchain-transactions-with-tenderly-407a3df6e1ba

Пов'язані матеріали

Ratio's CEO Says Multi-Currency Stablecoins Could Eliminate Costly FX Conversions in Asia

The CEO of Ratio, John Cho, argues that multi-currency stablecoins could save Asia billions by eliminating costly foreign exchange conversions in regional trade. While USD stablecoins like USDT and USDC work for global settlements, local Asian trade is conducted in local currencies like the Korean won or Singapore dollar. Forcing these transactions through USD intermediaries creates unnecessary costs and currency risk. Cho envisions a complementary ecosystem where local-currency stablecoins work alongside USD stablecoins, enabling seamless cross-border settlements without conversion friction. A key pain point in traditional banking is the need for pre-funded Nostro and Vostro accounts, which lock up vast amounts of working capital. Blockchain-based settlement layers like Ratio offer a 24/7 alternative, using on-chain liquidity to enable instant execution even when traditional channels are closed. Modern Web3 infrastructure providers are focusing on pragmatic integration with existing corporate systems like ERPs, allowing businesses to gradually shift volumes to digital channels for better speed, cost, and reduced slippage. Clear regulation is cited as the critical catalyst for widespread institutional adoption. As jurisdictions like the U.S. advance legislation (e.g., the CLARITY Act) and Asian countries are expected to pass their own stablecoin laws within 12-24 months, regulatory uncertainty is receding. The ultimate vision is for regulated stablecoins to become an invisible settlement layer integrated into national payment systems, where payments simply happen on-chain, erasing the boundary between traditional banking and digital assets.

cryptonews.ru8 хв тому

Ratio's CEO Says Multi-Currency Stablecoins Could Eliminate Costly FX Conversions in Asia

cryptonews.ru8 хв тому

Huang Xiaoming, Li Bin, Lei Jun, Liang Wenfeng... Who Are the Biggest Winners in the CXMT IPO Feast?

Changxin Technology, a leading Chinese memory chip manufacturer, successfully listed on the Shanghai Stock Exchange's STAR Market (科创板) on July 8, 2026. Its share price surged from the IPO price of 8.66 yuan to close at 49 yuan on the first day, catapulting its market capitalization to 3.28 trillion yuan, making it the most valuable A-share company and triggering a massive wealth creation event. The biggest winners were the company's founder, Zhu Yiming, and its employees. Zhu Yiming's family wealth skyrocketed nearly 300% to approximately $13.9 billion, with his direct stake in Changxin valued at around 80 billion yuan. Additionally, over 6700 employees benefited from stock ownership plans, creating at least 237 new millionaires (in CNY). Zhu also pledged to donate 768 million shares, worth over 37.6 billion yuan, for future employee incentives over a ten-year period. Several prominent investors and corporate clients also reaped significant paper gains from the IPO. Notable figures include: * **Liang Wenfeng**, founder of DeepSeek, whose funds netted a paper profit of approximately 827 million yuan. * **Kong Jianping**, founder of Nano Labs, saw his indirect holdings valued at roughly 940 million yuan. * **Li Bin**, founder of Nio, whose company's strategic investment of 158 million yuan is now worth about 740 million yuan. * **Lei Jun**, founder of Xiaomi, whose subsidiary holds shares currently showing a paper gain of over 736 million yuan. Xiaomi clarified this is a corporate investment, not direct personal wealth. The article notes that while this IPO created immense wealth for insiders and large investors, retail investors who were lucky enough to win an allotment in the lottery typically profited by around 20,000 yuan. The listing solidifies Changxin's position as China's premier domestic memory chipmaker.

marsbit19 хв тому

Huang Xiaoming, Li Bin, Lei Jun, Liang Wenfeng... Who Are the Biggest Winners in the CXMT IPO Feast?

marsbit19 хв тому

IOSG: From Hot Storage to Cold Memory – Decentralized Storage in the AI Era's Storage Boom

This article explores the stark contrast between the booming AI storage sector and the currently undervalued decentralized storage market. It argues their core value propositions differ fundamentally: AI storage is a "hot data efficiency" system designed to maximize computational throughput, GPU utilization, and business monetization by accelerating data flow into processors. In contrast, decentralized storage represents a "cold data trust" system, prioritizing data immutability, censorship resistance, and the preservation of long-term human memory. The analysis details the multi-layered AI storage architecture, from high-bandwidth memory (HBM) and enterprise SSDs for high-performance needs to data lakes for capacity. It highlights how AI has repositioned storage from a cost center to a critical efficiency engine. Decentralized storage, exemplified by Filecoin and Arweave, is examined for its distinct philosophies and current challenges, including product-market fit, retrieval latency, and enterprise adoption hurdles. Despite its current quiet phase, the article posits that decentralized storage holds unique future value for AI data provenance, public dataset archiving, compliance, and safeguarding civilizational records against censorship. The conclusion suggests that while the market currently rewards efficiency, the need for trusted, permanent data layers may eventually lead to a revaluation of decentralized storage's role.

marsbit23 хв тому

IOSG: From Hot Storage to Cold Memory – Decentralized Storage in the AI Era's Storage Boom

marsbit23 хв тому

Exploring ChangXin Technology's Hefei Headquarters: The Rising Campus Ignites Changgang CBD, Grassroots Employees 'Witness' Wealth Creation Myth

"On-the-Ground Visit to CXMT's Hefei Headquarters: Campus Boom Ignites Changgang 'CBD,' While Rank-and-File Employees Watch Wealth Creation Myth from the Sidelines." Following CXMT's (ChangXin Memory Technologies Inc., 688825.SH) explosive stock market debut on July 27, where its share price surged over fivefold, a site visit to its Hefei headquarters reveals a stark contrast. While the company's市值 soared, making it A-share's most valuable firm,基层员工 indicate the wealth creation has largely bypassed them. Employees reveal that股权激励 is restricted to managerial levels (Grade 9科长 and above), with most普通员工 at Grades 11 or 12. Salaries, while considered high for Hefei at around 200,000 RMB annually, fall short of the millions speculated online. Work routines remain demanding, with long hours, phone confiscation in sensitive areas, and strict保密 protocols forbidding unauthorized external communication. Simultaneously, CXMT's expansion is visibly transforming the once-rural Changgang area. Ongoing construction includes multiple new phases, with an industrial chain of supporting companies集聚 around the campus. This growth has spurred local development: housing prices initially skyrocketed, and a vibrant commercial district dubbed "Changgang CBD" now thrives, catering to the潮汐效应 of shift workers. The area has evolved from construction sites to a bustling hub, though the company's stringent安保, including high-voltage perimeter fencing, underscores its sensitive nature. The report concludes that while CXMT's rise fuels regional economic activity, the immediate financial rewards of its上市 are not shared by its frontline workforce.

marsbit24 хв тому

Exploring ChangXin Technology's Hefei Headquarters: The Rising Campus Ignites Changgang CBD, Grassroots Employees 'Witness' Wealth Creation Myth

marsbit24 хв тому

Huang Xiaoming, Li Bin, Lei Jun, Liang Wenfeng... Changxin IPO Feast, Who's the Biggest Winner?

Changxin Technology's IPO on the Shanghai STAR Market created significant wealth for its stakeholders. Founder Zhu Yiming and his family saw their wealth surge nearly 300%, with his stake in Changxin alone valued at approximately 80 billion RMB. Over 6700 employees benefited, creating at least 237 new millionaires. Several prominent figures also profited. Liang Wenfeng, founder of Deepseek, saw a paper gain of 827 million RMB through his funds' participation. Kong Jianping, founder of Nano Labs, holds an indirect stake worth around 940 million RMB, representing a roughly 44x return on his 2020 investment. Former Midea executive Huang Xiaoming gained approximately 503 million RMB. Strategic investors included industry partners. Nio, represented by founder William Li, pledged 158 million RMB for shares now showing a paper gain of about 740 million RMB. Similarly, a Xiaomi subsidiary acquired shares resulting in an over 736 million RMB gain, though the company clarified this is a corporate investment, not directly attributable to founder Lei Jun's personal wealth. Founder Zhu Yiming further plans to donate shares worth over 37.6 billion RMB for future employee incentives. The IPO solidified Changxin's position as a leading domestic memory chip maker, triggering a widespread wealth creation event for its network of founders, employees, and investors.

Odaily星球日报39 хв тому

Huang Xiaoming, Li Bin, Lei Jun, Liang Wenfeng... Changxin IPO Feast, Who's the Biggest Winner?

Odaily星球日报39 хв тому

Торгівля

Спот
活动图片