Skip to content

Commit

Permalink
Merge branch 'merge_duality_neutron' into fix_coin_add
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Nov 13, 2023
2 parents ffc8bd2 + 0afa726 commit 7dd4800
Show file tree
Hide file tree
Showing 113 changed files with 123 additions and 21,967 deletions.
55 changes: 1 addition & 54 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,6 @@ import (
dexkeeper "github.com/neutron-org/neutron/x/dex/keeper"
dextypes "github.com/neutron-org/neutron/x/dex/types"

"github.com/neutron-org/neutron/x/incentives"
incentiveskeeper "github.com/neutron-org/neutron/x/incentives/keeper"
incentivestypes "github.com/neutron-org/neutron/x/incentives/types"

"github.com/neutron-org/neutron/x/epochs"
epochskeeper "github.com/neutron-org/neutron/x/epochs/keeper"
epochstypes "github.com/neutron-org/neutron/x/epochs/types"

"github.com/neutron-org/neutron/x/ibcswap"
ibcswapkeeper "github.com/neutron-org/neutron/x/ibcswap/keeper"
ibcswaptypes "github.com/neutron-org/neutron/x/ibcswap/types"
Expand Down Expand Up @@ -238,8 +230,6 @@ var (
globalfee.AppModule{},
dex.AppModuleBasic{},
ibcswap.AppModuleBasic{},
epochs.AppModuleBasic{},
incentives.AppModuleBasic{},
)

// module account permissions
Expand All @@ -257,7 +247,6 @@ var (
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
crontypes.ModuleName: nil,
dextypes.ModuleName: {authtypes.Minter, authtypes.Burner},
incentivestypes.ModuleName: nil,
ibcswaptypes.ModuleName: {authtypes.Burner},
}
)
Expand Down Expand Up @@ -324,8 +313,6 @@ type App struct {
RouterKeeper *routerkeeper.Keeper
DexKeeper dexkeeper.Keeper
SwapKeeper ibcswapkeeper.Keeper
IncentivesKeeper *incentiveskeeper.Keeper
EpochsKeeper *epochskeeper.Keeper

RouterModule router.AppModule

Expand Down Expand Up @@ -410,7 +397,7 @@ func New(
icahosttypes.StoreKey, capabilitytypes.StoreKey,
interchainqueriesmoduletypes.StoreKey, contractmanagermoduletypes.StoreKey, interchaintxstypes.StoreKey, wasmtypes.StoreKey, feetypes.StoreKey,
feeburnertypes.StoreKey, adminmoduletypes.StoreKey, ccvconsumertypes.StoreKey, tokenfactorytypes.StoreKey, routertypes.StoreKey,
crontypes.StoreKey, ibchookstypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey, auctiontypes.StoreKey, dextypes.StoreKey, incentivestypes.StoreKey, epochstypes.StoreKey,
crontypes.StoreKey, ibchookstypes.StoreKey, consensusparamtypes.StoreKey, crisistypes.StoreKey, auctiontypes.StoreKey, dextypes.StoreKey,
)
tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey)
memKeys := sdk.NewMemoryStoreKeys(capabilitytypes.MemStoreKey, feetypes.MemStoreKey)
Expand Down Expand Up @@ -652,38 +639,6 @@ func New(

swapModule := ibcswap.NewAppModule(app.SwapKeeper)

app.EpochsKeeper = epochskeeper.NewKeeper(keys[epochstypes.StoreKey])

app.IncentivesKeeper = incentiveskeeper.NewKeeper(
keys[incentivestypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.EpochsKeeper,
app.DexKeeper,
authtypes.NewModuleAddress(adminmoduletypes.ModuleName).String(),
)

app.IncentivesKeeper.SetHooks(
incentivestypes.NewMultiIncentiveHooks(
// insert Incentives hooks receivers here
),
)

incentivesModule := incentives.NewAppModule(
app.IncentivesKeeper,
app.AccountKeeper,
app.BankKeeper,
app.EpochsKeeper,
)

app.EpochsKeeper.SetHooks(epochstypes.NewMultiEpochHooks(
app.IncentivesKeeper.Hooks(),
))

// NB: This must be initialized AFTER app.EpochsKeeper.SetHooks() because otherwise
// we dereference an out-of-date EpochsKeeper.
epochsModule := epochs.NewAppModule(*app.EpochsKeeper)

wasmDir := filepath.Join(homePath, "wasm")
wasmConfig, err := wasm.ReadWasmConfig(appOpts)
if err != nil {
Expand Down Expand Up @@ -858,8 +813,6 @@ func New(
auction.NewAppModule(appCodec, app.AuctionKeeper),
swapModule,
dexModule,
incentivesModule,
epochsModule,
crisis.NewAppModule(&app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them
)

Expand Down Expand Up @@ -897,8 +850,6 @@ func New(
crontypes.ModuleName,
globalfee.ModuleName,
ibcswaptypes.ModuleName,
incentivestypes.ModuleName,
epochstypes.ModuleName,
dextypes.ModuleName,
)

Expand Down Expand Up @@ -932,8 +883,6 @@ func New(
crontypes.ModuleName,
globalfee.ModuleName,
ibcswaptypes.ModuleName,
incentivestypes.ModuleName,
epochstypes.ModuleName,
// NOTE: Because of the gas sensitivity of PurgeExpiredLimit order operations
// dexmodule must be the last endBlock module to run
dextypes.ModuleName,
Expand Down Expand Up @@ -975,8 +924,6 @@ func New(
globalfee.ModuleName,
ibcswaptypes.ModuleName,
dextypes.ModuleName,
incentivestypes.ModuleName,
epochstypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand Down
2 changes: 0 additions & 2 deletions app/proposals_allowlisting.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
dextypes "github.com/neutron-org/neutron/x/dex/types"
feeburnertypes "github.com/neutron-org/neutron/x/feeburner/types"
feerefundertypes "github.com/neutron-org/neutron/x/feerefunder/types"
incentivestypes "github.com/neutron-org/neutron/x/incentives/types"
interchainqueriestypes "github.com/neutron-org/neutron/x/interchainqueries/types"
interchaintxstypes "github.com/neutron-org/neutron/x/interchaintxs/types"
tokenfactorytypes "github.com/neutron-org/neutron/x/tokenfactory/types"
Expand Down Expand Up @@ -63,7 +62,6 @@ func isSdkMessageWhitelisted(msg sdk.Msg) bool {
*feerefundertypes.MsgUpdateParams,
*crontypes.MsgUpdateParams,
*contractmanagertypes.MsgUpdateParams,
*incentivestypes.MsgUpdateParams,
*dextypes.MsgUpdateParams:
return true
}
Expand Down
6 changes: 1 addition & 5 deletions app/upgrades/nextupgrade/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ import (
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
"github.com/neutron-org/neutron/app/upgrades"
auctiontypes "github.com/skip-mev/block-sdk/x/auction/types"
dextypes "github.com/neutron-org/neutron/x/dex/types"
epochstypes "github.com/neutron-org/neutron/x/epochs/types"
incentivestypes "github.com/neutron-org/neutron/x/incentives/types"
auctiontypes "github.com/skip-mev/block-sdk/x/auction/types"
)

const (
Expand All @@ -25,8 +23,6 @@ var Upgrade = upgrades.Upgrade{
crisistypes.ModuleName,
auctiontypes.ModuleName,
dextypes.ModuleName,
incentivestypes.ModuleName,
epochstypes.ModuleName,
},
},
}
2 changes: 1 addition & 1 deletion network/init-neutrond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ set_genesis_param_jq ".app_state.globalfee.params.bypass_min_fee_msg_types" "$BY
set_genesis_param proposer_fee "\"0.25\"" # builder(POB)
set_genesis_param escrow_account_address "\"$DAO_CONTRACT_ADDRESS_B64\"," # builder(POB)
set_genesis_param sudo_call_gas_limit "\"1000000\"" # contractmanager
set_genesis_param max_gas "\"40000000\"" # consensus_params
set_genesis_param max_gas "\"1000000000\"" # consensus_params

if ! jq -e . "$GENESIS_PATH" >/dev/null 2>&1; then
echo "genesis appears to become incorrect json" >&2
Expand Down
4 changes: 2 additions & 2 deletions proto/neutron/dex/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ message MsgDeposit {
(gogoproto.moretags) = "yaml:\"amountsA\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "amountA"
(gogoproto.jsontag) = "amountsA"
];
repeated string amountsB = 6 [
(gogoproto.moretags) = "yaml:\"amountsB\"",
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
(gogoproto.nullable) = false,
(gogoproto.jsontag) = "amountB"
(gogoproto.jsontag) = "amountsB"
];
repeated int64 tickIndexesAToB = 7;
repeated uint64 fees = 8;
Expand Down
72 changes: 0 additions & 72 deletions proto/neutron/epochs/genesis.proto

This file was deleted.

30 changes: 0 additions & 30 deletions proto/neutron/epochs/query.proto

This file was deleted.

19 changes: 0 additions & 19 deletions proto/neutron/incentives/account_history.proto

This file was deleted.

Loading

0 comments on commit 7dd4800

Please sign in to comment.