dfuse Events

dfuse Events are a powerful way to give smart contract developers a way to ask dfuse Search to index their transactions, with arbitrary key/value pairs.

Note

See the Using dfuse Events tutorial for a concrete example.

Availability: This feature is available on EOS Mainnet, Jungle 2.0 and Kylin networks.

Destination: The inline action must be sent to contract dfuseiohooks with the action name event. The action signature is: event(string auth_key, string data).

Cost: be cheap, and use an inline context-free action to have minimal impact on transaction costs. Also, there will never be code deployed on dfuseiohooks, so it will always execute extremely fast.

Authorization: Specify no authorization (std::vector<permission_level>()) when issuing a context-free action.

Indexing: Only ONE such event per action will be indexed. If limits aren’t breached, the parameters in data will be indexed as event.field in dfuse Search, attached to the action that created the inline to dfuseiohooks:event. This allows you to search for receiver:yourcontract event.field:value or other combinations.

Action parameters

NameTypeOptionsDescription
auth_keystringrequiredThe empty string (limited access) or a valid dfuse Events Key if you have one. See Indexing Limits for details.
datastringrequiredA string containing the key/value pair list to index, as an RFC 3986 .

Indexing Limits

An empty auth_key parameter imposes those limits to the indexing:

  • A key/value pair under data is indexed only if:
    • the key has 16 characters or less
    • the value has 64 characters or less
    • there are no more than 3 keys (for unauthenticated calls)

If you need more than 3 key/values or want more than 64 bytes of value data, contact us to get a dfuse Events Key for your contract.

Note

If your auth_key is invalid or used within the wrong contract account, normal restrictions apply.