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.
By simply instructing your smart contract to send an inline action to
dfuseiohooks:event, you can instruct dfuse Search to index some fields with arbitrary data (within limits).
Once on chain, the search term
event.field:value will allow you to retrieve those actions, anywhere on the dfuse Platform.
NoteSee the Using dfuse Events tutorial for a concrete example.
Availability: This feature is available on EOS Mainnet, EOSIO Testnet 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.
|string||required||The empty string (limited access) or a valid dfuse Events Key if you have one. See Indexing Limits for details.|
|string||required||A string containing the key/value pair list to index, as an RFC 3986 .|
auth_key parameter imposes those limits to the indexing:
- A key/value pair under
datais 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.
auth_keyis invalid or used within the wrong contract account, normal restrictions apply.