Common Mantra Substreams modules to extract events and transactions with indexing This package inherits from the generic Cosmos Foundational Modules.
Usually, foundational modules are directly imported and used in other Substreams. All the official foundational modules are stored in substreams.dev.
specVersion: v0.1.0
package:
name: my_project
version: v0.1.0
imports:
mantra: https://spkg.io/streamingfast/mantra-common-v0.1.0.spkg # Import the package from substreams.dev
modules:
- name: my_events # Define your Substreams module
use: mantra:filtered_events # Use the imported package
initialBlock: 70000000
params:
my_events: "(type:message && attr:action) || (type:wasm && attr:_contract_address)" # Pass the filter as parameter to the module
To run the Substreams:
substreams build
substreams auth
substreams gui
Retrieves all the events in the Mantra blockchain without any filtering.
The module create an index (a cache) to efficiently retrieve events by their type and/or attribute keys.
The module sets the keys corresponding to all event 'types' and 'attribute keys' in the block For example: type:coin_received
, attr:action
, attr:sender
...
The attribute values are never indexed because they have a high cardinality and would be too expensive to index.
The module reads from all_events
and applies a filter on the event types and attribute keys, only outputing the events that match the filter.
The filter is specificed in the parameters of the module.
...
params:
filtered_events: "(type:rewards && attr:validator)"
The module 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.
params:
filtered_event_groups: "type:rewards && attr:validator"
The module reads from all_events
and applies a filter on the event types, attribute keys and values, only outputing the events that match the filter.
NOTE: This module does not use the index created by index_events
.
params:
filtered_events_by_attribute_value: "type:rewards && attr:validator:mantravaloper18se5kq0z86pqfym8uuuqp77kyd788npj3wx7fc"
The module 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.
NOTE: This module does not use the index created by index_events
.
params:
filtered_event_groups_by_attribute_value: "type:rewards && attr:validator:mantravaloper18se5kq0z86pqfym8uuuqp77kyd788npj3wx7fc"
substreams gui mantra-common@v0.1.0 all_events
substreams gui mantra-common@v0.1.0 filtered_events
substreams gui mantra-common@v0.1.0 filtered_event_groups
substreams gui mantra-common@v0.1.0 filtered_events_by_attribute_value
substreams gui mantra-common@v0.1.0 filtered_event_groups_by_attribute_value
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 mantra-common@v0.1.0 cosmos:all_events
substreams gui mantra-common@v0.1.0 cosmos:filtered_events
substreams gui mantra-common@v0.1.0 cosmos:filtered_event_groups
substreams gui mantra-common@v0.1.0 cosmos:filtered_events_by_attribute_value
substreams gui mantra-common@v0.1.0 cosmos:filtered_event_groups_by_attribute_value
substreams gui mantra-common@v0.1.0 index_events
substreams gui mantra-common@v0.1.0 cosmos:index_events
message
BridgeValidator
message
Valset
message
LastObservedEthereumBlockHeight
message
LastClaimEvent
message
ERC20ToDenom
message
Params
message
MsgSetOrchestratorAddresses
message
MsgSetOrchestratorAddressesResponse
message
MsgValsetConfirm
message
MsgValsetConfirmResponse
message
MsgSendToEth
message
MsgSendToEthResponse
message
MsgRequestBatch
message
MsgRequestBatchResponse
message
MsgConfirmBatch
message
MsgConfirmBatchResponse
message
MsgDepositClaim
message
MsgDepositClaimResponse
message
MsgWithdrawClaim
message
MsgWithdrawClaimResponse
message
MsgERC20DeployedClaim
message
MsgERC20DeployedClaimResponse
message
MsgCancelSendToEth
message
MsgCancelSendToEthResponse
message
MsgSubmitBadSignatureEvidence
message
MsgSubmitBadSignatureEvidenceResponse
message
MsgValsetUpdatedClaim
message
MsgValsetUpdatedClaimResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
Plan
message
SoftwareUpgradeProposal
message
CancelSoftwareUpgradeProposal
message
ModuleVersion
message
SignatureDescriptors
message
SignatureDescriptor
enum
SignMode
message
Params
message
Bid
message
EventBid
message
EventAuctionResult
message
EventAuctionStart
message
MsgBid
message
MsgBidResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgVerifyInvariant
message
MsgVerifyInvariantResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
Clock
message
BlockRef
message
Modules
message
Binary
message
Module
message
Package
message
NetworkParams
message
PackageMetadata
message
ModuleMetadata
message
Tx
message
TxRaw
message
SignDoc
message
SignDocDirectAux
message
TxBody
message
AuthInfo
message
SignerInfo
message
ModeInfo
message
Fee
message
Tip
message
AuxSignerData
message
AccessTypeParam
message
AccessConfig
message
Params
message
CodeInfo
message
ContractInfo
message
ContractCodeHistoryEntry
message
AbsoluteTxPosition
message
Model
enum
AccessType
enum
ContractCodeHistoryOperationType
message
MsgStoreCode
message
MsgStoreCodeResponse
message
MsgInstantiateContract
message
MsgInstantiateContractResponse
message
MsgInstantiateContract2
message
MsgInstantiateContract2Response
message
MsgExecuteContract
message
MsgExecuteContractResponse
message
MsgMigrateContract
message
MsgMigrateContractResponse
message
MsgUpdateAdmin
message
MsgUpdateAdminResponse
message
MsgClearAdmin
message
MsgClearAdminResponse
message
MsgUpdateInstantiateConfig
message
MsgUpdateInstantiateConfigResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgSudoContract
message
MsgSudoContractResponse
message
MsgPinCodes
message
MsgPinCodesResponse
message
MsgUnpinCodes
message
MsgUnpinCodesResponse
message
MsgStoreAndInstantiateContract
message
MsgStoreAndInstantiateContractResponse
message
MsgAddCodeUploadParamsAddresses
message
MsgAddCodeUploadParamsAddressesResponse
message
MsgRemoveCodeUploadParamsAddresses
message
MsgRemoveCodeUploadParamsAddressesResponse
message
MsgStoreAndMigrateContract
message
MsgStoreAndMigrateContractResponse
message
MsgUpdateContractLabel
message
MsgUpdateContractLabelResponse
message
StoreCodeProposal
message
InstantiateContractProposal
message
InstantiateContract2Proposal
message
MigrateContractProposal
message
SudoContractProposal
message
ExecuteContractProposal
message
UpdateAdminProposal
message
ClearAdminProposal
message
PinCodesProposal
message
UnpinCodesProposal
message
AccessConfigUpdate
message
UpdateInstantiateConfigProposal
message
StoreAndInstantiateContractProposal
message
ValidatorSigningInfo
message
Params
message
MsgUnjail
message
MsgUnjailResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
Params
message
OracleInfo
message
ChainlinkPriceState
message
BandPriceState
message
PriceFeedState
message
ProviderInfo
message
ProviderState
message
ProviderPriceState
message
PriceFeedInfo
message
PriceFeedPrice
message
CoinbasePriceState
message
PriceState
message
PythPriceState
message
BandOracleRequest
message
BandIBCParams
message
SymbolPriceTimestamp
message
LastPriceTimestamps
message
PriceRecords
message
PriceRecord
message
MetadataStatistics
message
PriceAttestation
enum
OracleType
message
MsgRelayProviderPrices
message
MsgRelayProviderPricesResponse
message
MsgRelayPriceFeedPrice
message
MsgRelayPriceFeedPriceResponse
message
MsgRelayBandRates
message
MsgRelayBandRatesResponse
message
MsgRelayCoinbaseMessages
message
MsgRelayCoinbaseMessagesResponse
message
MsgRequestBandIBCRates
message
MsgRequestBandIBCRatesResponse
message
MsgRelayPythPrices
message
MsgRelayPythPricesResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
Channel
message
IdentifiedChannel
message
Counterparty
message
Packet
message
PacketState
message
PacketId
message
Acknowledgement
message
Timeout
message
Params
enum
State
enum
Order
message
Upgrade
message
UpgradeFields
message
ErrorReceipt
message
MsgChannelOpenInit
message
MsgChannelOpenInitResponse
message
MsgChannelOpenTry
message
MsgChannelOpenTryResponse
message
MsgChannelOpenAck
message
MsgChannelOpenAckResponse
message
MsgChannelOpenConfirm
message
MsgChannelOpenConfirmResponse
message
MsgChannelCloseInit
message
MsgChannelCloseInitResponse
message
MsgChannelCloseConfirm
message
MsgChannelCloseConfirmResponse
message
MsgRecvPacket
message
MsgRecvPacketResponse
message
MsgTimeout
message
MsgTimeoutResponse
message
MsgTimeoutOnClose
message
MsgTimeoutOnCloseResponse
message
MsgAcknowledgement
message
MsgAcknowledgementResponse
message
MsgChannelUpgradeInit
message
MsgChannelUpgradeInitResponse
message
MsgChannelUpgradeTry
message
MsgChannelUpgradeTryResponse
message
MsgChannelUpgradeAck
message
MsgChannelUpgradeAckResponse
message
MsgChannelUpgradeConfirm
message
MsgChannelUpgradeConfirmResponse
message
MsgChannelUpgradeOpen
message
MsgChannelUpgradeOpenResponse
message
MsgChannelUpgradeTimeout
message
MsgChannelUpgradeTimeoutResponse
message
MsgChannelUpgradeCancel
message
MsgChannelUpgradeCancelResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgPruneAcknowledgements
message
MsgPruneAcknowledgementsResponse
enum
ResponseResultType
message
DeployRequest
message
Parameter
message
DeployResponse
message
UpdateRequest
message
UpdateResponse
message
InfoRequest
message
InfoResponse
message
SinkProgress
message
PackageInfo
message
ListRequest
message
ListResponse
message
DeploymentWithStatus
message
RemoveRequest
message
RemoveResponse
message
PauseRequest
message
PauseResponse
message
StopRequest
message
StopResponse
message
ResumeRequest
message
ResumeResponse
enum
DeploymentStatus
message
ContractRegistrationRequestProposal
message
BatchContractRegistrationRequestProposal
message
BatchContractDeregistrationProposal
message
ContractRegistrationRequest
message
BatchStoreCodeProposal
enum
FundingMode
message
Params
message
RegisteredContract
message
MsgExecuteContractCompat
message
MsgExecuteContractCompatResponse
message
MsgUpdateContract
message
MsgUpdateContractResponse
message
MsgActivateContract
message
MsgActivateContractResponse
message
MsgDeactivateContract
message
MsgDeactivateContractResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgRegisterContract
message
MsgRegisterContractResponse
message
IdentifiedClientState
message
ConsensusStateWithHeight
message
ClientConsensusStates
message
Height
message
Params
message
ClientUpdateProposal
message
UpgradeProposal
message
MsgCreateClient
message
MsgCreateClientResponse
message
MsgUpdateClient
message
MsgUpdateClientResponse
message
MsgUpgradeClient
message
MsgUpgradeClientResponse
message
MsgSubmitMisbehaviour
message
MsgSubmitMisbehaviourResponse
message
MsgRecoverClient
message
MsgRecoverClientResponse
message
MsgIBCSoftwareUpgrade
message
MsgIBCSoftwareUpgradeResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
Params
message
ValidatorHistoricalRewards
message
ValidatorCurrentRewards
message
ValidatorAccumulatedCommission
message
ValidatorOutstandingRewards
message
ValidatorSlashEvent
message
ValidatorSlashEvents
message
FeePool
message
CommunityPoolSpendProposal
message
DelegatorStartingInfo
message
DelegationDelegatorReward
message
CommunityPoolSpendProposalWithDeposit
message
MsgSetWithdrawAddress
message
MsgSetWithdrawAddressResponse
message
MsgWithdrawDelegatorReward
message
MsgWithdrawDelegatorRewardResponse
message
MsgWithdrawValidatorCommission
message
MsgWithdrawValidatorCommissionResponse
message
MsgFundCommunityPool
message
MsgFundCommunityPoolResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgCommunityPoolSpend
message
MsgCommunityPoolSpendResponse
message
MsgDepositValidatorRewardsPool
message
MsgDepositValidatorRewardsPoolResponse
message
Params
message
MarketFeeMultiplier
message
DerivativeMarket
message
BinaryOptionsMarket
message
ExpiryFuturesMarketInfo
message
PerpetualMarketInfo
message
PerpetualMarketFunding
message
DerivativeMarketSettlementInfo
message
NextFundingTimestamp
message
MidPriceAndTOB
message
SpotMarket
message
Deposit
message
SubaccountTradeNonce
message
OrderInfo
message
SpotOrder
message
SpotLimitOrder
message
SpotMarketOrder
message
DerivativeOrder
message
SubaccountOrderbookMetadata
message
SubaccountOrder
message
SubaccountOrderData
message
DerivativeLimitOrder
message
DerivativeMarketOrder
message
Position
message
MarketOrderIndicator
message
TradeLog
message
PositionDelta
message
DerivativeTradeLog
message
SubaccountPosition
message
SubaccountDeposit
message
DepositUpdate
message
PointsMultiplier
message
TradingRewardCampaignBoostInfo
message
CampaignRewardPool
message
TradingRewardCampaignInfo
message
FeeDiscountTierInfo
message
FeeDiscountSchedule
message
FeeDiscountTierTTL
message
VolumeRecord
message
AccountRewards
message
TradeRecords
message
SubaccountIDs
message
TradeRecord
message
Level
message
AggregateSubaccountVolumeRecord
message
AggregateAccountVolumeRecord
message
MarketVolume
message
DenomDecimals
enum
AtomicMarketOrderAccessLevel
enum
MarketStatus
enum
OrderType
enum
ExecutionType
enum
OrderMask
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgDeposit
message
MsgDepositResponse
message
MsgWithdraw
message
MsgWithdrawResponse
message
MsgCreateSpotLimitOrder
message
MsgCreateSpotLimitOrderResponse
message
MsgBatchCreateSpotLimitOrders
message
MsgBatchCreateSpotLimitOrdersResponse
message
MsgInstantSpotMarketLaunch
message
MsgInstantSpotMarketLaunchResponse
message
MsgInstantPerpetualMarketLaunch
message
MsgInstantPerpetualMarketLaunchResponse
message
MsgInstantBinaryOptionsMarketLaunch
message
MsgInstantBinaryOptionsMarketLaunchResponse
message
MsgInstantExpiryFuturesMarketLaunch
message
MsgInstantExpiryFuturesMarketLaunchResponse
message
MsgCreateSpotMarketOrder
message
MsgCreateSpotMarketOrderResponse
message
SpotMarketOrderResults
message
MsgCreateDerivativeLimitOrder
message
MsgCreateDerivativeLimitOrderResponse
message
MsgCreateBinaryOptionsLimitOrder
message
MsgCreateBinaryOptionsLimitOrderResponse
message
MsgBatchCreateDerivativeLimitOrders
message
MsgBatchCreateDerivativeLimitOrdersResponse
message
MsgCancelSpotOrder
message
MsgCancelSpotOrderResponse
message
MsgBatchCancelSpotOrders
message
MsgBatchCancelSpotOrdersResponse
message
MsgBatchCancelBinaryOptionsOrders
message
MsgBatchCancelBinaryOptionsOrdersResponse
message
MsgBatchUpdateOrders
message
MsgBatchUpdateOrdersResponse
message
MsgCreateDerivativeMarketOrder
message
MsgCreateDerivativeMarketOrderResponse
message
DerivativeMarketOrderResults
message
MsgCreateBinaryOptionsMarketOrder
message
MsgCreateBinaryOptionsMarketOrderResponse
message
MsgCancelDerivativeOrder
message
MsgCancelDerivativeOrderResponse
message
MsgCancelBinaryOptionsOrder
message
MsgCancelBinaryOptionsOrderResponse
message
OrderData
message
MsgBatchCancelDerivativeOrders
message
MsgBatchCancelDerivativeOrdersResponse
message
MsgSubaccountTransfer
message
MsgSubaccountTransferResponse
message
MsgExternalTransfer
message
MsgExternalTransferResponse
message
MsgLiquidatePosition
message
MsgLiquidatePositionResponse
message
MsgEmergencySettleMarket
message
MsgEmergencySettleMarketResponse
message
MsgIncreasePositionMargin
message
MsgIncreasePositionMarginResponse
message
MsgPrivilegedExecuteContract
message
MsgPrivilegedExecuteContractResponse
message
MsgRewardsOptOut
message
MsgRewardsOptOutResponse
message
MsgReclaimLockedFunds
message
MsgReclaimLockedFundsResponse
message
MsgSignData
message
MsgSignDoc
message
MsgAdminUpdateBinaryOptionsMarket
message
MsgAdminUpdateBinaryOptionsMarketResponse
message
Request
message
Response
message
BlockUndoSignal
message
BlockScopedData
message
SessionInit
message
InitialSnapshotComplete
message
InitialSnapshotData
message
MapModuleOutput
message
StoreModuleOutput
message
OutputDebugInfo
message
ModulesProgress
message
ProcessedBytes
message
Error
message
Job
message
Stage
message
ModuleStats
message
ExternalCallMetric
message
StoreDelta
message
BlockRange
message
GenericAuthorization
message
Grant
message
GrantAuthorization
message
GrantQueueItem
message
MsgGrant
message
MsgGrantResponse
message
MsgExec
message
MsgExecResponse
message
MsgRevoke
message
MsgRevokeResponse
message
MsgPruneExpiredGrants
message
MsgPruneExpiredGrantsResponse
message
Params
message
SendEnabled
message
Input
message
Output
message
Supply
message
DenomUnit
message
Metadata
message
MsgSend
message
MsgSendResponse
message
MsgMultiSend
message
MsgMultiSendResponse
message
MsgUpdateParams
message
MsgUpdateParamsResponse
message
MsgSetSendEnabled
message
MsgSetSendEnabledResponse
message
MsgBurn
message
MsgBurnResponse
message
WeightedVoteOption
message
TextProposal
message
Deposit
message
Proposal
message
TallyResult
message
Vote
message
DepositParams
message
VotingParams
message
TallyParams
enum
VoteOption
enum
ProposalStatus
message
MsgSubmitProposal
message
MsgSubmitProposalResponse
message
MsgVote
message
MsgVoteResponse
message
MsgVoteWeighted
message
MsgVoteWeightedResponse
message
MsgDeposit
message
MsgDepositResponse
message
Timestamp
message
FileDescriptorSet
message
FileDescriptorProto
message
DescriptorProto
message
ExtensionRangeOptions
message
FieldDescriptorProto
message
OneofDescriptorProto
message
EnumDescriptorProto
message
EnumValueDescriptorProto
message
ServiceDescriptorProto
message
MethodDescriptorProto
message
FileOptions
message
MessageOptions
message
FieldOptions
message
OneofOptions
message
EnumOptions
message
EnumValueOptions
message
ServiceOptions
message
MethodOptions
message
UninterpretedOption
message
SourceCodeInfo
message
GeneratedCodeInfo
message
Any
message
Duration
message
Block
message
Header
message
Consensus
message
BlockID
message
PartSetHeader
message
Misbehavior
message
Validator
message
Event
message
EventAttribute
message
EventBytes
message
EventAttributeBytes
message
TxResults
message
ValidatorUpdate
message
PublicKey
message
ConsensusParams
message
BlockParams
message
EvidenceParams
message
ValidatorParams
message
VersionParams
message
HashedParams
enum
MisbehaviorType
message
EventList
message
Event
message
TransactionList
message
Transaction