EVM Event Emitted
EVM Event Emitted is used to trigger a midpoint whenever an on-chain event is emitted. Unlike startpoint sources, EVM Event Emitted sources can be used for existing production contracts - without contract modification.
When configuring an EVM Event Emitted source, specify the event signature through
argumentsalong with any filters to apply to indexed topics. EVM Event Emitted can be usd when creating alerts, notifications, and listeners.
chainId: string # required
contractAddress: string # required
eventName: string # required
chainId: String. The Chain ID of the chain to listen for an event from. For a complete list of Chain Ids that we currently support, take a look at Chain IDs.
contractAddress: String. The address of the contract that the event is emitted from.
eventName: String. This is name of the event that you are listening for.
arguments: This specifies the signature of the event, and the data that is picked out from your event to be used in later tasks.
arguments.name: String. This is the name of an argument that the event emits. This is a human-readable name that you set: for clarity, it might be best to set this name to the name of the parameter you are calling.
arguments.datatype: String. This defines the solidity datatype of the value that is emitted from the on-chain event. This datatype must match the datatype of your on-chain event exactly, in the same order as they are defined in the on-chain event.
arguments.indexed: Boolean. This determines whether or not your particular argument is indexed, or not. An indexed parameter can be further filtered by specifying the value below.
arguments.value: String This is the value of the indexed parameter. This is not necessary to define if the particular argument is or is not indexed. You only need to define a value for this argument if you only want to listen to events that emit a particular indexed value, for example, a contract address.
TimestampUnixtime of execution.
TaskDefinitionThe complete definition of this task at runtime.
TaskOutputDataThe complete set of returned values from this task
The EVM Event Emitted source returns each of the arguments listed under the
argumentsfield for use in future tasks - in addition to each field specified in
Let's say you want to listen to a particular event.
// Sample Event
event ReturnValue(address indexed _from, int256 _value);
A correctly configured Evm Event Emitted source would be:
The above EVM Event Emitted Source would listen for events emitted from the contract
0x5B39558897Bb0047803F9E498D238fB5811E6050on Ethereum mainnet. It will only pick out events that emit a value of
0xC05f817a17bC0c505E48AC9CC52b5cb556F7B296for the _from parameter.
This section is incomplete.