github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/sdk/abci.go (about) 1 package sdk 2 3 import abci "github.com/gnolang/gno/tm2/pkg/bft/abci/types" 4 5 // InitChainer initializes application state at genesis 6 type InitChainer func(ctx Context, req abci.RequestInitChain) abci.ResponseInitChain 7 8 // BeginBlocker runs code before the transactions in a block 9 // 10 // Note: applications which set create_empty_blocks=false will not have regular block timing and should use 11 // e.g. BFT timestamps rather than block height for any periodic BeginBlock logic 12 type BeginBlocker func(ctx Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock 13 14 // EndBlocker runs code after the transactions in a block and return updates to the validator set 15 // 16 // Note: applications which set create_empty_blocks=false will not have regular block timing and should use 17 // e.g. BFT timestamps rather than block height for any periodic EndBlock logic 18 type EndBlocker func(ctx Context, req abci.RequestEndBlock) abci.ResponseEndBlock