@@ -34,9 +34,10 @@ import (
34
34
"github.com/zigbee-alliance/distributed-compliance-ledger/x/compliance"
35
35
"github.com/zigbee-alliance/distributed-compliance-ledger/x/compliancetest"
36
36
"github.com/zigbee-alliance/distributed-compliance-ledger/x/genutil"
37
- "github.com/zigbee-alliance/distributed-compliance-ledger/x/modelinfo "
37
+ "github.com/zigbee-alliance/distributed-compliance-ledger/x/model "
38
38
"github.com/zigbee-alliance/distributed-compliance-ledger/x/pki"
39
39
"github.com/zigbee-alliance/distributed-compliance-ledger/x/validator"
40
+ "github.com/zigbee-alliance/distributed-compliance-ledger/x/vendorinfo"
40
41
)
41
42
42
43
const appName = "dc-ledger"
@@ -54,10 +55,11 @@ var ModuleBasics = module.NewBasicManager(
54
55
auth.AppModuleBasic {},
55
56
validator.AppModuleBasic {},
56
57
genutil.AppModuleBasic {},
57
- modelinfo .AppModuleBasic {},
58
+ model .AppModuleBasic {},
58
59
compliance.AppModuleBasic {},
59
60
compliancetest.AppModuleBasic {},
60
61
pki.AppModuleBasic {},
62
+ vendorinfo.AppModuleBasic {},
61
63
)
62
64
63
65
// MakeCodec generates the necessary codecs for Amino.
@@ -82,10 +84,11 @@ type dcLedgerApp struct {
82
84
// Keepers
83
85
authKeeper auth.Keeper
84
86
validatorKeeper validator.Keeper
85
- modelinfoKeeper modelinfo .Keeper
87
+ modelKeeper model .Keeper
86
88
pkiKeeper pki.Keeper
87
89
complianceKeeper compliance.Keeper
88
90
compliancetestKeeper compliancetest.Keeper
91
+ vendorinfoKeeper vendorinfo.Keeper
89
92
90
93
// Module Manager
91
94
mm * module.Manager
@@ -102,7 +105,7 @@ func NewDcLedgerApp(logger log.Logger, db dbm.DB, baseAppOptions ...func(*bam.Ba
102
105
bApp .SetAppVersion (version .Version )
103
106
104
107
keys := sdk .NewKVStoreKeys (bam .MainStoreKey , auth .StoreKey , validator .StoreKey ,
105
- modelinfo .StoreKey , compliance .StoreKey , compliancetest .StoreKey , pki .StoreKey )
108
+ model .StoreKey , compliance .StoreKey , compliancetest .StoreKey , pki . StoreKey , vendorinfo .StoreKey )
106
109
107
110
tkeys := sdk .NewTransientStoreKeys (params .TStoreKey )
108
111
@@ -148,10 +151,11 @@ func InitModuleManager(app *dcLedgerApp) {
148
151
genutil .NewAppModule (app .authKeeper , app .validatorKeeper , app .BaseApp .DeliverTx ),
149
152
auth .NewAppModule (app .authKeeper ),
150
153
validator .NewAppModule (app .validatorKeeper , app .authKeeper ),
151
- modelinfo .NewAppModule (app .modelinfoKeeper , app .authKeeper ),
152
- compliance .NewAppModule (app .complianceKeeper , app .modelinfoKeeper , app .compliancetestKeeper , app .authKeeper ),
153
- compliancetest .NewAppModule (app .compliancetestKeeper , app .authKeeper , app .modelinfoKeeper ),
154
+ model .NewAppModule (app .modelKeeper , app .authKeeper ),
155
+ compliance .NewAppModule (app .complianceKeeper , app .modelKeeper , app .compliancetestKeeper , app .authKeeper ),
156
+ compliancetest .NewAppModule (app .compliancetestKeeper , app .authKeeper , app .modelKeeper ),
154
157
pki .NewAppModule (app .pkiKeeper , app .authKeeper ),
158
+ vendorinfo .NewAppModule (app .vendorinfoKeeper , app .authKeeper ),
155
159
)
156
160
157
161
app .mm .SetOrderBeginBlockers (validator .ModuleName )
@@ -160,10 +164,11 @@ func InitModuleManager(app *dcLedgerApp) {
160
164
app .mm .SetOrderInitGenesis (
161
165
auth .ModuleName ,
162
166
validator .ModuleName ,
163
- modelinfo .ModuleName ,
167
+ model .ModuleName ,
164
168
compliance .ModuleName ,
165
169
compliancetest .ModuleName ,
166
170
pki .ModuleName ,
171
+ vendorinfo .ModuleName ,
167
172
genutil .ModuleName ,
168
173
)
169
174
@@ -175,8 +180,8 @@ func InitKeepers(app *dcLedgerApp, keys map[string]*sdk.KVStoreKey) {
175
180
// The Validator keeper
176
181
app .validatorKeeper = MakeValidatorKeeper (keys , app )
177
182
178
- // The ModelinfoKeeper keeper
179
- app .modelinfoKeeper = MakeModelinfoKeeper (keys , app )
183
+ // The ModelKeeper keeper
184
+ app .modelKeeper = MakeModelKeeper (keys , app )
180
185
181
186
// The ComplianceKeeper keeper
182
187
app .complianceKeeper = MakeComplianceKeeper (keys , app )
@@ -189,6 +194,9 @@ func InitKeepers(app *dcLedgerApp, keys map[string]*sdk.KVStoreKey) {
189
194
190
195
// The AuthKeeper keeper
191
196
app .authKeeper = MakeAuthKeeper (keys , app )
197
+
198
+ // The Vendor keeper
199
+ app .vendorinfoKeeper = MakeVendorInfoKeeper (keys , app )
192
200
}
193
201
194
202
func MakeAuthKeeper (keys map [string ]* sdk.KVStoreKey , app * dcLedgerApp ) auth.Keeper {
@@ -198,9 +206,16 @@ func MakeAuthKeeper(keys map[string]*sdk.KVStoreKey, app *dcLedgerApp) auth.Keep
198
206
)
199
207
}
200
208
201
- func MakeModelinfoKeeper (keys map [string ]* sdk.KVStoreKey , app * dcLedgerApp ) modelinfo.Keeper {
202
- return modelinfo .NewKeeper (
203
- keys [modelinfo .StoreKey ],
209
+ func MakeModelKeeper (keys map [string ]* sdk.KVStoreKey , app * dcLedgerApp ) model.Keeper {
210
+ return model .NewKeeper (
211
+ keys [model .StoreKey ],
212
+ app .cdc ,
213
+ )
214
+ }
215
+
216
+ func MakeVendorInfoKeeper (keys map [string ]* sdk.KVStoreKey , app * dcLedgerApp ) vendorinfo.Keeper {
217
+ return vendorinfo .NewKeeper (
218
+ keys [vendorinfo .StoreKey ],
204
219
app .cdc ,
205
220
)
206
221
}
0 commit comments