-
Notifications
You must be signed in to change notification settings - Fork 16
/
application.go
50 lines (40 loc) · 1.76 KB
/
application.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright [2021] - [2022], AssetMantle Pte. Ltd. and the code contributors
// SPDX-License-Identifier: Apache-2.0
package applications
import (
"io"
"github.com/cosmos/cosmos-sdk/baseapp"
serverTypes "github.com/cosmos/cosmos-sdk/server/types"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/log"
tendermintLog "github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"github.com/AssetMantle/modules/helpers"
)
type Application interface {
serverTypes.Application
GetDefaultNodeHome() string
GetDefaultClientHome() string
GetModuleBasicManager() module.BasicManager
GetCodec() helpers.Codec
LoadHeight(int64) error
ExportApplicationStateAndValidators(bool, []string) (serverTypes.ExportedApp, error)
Name() string
Logger() log.Logger
MountStores(keys ...sdkTypes.StoreKey)
MountKVStores(keys map[string]*sdkTypes.KVStoreKey)
MountTransientStores(keys map[string]*sdkTypes.TransientStoreKey)
MountStore(key sdkTypes.StoreKey, typ sdkTypes.StoreType)
LastCommitID() sdkTypes.CommitID
LastBlockHeight() int64
Router() sdkTypes.Router
QueryRouter() sdkTypes.QueryRouter
Seal()
IsSealed() bool
AppCreator(log.Logger, tendermintDB.DB, io.Writer, serverTypes.AppOptions) serverTypes.Application
AppExporter(log.Logger, tendermintDB.DB, io.Writer, int64, bool, []string, serverTypes.AppOptions) (serverTypes.ExportedApp, error)
ModuleInitFlags(startCmd *cobra.Command)
Initialize(logger tendermintLog.Logger, db tendermintDB.DB, traceStore io.Writer, loadLatest bool, invCheckPeriod uint, skipUpgradeHeights map[int64]bool, home string, appOptions serverTypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp)) Application
}