sdk update
This commit is contained in:
parent
92e3a4d8f4
commit
2c083b0147
@ -11,9 +11,11 @@ import (
|
||||
|
||||
// ExportAppStateAndValidators exports the state of the application for a genesis
|
||||
// file.
|
||||
// This is a demonstation of how to export a genesis file. Export may need extended at
|
||||
// This is a demonstration of how to export a genesis file. Export may need extended at
|
||||
// the user discretion for cleaning the genesis state at the end provided with jailAllowedAddrs
|
||||
// Same applies for forZeroHeight preprocessing.
|
||||
func (app *LaconicApp[T]) ExportAppStateAndValidators(
|
||||
forZeroHeight bool,
|
||||
jailAllowedAddrs []string,
|
||||
) (v2.ExportedApp, error) {
|
||||
ctx := context.Background()
|
||||
@ -44,5 +46,9 @@ func (app *LaconicApp[T]) ExportAppStateAndValidators(
|
||||
|
||||
exportedApp.AppState = genesis
|
||||
exportedApp.Height = int64(latestHeight)
|
||||
if forZeroHeight {
|
||||
exportedApp.Height = 0
|
||||
}
|
||||
|
||||
return exportedApp, nil
|
||||
}
|
||||
|
@ -114,8 +114,12 @@ func InitRootCmd[T app.Tx](
|
||||
app.Name(),
|
||||
app.Store(),
|
||||
app.App.AppManager,
|
||||
app.AppCodec(),
|
||||
&client.DefaultTxDecoder[T]{TxConfig: deps.TxConfig},
|
||||
cometbft.AppCodecs[T]{
|
||||
AppCodec: app.AppCodec(),
|
||||
TxCodec: &client.DefaultTxDecoder[T]{TxConfig: deps.TxConfig},
|
||||
LegacyAmino: deps.ClientContext.LegacyAmino,
|
||||
ConsensusAddressCodec: deps.ClientContext.ConsensusAddressCodec,
|
||||
},
|
||||
app.App.QueryHandlers(),
|
||||
app.App.SchemaDecoderResolver(),
|
||||
initCometOptions[T](),
|
||||
|
Loading…
Reference in New Issue
Block a user