Search…
Matches
When a trigger... gets triggered
Every time a Trigger gets triggered it results in the creation of a Match. There is a different Match type for every given Trigger: EventsTriggerMatch, ContractsTriggerMatch and TransactionTriggerMatch.
Here is what they look like:

TransactionsTriggerMatch

1
type TransactionsTriggerMatch implements Match {
2
UUID: UUID!
3
createdAt: Timestamp!
4
trigger: TransactionsTrigger!
5
decoded: Decoded
6
block: Block!
7
transaction: Transaction!
8
}
Copied!
the Decoded field is defined as follows:
1
type Decoded {
2
method: Method
3
arguments: [JSON]
4
}
Copied!
and represents the decoded input data used for the specific transaction that matched.

ContractsTriggerMatch

1
type ContractsTriggerMatch implements Match {
2
UUID: UUID!
3
createdAt: Timestamp!
4
trigger: ContractsTrigger!
5
contract: Contract
6
method: Method!
7
returnedValues: ReturnedValues!
8
block: Block!
9
}
Copied!
contract is a type that contains information about the matching contract:
1
type Contract {
2
address: Address!
3
abi: JSON
4
}
Copied!
method is the name of the function that was invoked on the contract and whose output matched the correspondent Trigger.
Lastly, ReturnedValues is defined as follow
1
type ReturnedValues {
2
matched: [JSON!]!
3
all: [JSON]
4
}
Copied!
and contains information on all the values returned by the function call (all), as well a the specific value(s) which matched the Trigger description (matched).

EventsTriggerMatch

1
type EventsTriggerMatch implements Match {
2
UUID: UUID!
3
createdAt: Timestamp!
4
trigger: EventsTrigger!
5
decoded: Decoded
6
log: Log!
7
block: Block!
8
transaction: Transaction!
9
}
Copied!
the Decoded type contains information on the matching Event Name that was emitted, as well as its arguments (the values in the data and topic fields)
1
type Decoded {
2
method: Method
3
arguments: [JSON]
4
}
Copied!
Copy link
Contents