Package Logo
injective_common
injective-common@v0.2.0
README

common Injective substreams modules to extract events and transactions with indexing

Use one of those optimized modules with a query string as a parameter:

  • filtered_events
  • filtered_event_groups
  • filtered_trx_by_events

The query string will be used for the blockfilter as well as the actual filtering of the events/transactions

The following modules are also available for more specific filtering, but they do not use an index by default:

  • filtered_events_by_attribute_value
  • filtered_event_groups_by_attribute_value
  • filtered_trx_by_events_attribute_value

They should be overriden by setting the blockFilter.Query.String parameter to a query that matches the event type and attribute keys only. See derived-substreams-example.yaml for an example (https://github.com/streamingfast/substreams-foundational-modules/injective-common)

)
Documentation
Modules
Maps icon
Maps

map
all_transactions

5055dd0a91c8972f4d49109655cd249a655b5e42
map all_transactions (
blocksf.cosmos.type.v2.Block
)  -> sf.substreams.cosmos.v1.TransactionList

all_transactions reads from the sf.cosmos.type.v2.Block source and outputs a list of all transactions in the block. Some known message types will be converted to the correct protobuf type, unknown ones will stay as Any type.

substreams gui injective-common@v0.2.0 all_transactions

map
all_events

a97cc6cdf9c577802b6f46f0a9a7b96ec90503dc

all_events reads from the sf.cosmos.type.v2.Block source and outputs a list of all events in the block. Some events are at the block level, others appear inside the transactions.

substreams gui injective-common@v0.2.0 all_events

map
filtered_events

fe7bad133c848349bdd1e95917dae42983a2cda6
Default param : (type:message && attr:action) || (type:wasm && attr:_contract_address)

filtered_events reads from all_events and applies a filter on the event types and attribute keys, only outputing the events that match the filter. Example usage: (type:message && attr:action) || (type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_events

map
filtered_event_groups

117b4434b3ff02d4857a6d5ef5fc30210463b973
Default param : type:wasm && attr:_contract_address

filtered_event_groups reads from all_events and applies a filter on the event types and attribute keys, outputing all the events from transactions that have at least one event matching the filter. Example usage: type:injective.peggy.v1.EventDepositClaim || (type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_event_groups

map
filtered_trx_by_events

83f53b3209002e9e75ef8bf98c7d99ff14082f7d
Default param : type:wasm

filtered_trx_by_events reads from all_transactions and applies a filter on the event types and attribute keys, outputing the complete transactions that have at least one event matching the filter. Example usage: type:injective.peggy.v1.EventDepositClaim || (type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_trx_by_events

map
filtered_events_by_attribute_value

d1cb71ecbadba208fa7cad37ee37e06cd927c865
map filtered_events_by_attribute_value (
paramsstring
)  -> sf.substreams.cosmos.v1.EventList
Default param : type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5

filtered_events_by_attribute_value reads from all_events and applies a filter on the event types, attribute keys and values, only outputing the events that match the filter. Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5"

To use this module with an index, import it and override it with the use: parameter, setting blockFilter.Query.String to a query that matches the event type and attribute keys only (ex: type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_events_by_attribute_value

map
filtered_event_groups_by_attribute_value

85a795a3c4e6d366674c896e85bcf0ed2f5bef4d
map filtered_event_groups_by_attribute_value (
paramsstring
)  -> sf.substreams.cosmos.v1.EventList
Default param : type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5

filtered_events_groups_by_attribute_value reads from all_events and applies a filter on the event types, attribute keys and values, outputing all the events from transactions that have at least one event matching the filter. Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5"

To use this module with an index, import it and override it with the use: parameter, setting blockFilter.Query.String to a query that matches the event type and attribute keys only (ex: type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_event_groups_by_attribute_value

map
filtered_trx_by_events_attribute_value

053a63e927743918705a7292c296d51eb933c5c6
Default param : type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5

filtered_trx_by_events_attribute_value reads from all_events and applies a filter on the event types, attribute keys and values, outputing the complete transactions that have at least one event matching the filter. Example usage: "type:wasm && attr:_contract_address:inj1v77y5ttah96dc9qkcpc88ad7rce8n88e99t3m5"

To use this module with an index, import it and override it with the use: parameter, setting blockFilter.Query.String to a query that matches the event type and attribute keys only (ex: type:wasm && attr:_contract_address)

substreams gui injective-common@v0.2.0 filtered_trx_by_events_attribute_value
Block Indexes icon
Block Indexes

blockIndex
index_events

f2fef7eb715b6c2d03396ba9506cd887695ac44b

index_events sets the keys corresponding to all event 'types' and 'attribute keys' in the block ex: type:coin_received, type:injective.peggy.v1.EventDepositClaim, attr:action, attr:sender ... The attribute values are never indexed because they have a high cardinality and would be too expensive to index.

substreams gui injective-common@v0.2.0 index_events
Protobuf

Protobuf Docs Explorer

cosmos.tx.signing.v1beta1
cosmos_proto
cosmos.evidence.v1beta1
amino
cosmos.slashing.v1beta1
injective.oracle.v1beta1
injective.exchange.v1beta1
cosmos.gov.v1beta1
ibc.core.channel.v1
cosmos.msg.v1
cosmos.crypto.multisig.v1beta1
cosmos.distribution.v1beta1
injective.peggy.v1
injective.crypto.v1beta1.ethsecp256k1
cosmos.tx.v1beta1
injective.wasmx.v1
cosmos.authz.v1beta1
cosmwasm.wasm.v1
ibc.core.client.v1
injective.auction.v1beta1
cosmos.bank.v1beta1
sf.cosmos.type.v2
cosmos.crisis.v1beta1
gogoproto
cosmos.base.v1beta1
cosmos.upgrade.v1beta1