跳转到主要内容
本快速入门指南将展示如何配置一个 Successful Transaction 告警,用于对进出某个钱包的成功事务发送通知。

步骤 1:启动 Alerts 设置向导

Alerts landing page
从左侧菜单 点击 Alerts 以启动 Alerts 设置。您可以在此创建新的 Alerts 或管理现有的告警。 要创建新的 Alert, 点击 New Alert 按钮,将打开 Alert 配置设置。
Alert set up wizard
要设置 Successful Transaction 告警或任何其他告警,您需要配置四个组件:
  • Alert Type: 您希望 Alert 监听的事件,事件发生时向您发送通知。Tenderly 支持 12 种 Alert Types
  • Alert Target: 在这里告诉 Tenderly 您希望监控哪些地址。所有 Alert Types 的 Target 选项相同。
  • Alert Parameters: 基于 Target,在此选择您希望监控的具体地址以及与 Alert Type 相关的其他设置。
  • Alert Destinations: 事件发生时您希望接收通知的位置。

步骤 2:选择 Successful Transaction Alert Type

从可用的 Alert Types 列表中, 选择 Successful Transaction 以监控成功事务的发生。
Available Alert trigger types
一些 Alert Types 的含义一目了然,而另一些则更为细致,请参阅 Alert Trigger Types 文档 页面以获取每种类型的详细 说明。

步骤 3:将 Alert Target 设置为 Address

在 Alert Target 部分,您可以告知 Tenderly 您希望监控的地址及其所在位置。 所有 Alert Types 可用的 Target 选项相同,包括:
  • Address: 监控单个智能合约或钱包
  • Network: 监控特定网络上的所有事务
  • Project: 监控您 Tenderly 项目中的所有地址
  • Tag: 监控带有特定标签的所有合约和钱包
在我们的示例中,我们将 选择 Address,因为我们希望监控钱包的一个地址。
Available Alert Targets

步骤 4:将钱包地址设置为 Target Parameter

在 Target 设置为 Address 后,我们需要告诉 Tenderly 要监控哪个钱包地址。Tenderly 会拉取与您项目关联的所有智能合约和钱包,并在下拉列表中显示。
如果您尚未向 Tenderly 项目添加任何智能合约或钱包,请按照这些快捷 指南添加 钱包智能 合约
我们将从下拉列表中选择 Tenderly Wallet 的地址。
List of smart contracts and wallets associated with the project

步骤 5:选择 Email 作为 Alert Destination

为了保持简单,我们希望接收一封邮件通知,告知有关进出 Tenderly Wallet 的成功事务。 选择 Email 作为 Alert Destination,并填写必要的详细信息,包括邮箱地址。如果您添加的是新邮箱地址,则需要确认您是该邮箱的所有者才能在此接收通知。
Setting Email as the Alert Destination
当我们的钱包上发生 Successful Transaction 事件时,Tenderly 将向我们发送邮件通知,其中包含关于该事件的重要信息以及指向 Tenderly Dashboard 的链接以进一步查看。
Email notification from Tenderly
除了 Email 之外,您还可以在喜欢的即时通信应用中接收通知: *点击每个目标的链接了解如何设置。 或将告警数据发送到其他 Tenderly 系统: 或第三方事件和错误监控平台,例如: 配置好 Alert Destination 后, 点击 Save 以创建并启用该 Alert。
同一个 Alert 的通知可以发送到多个 Destination。同样,您也可以让 多个 Alert 将通知发送到同一个 Destination。首次 添加 Destination 后,您以后创建的 Alert 也可以使用它。

步骤 6:管理 Alerts 和 Destinations

所有已部署的 Alerts 都可以从 Rules 视图中进行管理。在您要管理的 Alert 旁,点击三个点以显示更多选项: Enable/DisableDuplicateEditRemove
Managing an existing Alert
如果您在顶部菜单中 点击 History,可以查看您的 Alerts 何时以及被执行了多少次。
History of Alert execution
如果您导航到 Destinations 选项卡,可以管理所有之前创建的 Destination 或创建新的 Destination。 创建 Destination 后,可以从您的所有项目中访问,因此您无需在其他项目中创建相同的 Destination。 例外情况是作为 Alert Destination 的 Web3 Actions。此 Destination 仅在其创建时所在的项目下可见。 如果您 编辑或删除 一个 Destination,更改将应用于您所有的项目和活动规则。
List of created Alert Destinations

总结

在本指南中,您学习了如何设置并配置一个 Successful Transaction 告警,该告警会为进出钱包的所有成功事务发送邮件通知。