Skip to content

Commit

Permalink
Merge pull request #70 from onomyprotocol/dev
Browse files Browse the repository at this point in the history
Merge Dev in Main for Release
  • Loading branch information
cgdusek authored May 10, 2024
2 parents d58d598 + fc79ad7 commit 557d989
Show file tree
Hide file tree
Showing 31 changed files with 16,720 additions and 29,121 deletions.
46 changes: 25 additions & 21 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ import (
"github.com/tendermint/starport/starport/pkg/openapiconsole"

"github.com/pendulum-labs/market/docs"
marketmodule "github.com/pendulum-labs/market/x/market"
marketmodulekeeper "github.com/pendulum-labs/market/x/market/keeper"
marketmoduletypes "github.com/pendulum-labs/market/x/market/types"
market "github.com/pendulum-labs/market/x/market"
marketclient "github.com/pendulum-labs/market/x/market/client"
marketkeeper "github.com/pendulum-labs/market/x/market/keeper"
marketclienttypes "github.com/pendulum-labs/market/x/market/types"
markettypes "github.com/pendulum-labs/market/x/market/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
)

Expand All @@ -116,6 +118,7 @@ func getGovProposalHandlers() []govclient.ProposalHandler {
upgradeclient.CancelProposalHandler,
ibcclientclient.UpdateClientProposalHandler,
ibcclientclient.UpgradeProposalHandler,
marketclient.DenomMetadataProposalHandler,
// this line is used by starport scaffolding # stargate/app/govProposalHandler
)

Expand Down Expand Up @@ -147,7 +150,7 @@ var (
evidence.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
marketmodule.AppModuleBasic{},
market.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
)

Expand All @@ -160,7 +163,7 @@ var (
stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking},
govtypes.ModuleName: {authtypes.Burner},
ibctransfertypes.ModuleName: {authtypes.Minter, authtypes.Burner},
marketmoduletypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
markettypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
// this line is used by starport scaffolding # stargate/app/maccPerms
}
)
Expand Down Expand Up @@ -224,7 +227,7 @@ type App struct {
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

MarketKeeper marketmodulekeeper.Keeper
MarketKeeper marketkeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration

// mm is the module manager
Expand Down Expand Up @@ -261,7 +264,7 @@ func New(
minttypes.StoreKey, distrtypes.StoreKey, slashingtypes.StoreKey,
govtypes.StoreKey, paramstypes.StoreKey, ibchost.StoreKey, upgradetypes.StoreKey, feegrant.StoreKey,
evidencetypes.StoreKey, ibctransfertypes.StoreKey, capabilitytypes.StoreKey,
marketmoduletypes.StoreKey,
markettypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
Expand Down Expand Up @@ -331,14 +334,23 @@ func New(
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey], app.GetSubspace(ibchost.ModuleName), app.StakingKeeper, app.UpgradeKeeper, scopedIBCKeeper,
)
app.MarketKeeper = *marketkeeper.NewKeeper(
appCodec,
keys[markettypes.StoreKey],
keys[markettypes.MemStoreKey],
app.GetSubspace(markettypes.ModuleName),

app.BankKeeper,
)

// register the proposal types
govRouter := govtypes.NewRouter()
govRouter.AddRoute(govtypes.RouterKey, govtypes.ProposalHandler).
AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)).
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(marketclienttypes.RouterKey, market.NewDenomMetadataProposalHandler(app.MarketKeeper))

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
Expand Down Expand Up @@ -367,15 +379,7 @@ func New(
&stakingKeeper, govRouter,
)

app.MarketKeeper = *marketmodulekeeper.NewKeeper(
appCodec,
keys[marketmoduletypes.StoreKey],
keys[marketmoduletypes.MemStoreKey],
app.GetSubspace(marketmoduletypes.ModuleName),

app.BankKeeper,
)
marketModule := marketmodule.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper)
marketModule := market.NewAppModule(appCodec, app.MarketKeeper, app.AccountKeeper, app.BankKeeper)

// this line is used by starport scaffolding # stargate/app/keeperDefinition

Expand Down Expand Up @@ -441,7 +445,7 @@ func New(
evidencetypes.ModuleName,
genutiltypes.ModuleName,
ibctransfertypes.ModuleName,
marketmoduletypes.ModuleName,
markettypes.ModuleName,
)

app.mm.SetOrderEndBlockers(
Expand All @@ -462,7 +466,7 @@ func New(
evidencetypes.ModuleName,
genutiltypes.ModuleName,
ibctransfertypes.ModuleName,
marketmoduletypes.ModuleName,
markettypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
Expand All @@ -488,7 +492,7 @@ func New(
evidencetypes.ModuleName,
genutiltypes.ModuleName,
ibctransfertypes.ModuleName,
marketmoduletypes.ModuleName,
markettypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
)

Expand Down Expand Up @@ -699,7 +703,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(crisistypes.ModuleName)
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(marketmoduletypes.ModuleName)
paramsKeeper.Subspace(markettypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace

return paramsKeeper
Expand Down
4 changes: 3 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
accounts:
- name: dealer
coins: ["2000000000000000000000000anom", "2000000000000000000000abtc", "20000000000000000000000wei", "20000000000000000000000stake"]
address: onomy1mczcy7z92fkyhrsctlv0ge690mzvmd9ye67mjy
- name: validator
coins: ["20000000000000000000stake"]
validator:
Expand All @@ -12,4 +11,7 @@ client:
path: "docs/static/openapi.yml"
vuex:
path: "vue/src/store"
gov:
voting_params:
voting_period": "10s"

Loading

0 comments on commit 557d989

Please sign in to comment.