Package Logo
pyth_oracle_price
pyth-oracle-price@v0.4.0
Total Downloads
600
Published
3 months ago
Network
injective-mainnet injective-mainnet
Publisher
User Avatar streamingfast

Readme

Injective Pyth Oracle Prices Substreams modules

This module is a simple injective substreams using injective-common modules to filter specific pyth oracle events.

Usage

substreams build
substreams auth
substreams gui

Modules

injective:filtered_events

Filters EventSetPythPrices events. Default param: injective:filtered_events: "type:injective.oracle.v1beta1.EventSetPythPrices"

map_set_oracle_prices

Listens specific events from the injective:filtered_events module, specifically targeting EventSetPythPrices events related to a specified pair address (default is INJ/USD pair). Default param: map_set_oracle_prices: "pairID:0x7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592

store_set_oracle_prices

Stores the EventSetPythPrices events from the map_set_oracle_prices.

Documentation

Modules

Maps icon
Maps

map
map_set_oracle_prices

2dbe506777860401b166783aa624bbb2396ad001
map map_set_oracle_prices (
paramsstring
injective:filtered_eventssf.substreams.cosmos.v1.EventList
)  -> sf.substreams.injective.oracle.v1.SetOraclePrice
Default param : pairID:0x7a5bc1d2b56ad029048cd63964b3ad2776eadf812edc1a43a31406cb54bff592
substreams gui pyth-oracle-price@v0.4.0 map_set_oracle_prices

map
injective:all_transactions

9303d9f0191654ffbc7aa215b26f2fdb65df47d4
map injective:all_transactions (
)  -> 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 pyth-oracle-price@v0.4.0 injective:all_transactions

map
injective:all_events

1af570129fa17dce4aaf54973d863f47b83b8319
map injective:all_events (
)  -> sf.substreams.cosmos.v1.EventList

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 pyth-oracle-price@v0.4.0 injective:all_events

map
injective:filtered_events

e613c69ee83ba04dc3f062e5e3802f9889c1f6cf
Default param : type:injective.oracle.v1beta1.EventSetPythPrices

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 pyth-oracle-price@v0.4.0 injective:filtered_events

map
injective:filtered_event_groups

3300caefc92ac0043d3ebd07ee9c0dc3d897d87c
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 pyth-oracle-price@v0.4.0 injective:filtered_event_groups

map
injective:filtered_trx_by_events

a63f7caf5812780f70b7945544487ce8857db60f
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 pyth-oracle-price@v0.4.0 injective:filtered_trx_by_events

map
injective:filtered_events_by_attribute_value

a28041a4b41f3afa170e171c93d57680d844330b
map injective: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 pyth-oracle-price@v0.4.0 injective:filtered_events_by_attribute_value

map
injective:filtered_event_groups_by_attribute_value

5b71a3933dcad0b83c7679079d2ad7f51b101404
map injective: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 pyth-oracle-price@v0.4.0 injective:filtered_event_groups_by_attribute_value

map
injective:filtered_trx_by_events_attribute_value

03dac8df452a53729e2b31a06e3f8103dbf50600
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 pyth-oracle-price@v0.4.0 injective:filtered_trx_by_events_attribute_value
Stores icon
Stores

store
store_set_oracle_prices

83f3326ef9e5d0d78b2ba1e94f190455798cb498
substreams gui pyth-oracle-price@v0.4.0 store_set_oracle_prices
Block Indexes icon
Block Indexes

blockIndex
injective:index_events

7b84966264ce3e658c894e34777c841e982db57b

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 pyth-oracle-price@v0.4.0 injective:index_events
Protobuf

Protobuf Docs Explorer

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