Will the signature contain the actual variable or just the keccak of the event function?
I was expecting to be able to get the parameters from the emit event I would be monitoring
like my sentinel is send on SomeEvent(uint256,address,address,uint256,address,uint256)
So I’m looking to extract the params, the uints, and the 3 addresses.
Will I get each of these somehow in any fields of the Event Schema?
Also just to confirm, I will get 1 execution per event that matched, even if there was 20 in the block, I would get 20 invocations of my relayer, right?
The event “matchReasons” will contain the signature of the specific rule that matched. At this time, the “transaction” field has all the information that was used to evaluate (TX properties & logs) but would have to be parsed to extract the values for the specific functions.
We currently only evaluate whether the rule matched, but don’t include the parameter values there. I think this makes sense to add. Of course non-indexed parameters would not be retrievable - or would end up being the one-way hash value. Would it work if we put a ‘params’ value on the reason object?
Let us know if you have any questions. I’d be happy to jump on a call and help you set this up.
That would be super efficient, because I was about to switch to my own infura parser because of this issue since the txHash didn’t help me much even by getting it through web3js getTransaction().
As long as you give me something to work with that I can parse without additional call I’m good with it!
I wanted to let you know that we just released this feature. You’ll see an example in our docs. We now send two additional properties to each “match reason”: args & params.
Args is an array of all parameters (in the order of the signature).
Params is a map by name of parameter.
Notes:
In the scenario where you have an unnamed parameter, it will only appear in the args array.
If it’s an indexed parameter, we will only return the hash value
Parameters are now passed to the notifications
Thanks for the feature suggestion! Let us know if you see anything that can be improved.
We hit an issue with our Documentation CI so the updates are not yet showing . While we fix that, this is the updated schema. Sorry about that.
{
"transaction": { // eth_getTransactionReceipt response body
... // see https://eips.ethereum.org/EIPS/eip-1474
},
"blockHash": "0xab..123", // block hash from where this transaction was seen
"matchReasons": [ // the reasons why sentinel triggered
{
"type": "event", // event, function, or transaction
"signature": "...", // signature of your event/function
"condition": "value > 5", // condition expression (if any)
"args": ["5"], // parameters by index (unnamed are present)
"params": { "value": "5" } // parameters by name (unnamed are not present)
}
],
"sentinel": {
"id": "44a7d5...31df5", // internal ID of your sentinel
"name": "Sentinel Name", // name of your sentinel
"abi": [...], // abi of your address (or undefined)
"address": "0x000..000", // address your sentinel is watching
"confirmBlocks": 0, // number of blocks sentinel waits
"network": "rinkeby" // network of your address
}
}```
Hi, has this been resolved? because i cannot seem to access elements inside the sentinel object or matchReasons array.
I am trying to access the params sent from a sentinel to autotask.