ROBO LABS
  • About us
  • Denotify
    • DeNotify
      • Triggers
      • Notifications
        • Message Formatting
      • Helper Contracts
    • Guides
      • Account Balance Alert
      • Track Crypto Punk NFT Transfers
      • AAVE Health Factor Alert
      • BENQI Health Factor Alert
  • Arkiver
    • Arkiver
      • How It Works
      • Technical Guides
      • Examples
Powered by GitBook
On this page
  • Embedding Links
  • Accessing Variables
  • Calculations in Messages
  • Supported Variables
  1. Denotify
  2. DeNotify
  3. Notifications

Message Formatting

Standard Message Formatting

PreviousNotificationsNextHelper Contracts

Last updated 2 years ago

All Alerts allow the user to configure a custom message. This message has access to variables and infomation associated with the alert.

Embedding Links

Embedding links is simple! Discord uses the same syntax as markdown: [title](link)

[link here!](https://robolabs.biz)

Will display:

Accessing Variables

To access data in the message, use the syntax { variable } . For exmaple, the message:

Alert triggered at block {block}
Event: {event}
Transaction Hash: {txHash}

Would yeild the following message:

Alert triggered at block 102323

Event: StrategyReported

Trasnaction hash:

Calculations in Messages

Denotify supports simple calculations in the string format. For example { block / 1000 } will calculate the block number divided by 1000 and format the result into the message. Currently addition, subtraction, multiplication and division are supported.

Supported Variables

All messages have access to a standard set of variables, and each trigger type has extended variables specific to the trigger. The table below details the standard set of variables

Standard Variables

Variable
Type
Description

block

number

blockchain block associated with the alert

Network

string

String name of the network. For example, ''Avalanche" or "Ethereum"

id

number

ID of the alert

triggered

boolean

true if the alert is set. false if it is cleared.

lastBlock

number

Block number that the alert was last tested

Extended Variables: Poll Function Trigger

Variable
Type
Description

nBlocks

number

Poll period. The frequency the trigger is tested.

address

string

address of the contract

fixedArgs

string[]

Array of fixed arguments configured for the trigger

responseArgIndex

number

index of the arg tested

responseArgDecimals

numner

decimals configured

function

string

function name configured to poll

conditions

string

condition symbol of the test

constant

number

constant used in conditional test

arg_[n]

number / string

arg_0 will return the first return value of the function, arg_1 will be the second, and so on.

Extended Variables: Onchain Event Trigger

Variable
Type
Description

address

string

contract address configured for the trigger

event

string

name of the Event being monitored

paramsIndex

number

index of the events' parameter taking part in the conditional test

paramsDecimals

number

configured decimals for paramsIndex

condition

string

condition symbol of the test

constant

number

constant used in conditional test

blockHash

string

block hash of the event detected

txHash

string

hash of the transaction

args_[n]

string / number

arg_0 will return the first parameter of the event, arg_1 will be the second, and so on.

link here!
0x0785dfcd6a5a9ffdb30e60750a01d144a42306d48004410712476cc62c2d7997