mafoc-0.0.0.1
Safe HaskellSafe-Inferred
LanguageHaskell2010

Mafoc.Indexers.MintBurn

Description

Indexer for mint and burn events.

The implementation for converting blocks to events and persisting these into sqlite is outsourced from marconi.

This just provides the CLI interface and a streaming runtime.

Synopsis

Documentation

data MintBurn #

Configuration data type which does double-duty as the tag for the indexer.

Instances

Instances details
Show MintBurn # 
Instance details

Defined in Mafoc.Indexers.MintBurn

Indexer MintBurn # 
Instance details

Defined in Mafoc.Indexers.MintBurn

Associated Types

data Runtime MintBurn #

data Event MintBurn #

data State MintBurn #

Methods

description :: Text #

parseCli :: Parser MintBurn #

toEvents :: Runtime MintBurn -> State MintBurn -> BlockInMode CardanoMode -> (State MintBurn, [Event MintBurn]) #

initialize :: MintBurn -> Trace IO Text -> IO (State MintBurn, LocalChainsyncRuntime, Runtime MintBurn) #

persistMany :: Runtime MintBurn -> [Event MintBurn] -> IO () #

checkpoint :: Runtime MintBurn -> State MintBurn -> (SlotNo, Hash BlockHeader) -> IO () #

Show (Event MintBurn) # 
Instance details

Defined in Mafoc.Indexers.MintBurn

ToRow (Event MintBurn) # 
Instance details

Defined in Mafoc.Indexers.MintBurn

Methods

toRow :: Event MintBurn -> [SQLData]

data Event MintBurn # 
Instance details

Defined in Mafoc.Indexers.MintBurn

data Event MintBurn = Event {}
data Runtime MintBurn # 
Instance details

Defined in Mafoc.Indexers.MintBurn

data Runtime MintBurn = Runtime {}
data State MintBurn # 
Instance details

Defined in Mafoc.Indexers.MintBurn

toEventsPrim :: (PolicyId -> AssetName -> Bool) -> BlockInMode CardanoMode -> [Event MintBurn] #

Separate from class for reuse: this way we don't need to add dummy runtime and state when we want to call create MintBurn events outside of this indexer.

SQLite

sqliteInit :: Connection -> String -> IO () #

persistManySqlite :: Connection -> String -> [Event MintBurn] -> IO () #

Get policy data

getPolicyData :: forall era. (Era (ShelleyLedgerEra era), EraCrypto (ShelleyLedgerEra era) ~ StandardCrypto) => TxBody era -> MultiAsset StandardCrypto -> [(PolicyId, AssetName, Quantity, Maybe (ScriptData, Hash ScriptData))] #