Mumbai - Sentinel Notifications Not Firing

@spalladino , I was trying to get a sentinel up and running on the mumbai network. Below the ABI copy/paste window, there is a notification that says:

Defender is not able to process contracts right now

The set up process went smoothly and I did not notice this the first time around, but I have not gotten the sentinel to work properly and I was curious if this was the issue. I only see it when I select the mumbai network during the sentinel setup.

The sentinel DOES trigger the autotask, so it seems like its core functionality is working, but if I try to use the search functionality that shows where the sentinel would be triggered, nothing comes up. Furthermore, I noticed that the slack notification that I set up is not firing either (the test message worked). I tried to also set up email (test message worked), but I did not receive anything for that either.

I am wondering if this notification I mentioned above has anything to do with these problems, or if there is a user error on my part that I need to fix. Thanks.

Hey @Guceri! Based on the discussion from the other thread, is it possible that you have set up your Autotask as a condition, as opposed to a trigger? If so, the Autotask will be invoked by the Sentinel to decide if a set of txs should be a match or no, and your Autotask is supposed to return an object indicating the matched txs. If you are not returning anything, then the Sentinel will consider the txs did not match.

If you just want to execute code when a tx is matched by a sentinel, you want to set up your autotask as a notification, not a condition. You do that in the "edit notifications" section of the sentinel. Make sure to remove it from the "conditions" section as well!

As for the Defender is not able to process contracts right now, this may be an issue with the Mumbai RPC provider. It seems to be working now, but please let us know if that's not the case.

@spalladino you are right. Half my problems seem to have stemmed from having my autotask as a condition and not a trigger. Notifications would not fire, and the path to the transaction data was different as well (as you mentioned on the other thread here )

I now create a new problem though :upside_down_face:

At the end of my autotask I need to send data back to a smart contract. When I had my autotask set up as a condition, I was able to use ethers and fire out a transaction. The basic format of what I did looked like this:

const { ethers } = require("ethers")
const { DefenderRelaySigner, DefenderRelayProvider } = require('defender-relay-client/lib/ethers')
const address = ' '
const ABI = [ ] 

exports.handler = async function(credentials) {
    const provider = new DefenderRelayProvider(credentials)
    const signer = new DefenderRelaySigner(credentials, provider, { speed: 'fast' })
    const contract= new ethers.Contract(address, ABI, signer)
    const txRes = await contract.function(var_1, var_2, var_3)
    return txRes.hash


While I don't get an autotask error (the autotask runs successfully), I do not see a transaction emitted to the smart contract via the autotask. As mentioned, this worked fine when the autotask was a condition (maybe I changed something and the difference between an autotask notification vs condition is not relevant).

I was able to see the following result back from the autotask console which might be helpful? From what I googled, this message is related to AWS-Lambda:

{"message":"Missing required key 'FunctionName' in params","code":"MissingRequiredParameter","time":"2021-07-30T00:22:06.631Z"}

I checked the documentation and there is an alternative way by using:

const { Relayer } = require('defender-relay-client')

exports.handler = async function(credentials) {
    const relayer = new Relayer(credentials)
    // Use relayer for sending txs or querying the network

I don't think the relayer method above is needed, but please correct me if I am wrong so I can pursue that route.

Hey @Guceri, the code you shared should be working fine. Can you confirm if the Autotask is connected to a Relayer? If it is, do you mind sharing your autotask ID (or the full URL to the Autotask) to so we can check out what's happening behind the scenes? Thank you!

@spalladino I sent an email with all the relevant information. Thank you for helping with this matter.

1 Like