Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojtek committed Nov 2, 2023
1 parent f391ed0 commit fb45e93
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
22 changes: 21 additions & 1 deletion cmd/parse/gov/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import (
"fmt"
"strconv"

"github.com/forbole/bdjuno/v4/modules/assetft"
"github.com/forbole/bdjuno/v4/modules/assetnft"
"github.com/forbole/bdjuno/v4/modules/customparams"
"github.com/forbole/bdjuno/v4/modules/feemodel"
"github.com/rs/zerolog/log"

modulestypes "github.com/forbole/bdjuno/v4/modules/types"
Expand Down Expand Up @@ -53,9 +57,25 @@ func proposalCmd(parseConfig *parsecmdtypes.Config) *cobra.Command {
mintModule := mint.NewModule(sources.MintSource, parseCtx.EncodingConfig.Codec, db)
slashingModule := slashing.NewModule(sources.SlashingSource, parseCtx.EncodingConfig.Codec, db)
stakingModule := staking.NewModule(sources.StakingSource, parseCtx.EncodingConfig.Codec, db)
feeModelModule := feemodel.NewModule(sources.FeeModelSource, parseCtx.EncodingConfig.Codec, db)
customParamsModule := customparams.NewModule(sources.CustomParamsSource, parseCtx.EncodingConfig.Codec, db)
assetFTModule := assetft.NewModule(sources.AssetFTSource, parseCtx.EncodingConfig.Codec, db)
assetNFTModule := assetnft.NewModule(sources.AssetNFTSource, parseCtx.EncodingConfig.Codec, db)

// Build the gov module
govModule := gov.NewModule(sources.GovSource, distrModule, mintModule, slashingModule, stakingModule, parseCtx.EncodingConfig.Codec, db)
govModule := gov.NewModule(
sources.GovSource,
distrModule,
mintModule,
slashingModule,
stakingModule,
feeModelModule,
customParamsModule,
assetFTModule,
assetNFTModule,
parseCtx.EncodingConfig.Codec,
db,
)

err = refreshProposalDetails(parseCtx, proposalID, govModule)
if err != nil {
Expand Down
16 changes: 14 additions & 2 deletions modules/registrar.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"github.com/forbole/bdjuno/v4/modules/bank"
"github.com/forbole/bdjuno/v4/modules/consensus"
"github.com/forbole/bdjuno/v4/modules/customparams"
dailyrefetch "github.com/forbole/bdjuno/v4/modules/daily_refetch"
"github.com/forbole/bdjuno/v4/modules/distribution"
"github.com/forbole/bdjuno/v4/modules/feegrant"
"github.com/forbole/bdjuno/v4/modules/feemodel"
dailyrefetch "github.com/forbole/bdjuno/v4/modules/daily_refetch"
"github.com/forbole/bdjuno/v4/modules/gov"
"github.com/forbole/bdjuno/v4/modules/mint"
"github.com/forbole/bdjuno/v4/modules/modules"
Expand Down Expand Up @@ -92,7 +92,19 @@ func (r *Registrar) BuildModules(ctx registrar.Context) jmodules.Modules {
assetFTModule := assetft.NewModule(sources.AssetFTSource, cdc, db)
assetNFTModule := assetnft.NewModule(sources.AssetNFTSource, cdc, db)
wasmModule := wasm.NewModule(r.parser, cdc, db)
govModule := gov.NewModule(sources.GovSource, authModule, distrModule, mintModule, slashingModule, stakingModule, feeModelModule, customParamsModule, assetFTModule, assetNFTModule, cdc, db)
govModule := gov.NewModule(
sources.GovSource,
distrModule,
mintModule,
slashingModule,
stakingModule,
feeModelModule,
customParamsModule,
assetFTModule,
assetNFTModule,
cdc,
db,
)
upgradeModule := upgrade.NewModule(db, stakingModule)

return []jmodules.Module{
Expand Down

0 comments on commit fb45e93

Please sign in to comment.