Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 21 additions & 19 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
storetypes "cosmossdk.io/store/types"
"fmt"
"github.com/cosmos/cosmos-sdk/std"
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
"github.com/osmosis-labs/osmosis/osmomath"
Expand Down Expand Up @@ -229,6 +230,10 @@ func NewSymphonyApp(
interfaceRegistry := encodingConfig.InterfaceRegistry
txConfig := encodingConfig.TxConfig

legacyAmino := codec.NewLegacyAmino()
std.RegisterLegacyAminoCodec(legacyAmino)
std.RegisterInterfaces(interfaceRegistry)

bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...)
bApp.SetCommitMultiStoreTracer(traceStore)
bApp.SetVersion(version.Version)
Expand Down Expand Up @@ -311,25 +316,6 @@ func NewSymphonyApp(
// NOTE: staking module is required if HistoricalEntries param > 0
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)

// Upgrades from v0.50.x onwards happen in pre block
app.mm.SetOrderPreBlockers(upgradetypes.ModuleName)

// Tell the app's module manager how to set the order of BeginBlockers, which are run at the beginning of every block.
app.mm.SetOrderBeginBlockers(orderBeginBlockers(app.mm.ModuleNames())...)

// Tell the app's module manager how to set the order of EndBlockers, which are run at the end of every block.
app.mm.SetOrderEndBlockers(OrderEndBlockers(app.mm.ModuleNames())...)

app.mm.SetOrderInitGenesis(OrderInitGenesis(app.mm.ModuleNames())...)

app.mm.RegisterInvariants(app.CrisisKeeper)

app.configurator = module.NewConfigurator(app.AppCodec(), app.MsgServiceRouter(), app.GRPCQueryRouter())
err = app.mm.RegisterServices(app.configurator)
if err != nil {
panic(err)
}

// Override the gov ModuleBasic with all the custom proposal handers, otherwise we lose them in the CLI.
app.ModuleBasics = module.NewBasicManagerFromManager(
app.mm,
Expand Down Expand Up @@ -357,6 +343,22 @@ func NewSymphonyApp(
},
)

app.ModuleBasics.RegisterLegacyAminoCodec(legacyAmino)
app.ModuleBasics.RegisterInterfaces(interfaceRegistry)

// Upgrades from v0.50.x onwards happen in pre block
app.mm.SetOrderPreBlockers(upgradetypes.ModuleName)
// Tell the app's module manager how to set the order of BeginBlockers, which are run at the beginning of every block.
app.mm.SetOrderBeginBlockers(orderBeginBlockers(app.mm.ModuleNames())...)
// Tell the app's module manager how to set the order of EndBlockers, which are run at the end of every block.
app.mm.SetOrderEndBlockers(OrderEndBlockers(app.mm.ModuleNames())...)
app.mm.SetOrderInitGenesis(OrderInitGenesis(app.mm.ModuleNames())...)
app.mm.RegisterInvariants(app.CrisisKeeper)
app.configurator = module.NewConfigurator(app.AppCodec(), app.MsgServiceRouter(), app.GRPCQueryRouter())
err = app.mm.RegisterServices(app.configurator)
if err != nil {
panic(err)
}
app.setupUpgradeHandlers()

app.sm = module.NewSimulationManager(
Expand Down
237 changes: 212 additions & 25 deletions app/keepers/keepers.go

Large diffs are not rendered by default.

22 changes: 19 additions & 3 deletions app/keepers/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
"github.com/cosmos/cosmos-sdk/x/slashing"
"github.com/cosmos/cosmos-sdk/x/staking"
packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
icq "github.com/cosmos/ibc-apps/modules/async-icq/v8"
"github.com/cosmos/ibc-go/modules/capability"
ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer"
"github.com/cosmos/ibc-go/v8/modules/apps/transfer"
ibc "github.com/cosmos/ibc-go/v8/modules/core"
tendermint "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
stablestakingincentives "github.com/osmosis-labs/osmosis/v27/x/stable-staking-incentives"
Expand All @@ -41,6 +41,8 @@ import (
"github.com/skip-mev/block-sdk/v2/x/auction"

_ "github.com/osmosis-labs/osmosis/v27/client/docs/statik"
"github.com/osmosis-labs/osmosis/v27/x/autopilot"
"github.com/osmosis-labs/osmosis/v27/x/claim"
clclient "github.com/osmosis-labs/osmosis/v27/x/concentrated-liquidity/client"
concentratedliquidity "github.com/osmosis-labs/osmosis/v27/x/concentrated-liquidity/clmodule"
cwpoolclient "github.com/osmosis-labs/osmosis/v27/x/cosmwasmpool/client"
Expand All @@ -50,8 +52,12 @@ import (
"github.com/osmosis-labs/osmosis/v27/x/gamm"
gammclient "github.com/osmosis-labs/osmosis/v27/x/gamm/client"
"github.com/osmosis-labs/osmosis/v27/x/ibc-rate-limit/ibcratelimitmodule"
"github.com/osmosis-labs/osmosis/v27/x/icacallbacks"
"github.com/osmosis-labs/osmosis/v27/x/icaoracle"
"github.com/osmosis-labs/osmosis/v27/x/icqoracle"
"github.com/osmosis-labs/osmosis/v27/x/incentives"
incentivesclient "github.com/osmosis-labs/osmosis/v27/x/incentives/client"
"github.com/osmosis-labs/osmosis/v27/x/interchainquery"
"github.com/osmosis-labs/osmosis/v27/x/lockup"
"github.com/osmosis-labs/osmosis/v27/x/market"
"github.com/osmosis-labs/osmosis/v27/x/mint"
Expand All @@ -61,7 +67,9 @@ import (
poolmanagerclient "github.com/osmosis-labs/osmosis/v27/x/poolmanager/client"
poolmanager "github.com/osmosis-labs/osmosis/v27/x/poolmanager/module"
"github.com/osmosis-labs/osmosis/v27/x/protorev"
superfluid "github.com/osmosis-labs/osmosis/v27/x/superfluid"
"github.com/osmosis-labs/osmosis/v27/x/records"
"github.com/osmosis-labs/osmosis/v27/x/stakeibc"
"github.com/osmosis-labs/osmosis/v27/x/superfluid"
superfluidclient "github.com/osmosis-labs/osmosis/v27/x/superfluid/client"
"github.com/osmosis-labs/osmosis/v27/x/tokenfactory"
"github.com/osmosis-labs/osmosis/v27/x/treasury"
Expand Down Expand Up @@ -140,4 +148,12 @@ var AppModuleBasics = module.NewBasicManager(
auction.AppModuleBasic{},
smartaccount.AppModuleBasic{},
stablestaking.AppModuleBasic{},
stakeibc.AppModuleBasic{},
icacallbacks.AppModuleBasic{},
records.AppModuleBasic{},
icaoracle.AppModuleBasic{},
claim.AppModuleBasic{},
interchainquery.AppModuleBasic{},
icqoracle.AppModuleBasic{},
autopilot.AppModuleBasic{},
)
39 changes: 39 additions & 0 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,25 @@ import (
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
icq "github.com/cosmos/ibc-apps/modules/async-icq/v8"
ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v8"
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v8/types"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
ccvconsumertypes "github.com/cosmos/interchain-security/v6/x/ccv/consumer/types"
"github.com/osmosis-labs/osmosis/v27/x/autopilot"
autopilottypes "github.com/osmosis-labs/osmosis/v27/x/autopilot/types"
"github.com/osmosis-labs/osmosis/v27/x/icacallbacks"
icacallbackstypes "github.com/osmosis-labs/osmosis/v27/x/icacallbacks/types"
"github.com/osmosis-labs/osmosis/v27/x/icaoracle"
icaoracletypes "github.com/osmosis-labs/osmosis/v27/x/icaoracle/types"
"github.com/osmosis-labs/osmosis/v27/x/icqoracle"
"github.com/osmosis-labs/osmosis/v27/x/interchainquery"
"github.com/osmosis-labs/osmosis/v27/x/market"
markettypes "github.com/osmosis-labs/osmosis/v27/x/market/types"
"github.com/osmosis-labs/osmosis/v27/x/oracle"
oracletypes "github.com/osmosis-labs/osmosis/v27/x/oracle/types"
"github.com/osmosis-labs/osmosis/v27/x/records"
recordsmoduletypes "github.com/osmosis-labs/osmosis/v27/x/records/types"
"github.com/osmosis-labs/osmosis/v27/x/stakeibc"
"github.com/osmosis-labs/osmosis/v27/x/treasury"
treasurytypes "github.com/osmosis-labs/osmosis/v27/x/treasury/types"

Expand Down Expand Up @@ -82,6 +96,7 @@ import (
appparams "github.com/osmosis-labs/osmosis/v27/app/params"
_ "github.com/osmosis-labs/osmosis/v27/client/docs/statik"
"github.com/osmosis-labs/osmosis/v27/simulation/simtypes"
claimtypes "github.com/osmosis-labs/osmosis/v27/x/claim/types"
concentratedliquidity "github.com/osmosis-labs/osmosis/v27/x/concentrated-liquidity/clmodule"
concentratedliquiditytypes "github.com/osmosis-labs/osmosis/v27/x/concentrated-liquidity/types"
cwpoolmodule "github.com/osmosis-labs/osmosis/v27/x/cosmwasmpool/module"
Expand All @@ -92,6 +107,7 @@ import (
gammtypes "github.com/osmosis-labs/osmosis/v27/x/gamm/types"
"github.com/osmosis-labs/osmosis/v27/x/ibc-rate-limit/ibcratelimitmodule"
ibcratelimittypes "github.com/osmosis-labs/osmosis/v27/x/ibc-rate-limit/types"
icqoracletypes "github.com/osmosis-labs/osmosis/v27/x/icqoracle/types"
"github.com/osmosis-labs/osmosis/v27/x/incentives"
incentivestypes "github.com/osmosis-labs/osmosis/v27/x/incentives/types"
"github.com/osmosis-labs/osmosis/v27/x/lockup"
Expand All @@ -108,6 +124,7 @@ import (
stablestakingincentivestypes "github.com/osmosis-labs/osmosis/v27/x/stable-staking-incentives/types"
"github.com/osmosis-labs/osmosis/v27/x/stablestaking"
stablestakingtypes "github.com/osmosis-labs/osmosis/v27/x/stablestaking/types"
stakeibctypes "github.com/osmosis-labs/osmosis/v27/x/stakeibc/types"
superfluid "github.com/osmosis-labs/osmosis/v27/x/superfluid"
superfluidtypes "github.com/osmosis-labs/osmosis/v27/x/superfluid/types"
"github.com/osmosis-labs/osmosis/v27/x/tokenfactory"
Expand All @@ -127,6 +144,7 @@ var moduleAccountPermissions = map[string][]string{
distrtypes.ModuleName: nil,
ibchookstypes.ModuleName: nil,
icatypes.ModuleName: nil,
claimtypes.ModuleName: nil,
icqtypes.ModuleName: nil,
minttypes.ModuleName: {authtypes.Minter, authtypes.Burner},
minttypes.DeveloperVestingModuleAcctName: nil,
Expand Down Expand Up @@ -155,6 +173,9 @@ var moduleAccountPermissions = map[string][]string{
cosmwasmpooltypes.ModuleName: nil,
auctiontypes.ModuleName: nil,
smartaccounttypes.ModuleName: nil,
stakeibctypes.ModuleName: {authtypes.Minter, authtypes.Burner, authtypes.Staking},
stakeibctypes.RewardCollectorName: nil,
icqoracletypes.ModuleName: nil,
}

// appModules return modules to initialize module manager.
Expand Down Expand Up @@ -227,6 +248,14 @@ func appModules(
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
auction.NewAppModule(appCodec, *app.AuctionKeeper),
smartaccount.NewAppModule(appCodec, *app.SmartAccountKeeper),
ratelimit.NewAppModule(appCodec, *app.RatelimitKeeper),
icacallbacks.NewAppModule(appCodec, *app.IcacallbacksKeeper, app.AccountKeeper, app.BankKeeper),
icqoracle.NewAppModule(appCodec, *app.ICQOracleKeeper),
interchainquery.NewAppModule(appCodec, *app.InterchainqueryKeeper),
records.NewAppModule(appCodec, *app.RecordsKeeper, app.AccountKeeper, app.BankKeeper),
icaoracle.NewAppModule(appCodec, *app.ICAOracleKeeper),
stakeibc.NewAppModule(appCodec, *app.StakeIbcKeeper, app.AccountKeeper, app.BankKeeper),
autopilot.NewAppModule(appCodec, *app.AutopilotKeeper),
}
}

Expand Down Expand Up @@ -326,6 +355,16 @@ func OrderInitGenesis(allModuleNames []string) []string {
cosmwasmpooltypes.ModuleName,
auctiontypes.ModuleName,
stablestakingtypes.ModuleName,
// stride modules
icaoracletypes.ModuleName,
stakeibctypes.ModuleName,
icacallbackstypes.ModuleName,
ratelimittypes.ModuleName,
recordsmoduletypes.ModuleName,
icqoracletypes.ModuleName,
autopilottypes.ModuleName,
claimtypes.ModuleName,
ccvconsumertypes.ModuleName,
}
}

Expand Down
16 changes: 16 additions & 0 deletions client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@
}
}
},
{
"url": "./tmp-swagger-gen/symphony/stakeibc/query.swagger.json",
"operationIds": {
"rename": {
"Params": "StakeIbcParams"
}
}
},
{
"url": "./tmp-swagger-gen/symphony/stakeibc/tx.swagger.json",
"operationIds": {
"rename": {
"Params": "StakeIbcTxParams"
}
}
},
{
"url": "./tmp-swagger-gen/symphony/market/v1beta1/query.swagger.json",
"operationIds": {
Expand Down
Loading