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

去中心化金融社区2022-03-31 tarihinde yayınlandı2022-03-31 tarihinde güncellendi

Özet

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

İlgili Okumalar

Why P2P and Exchangers Are Becoming Obsolete, and What Will Replace Them

Titled "Why P2P and Exchanges Are Becoming Obsolete, and What Will Replace Them," this article discusses the evolution of stablecoins, particularly USDT, from a trading tool to a global payment method. However, converting crypto back to fiat for daily expenses remains a challenge. The process of using P2P platforms or crypto exchanges has become increasingly risky and complex due to stricter banking anti-fraud measures, new legislation in Russia, and rampant fraud schemes like "triangles," where sellers can inadvertently receive stolen funds. The article highlights that while P2P was convenient, banks now scrutinize frequent peer-to-peer transfers, often freezing accounts. Exchanges also pose risks like unfavorable rates and unclear compliance. The market is therefore shifting towards integrated services that eliminate the manual conversion step. It cites OneSix as an example—a crypto wallet accessible via Telegram and web that embeds currency conversion directly into payment and withdrawal scenarios. Users can pay bills or send money as if using a bank app, with the crypto-to-fiat exchange happening seamlessly in the background. It also offers invoicing for freelancers and conducts AML checks, returning suspicious transactions instantly instead of freezing them. In conclusion, as crypto integrates into everyday finance, the demand for manual, risky exchange methods is declining. The future lies in unified platforms that combine storage, compliance, conversion, and payments into a single, secure user experience.

cryptonews.ru18 dk önce

Why P2P and Exchangers Are Becoming Obsolete, and What Will Replace Them

cryptonews.ru18 dk önce

The CEO of MARA Holdings Compares AI Operations to Bitcoin Mining! Which is More Profitable?

Fred Thiel, CEO of MARA Holdings (a major Bitcoin mining company), states that the rapid growth of the artificial intelligence (AI) sector is transforming mining companies' business models. He claims that powering data centers for AI is significantly more profitable than Bitcoin mining. In a recent interview, Thiel explained why many mining firms are diversifying into AI infrastructure. According to Thiel, the energy demands of data centers are surging, especially due to the spread of generative AI applications. This creates new revenue opportunities for Bitcoin mining companies with robust power infrastructure. MARA Holdings is among those monitoring this shift and aims to develop its energy and infrastructure services for AI data centers. Thiel emphasized that this move toward AI does not mean the end of Bitcoin mining. He stated that Bitcoin mining remains a sustainable business model, especially for miners in regions with low electricity costs, and it is still a crucial field for utilizing excess or idle power capacity. In recent years, many Bitcoin mining companies have begun using their energy-intensive infrastructure not just for block production but also for high-performance computing (HPC) and AI applications. This strategy aims to diversify revenue sources and increase resilience against cryptocurrency market volatility. Analysts note that the growing energy demand in the AI sector presents significant transformation opportunities for mining companies. The need for high-power, uninterrupted electricity supply, particularly for large data centers, gives Bitcoin miners with existing energy infrastructure expertise a considerable advantage.

cryptonews.ru29 dk önce

The CEO of MARA Holdings Compares AI Operations to Bitcoin Mining! Which is More Profitable?

cryptonews.ru29 dk önce

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.ru48 dk önce

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

cryptonews.ru48 dk önce

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.

marsbit58 dk önce

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

marsbit58 dk önce

İşlemler

Spot
活动图片