Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(CL): move id management and pool creation to swaprouter #3170

Merged
merged 53 commits into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1cbe727
refactor(CL): move id management and pool creation to swaprouter
p0mvn Oct 26, 2022
37b4000
gamm genesis
p0mvn Oct 26, 2022
fdc7e57
try fixing sim
p0mvn Oct 26, 2022
fd1bf86
Merge branch 'concentrated-liquidity-main' into roman/pool-id-refactor
p0mvn Oct 26, 2022
a4902e1
lint
p0mvn Oct 26, 2022
0c2fa2d
basic create test
p0mvn Oct 26, 2022
0d09104
fix TestExitPool
p0mvn Oct 26, 2022
13f6178
fix gamm queries
p0mvn Oct 26, 2022
313a229
swaprouter genesis test
p0mvn Oct 26, 2022
ddcdf11
Update x/swaprouter/types/params.go
p0mvn Oct 26, 2022
dc2daae
fix tests
p0mvn Oct 26, 2022
209598b
migrations
p0mvn Oct 27, 2022
9e40ddc
remove build tags
p0mvn Oct 29, 2022
6b1380b
fix e2e
p0mvn Oct 30, 2022
cd906d5
fix simulation
p0mvn Oct 30, 2022
65a811f
Merge branch 'concentrated-liquidity-main' into roman/pool-id-refactor
p0mvn Oct 30, 2022
78d7065
Adam's comments
p0mvn Oct 30, 2022
338c7ec
lint
p0mvn Oct 30, 2022
e0cec6c
migrations
p0mvn Nov 1, 2022
7e37df7
updates
p0mvn Nov 1, 2022
4846dfe
Update x/gamm/keeper/pool.go
p0mvn Nov 1, 2022
7679212
remove gamm parameters from constructor
p0mvn Nov 1, 2022
8011868
type check early
p0mvn Nov 1, 2022
0fc22b6
move max and min pool assets to swaprouter
p0mvn Nov 1, 2022
d71d5d1
add second test case for create pool
p0mvn Nov 1, 2022
f7378f2
fix migrations
p0mvn Nov 1, 2022
70bf005
Merge branch 'concentrated-liquidity-main' into roman/pool-id-refactor
p0mvn Nov 1, 2022
9ef25d4
lint
p0mvn Nov 1, 2022
bb4b173
add test
p0mvn Nov 1, 2022
e81973e
Add prints
ValarDragon Nov 1, 2022
10c1fe5
fix(e2e): various e2e build issues breaking debugging on linux amd64 …
p0mvn Nov 2, 2022
6cdca82
test
p0mvn Nov 2, 2022
2b9d461
Merge branch 'concentrated-liquidity-main' into roman/pool-id-refactor
p0mvn Nov 2, 2022
f5c7125
Revert "test"
p0mvn Nov 2, 2022
12d89e5
fix num pools query
p0mvn Nov 3, 2022
fa01c96
fix query, add e2e test
p0mvn Nov 3, 2022
029df67
skip e2e migration tests
p0mvn Nov 3, 2022
31a8d5d
try fixing migrations
p0mvn Nov 3, 2022
953c68b
Merge branch 'concentrated-liquidity-main' into roman/pool-id-refactor
p0mvn Nov 3, 2022
c1ddd63
Update proto/osmosis/gamm/v1beta1/genesis.proto
p0mvn Nov 3, 2022
87cedfb
remove wrap
p0mvn Nov 3, 2022
c444131
whitelist num pools in swaprouter
p0mvn Nov 3, 2022
e32e3ce
update comment
p0mvn Nov 3, 2022
7a95013
regen proto
p0mvn Nov 3, 2022
3cb25bd
try fixing simulation
p0mvn Nov 3, 2022
7669d96
query swaprouter in e2e pools
p0mvn Nov 3, 2022
d2873ae
regen query proto
p0mvn Nov 3, 2022
b998499
remove migrations test
p0mvn Nov 3, 2022
a8b04bd
update proto comment
p0mvn Nov 3, 2022
2733c68
configure address
p0mvn Nov 3, 2022
8fdb6c1
Update x/swaprouter/keeper.go
p0mvn Nov 3, 2022
8653dd7
update spec
p0mvn Nov 3, 2022
7403ccc
remove addressed TODOs
p0mvn Nov 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/apptesting/gamm.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (s *KeeperTestHelper) PrepareBalancerPoolWithPoolParams(poolParams balancer
},
}
msg := balancer.NewMsgCreateBalancerPool(s.TestAccs[0], poolParams, poolAssets, "")
poolId, err := s.App.GAMMKeeper.CreatePool(s.Ctx, msg)
poolId, err := s.App.SwapRouterKeeper.CreatePool(s.Ctx, msg)
s.NoError(err)
return poolId
}
Expand All @@ -107,7 +107,7 @@ func (s *KeeperTestHelper) PrepareBalancerPoolWithPoolAsset(assets []balancer.Po
SwapFee: sdk.ZeroDec(),
ExitFee: sdk.ZeroDec(),
}, assets, "")
poolId, err := s.App.GAMMKeeper.CreatePool(s.Ctx, msg)
poolId, err := s.App.SwapRouterKeeper.CreatePool(s.Ctx, msg)
s.NoError(err)
return poolId
}
Expand Down
4 changes: 2 additions & 2 deletions app/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (s *KeeperTestHelper) SetupGammPoolsWithBondDenomMultiplier(multipliers []s
// TODO: use sdk crypto instead of tendermint to generate address
acc1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes())

params := s.App.GAMMKeeper.GetParams(s.Ctx)
params := s.App.SwapRouterKeeper.GetParams(s.Ctx)

pools := []gammtypes.PoolI{}
for index, multiplier := range multipliers {
Expand Down Expand Up @@ -280,7 +280,7 @@ func (s *KeeperTestHelper) SetupGammPoolsWithBondDenomMultiplier(multipliers []s
}
msg := balancer.NewMsgCreateBalancerPool(acc1, poolParams, poolAssets, defaultFutureGovernor)

poolId, err := s.App.GAMMKeeper.CreatePool(s.Ctx, msg)
poolId, err := s.App.SwapRouterKeeper.CreatePool(s.Ctx, msg)
s.Require().NoError(err)

pool, err := s.App.GAMMKeeper.GetPoolAndPoke(s.Ctx, poolId)
Expand Down
14 changes: 12 additions & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers(

gammKeeper := gammkeeper.NewKeeper(
appCodec, appKeepers.keys[gammtypes.StoreKey],
appKeepers.GetSubspace(gammtypes.ModuleName),
appKeepers.AccountKeeper, appKeepers.BankKeeper, appKeepers.DistrKeeper)
appKeepers.GAMMKeeper = &gammKeeper

Expand All @@ -265,6 +264,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.GetSubspace(swaproutertypes.ModuleName),
appKeepers.GAMMKeeper,
appKeepers.ConcentratedLiquidityKeeper,
appKeepers.BankKeeper,
appKeepers.AccountKeeper,
appKeepers.DistrKeeper,
p0mvn marked this conversation as resolved.
Show resolved Hide resolved
)

appKeepers.LockupKeeper = lockupkeeper.NewKeeper(
Expand Down Expand Up @@ -320,7 +322,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.BankKeeper,
appKeepers.IncentivesKeeper,
appKeepers.DistrKeeper,
appKeepers.GAMMKeeper,
appKeepers.SwapRouterKeeper,
)
appKeepers.PoolIncentivesKeeper = &poolIncentivesKeeper

Expand Down Expand Up @@ -482,6 +484,14 @@ func (appKeepers *AppKeepers) SetupHooks() {
),
)

appKeepers.SwapRouterKeeper.SetPoolCreationListeners(
swaproutertypes.NewPoolCreationListeners(
// insert gamm hooks receivers here
appKeepers.PoolIncentivesKeeper.Hooks(),
appKeepers.TwapKeeper.PoolCreationListeners(),
),
)

appKeepers.LockupKeeper.SetHooks(
lockuptypes.NewMultiLockupHooks(
// insert lockup hooks receivers here
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v12/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func CreateUpgradeHandler(
keepers.ICAHostKeeper.SetParams(ctx, hostParams)

// Initialize TWAP state
latestPoolId := keepers.GAMMKeeper.GetNextPoolId(ctx) - 1
latestPoolId := keepers.SwapRouterKeeper.GetNextPoolId(ctx) - 1
err := keepers.TwapKeeper.MigrateExistingPools(ctx, latestPoolId)
if err != nil {
return nil, err
Expand Down
12 changes: 12 additions & 0 deletions app/upgrades/v13/export_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package v13

import (
sdk "github.com/cosmos/cosmos-sdk/types"

gammkeeper "github.com/osmosis-labs/osmosis/v12/x/gamm/keeper"
swaprouterkeeper "github.com/osmosis-labs/osmosis/v12/x/swaprouter"
)

func MigrateNextPoolId(ctx sdk.Context, gammKeeper *gammkeeper.Keeper, swaprouterKeeper *swaprouterkeeper.Keeper) {
migrateNextPoolId(ctx, gammKeeper, swaprouterKeeper)
}
15 changes: 15 additions & 0 deletions app/upgrades/v13/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import (

"github.com/osmosis-labs/osmosis/v12/app/keepers"
"github.com/osmosis-labs/osmosis/v12/app/upgrades"
gammkeeper "github.com/osmosis-labs/osmosis/v12/x/gamm/keeper"
lockuptypes "github.com/osmosis-labs/osmosis/v12/x/lockup/types"
swaprouterkeeper "github.com/osmosis-labs/osmosis/v12/x/swaprouter"
swaproutertypes "github.com/osmosis-labs/osmosis/v12/x/swaprouter/types"
)

Expand All @@ -20,6 +22,19 @@ func CreateUpgradeHandler(
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
keepers.LockupKeeper.SetParams(ctx, lockuptypes.DefaultParams())
keepers.SwapRouterKeeper.SetParams(ctx, swaproutertypes.DefaultParams())

// N.B: pool id in gamm is to be deprecated in the future
// Instead,it is moved to swaprouter.
migrateNextPoolId(ctx, keepers.GAMMKeeper, keepers.SwapRouterKeeper)

return mm.RunMigrations(ctx, configurator, fromVM)
}
}

func migrateNextPoolId(ctx sdk.Context, gammKeeper *gammkeeper.Keeper, swaprouterKeeper *swaprouterkeeper.Keeper) {
// N.B: pool id in gamm is to be deprecated in the future
// Instead,it is moved to swaprouter.
nextPoolId := gammKeeper.GetNextPoolId(ctx)
gammKeeper.SetPoolCount(ctx, nextPoolId-1)
swaprouterKeeper.SetNextPoolId(ctx, nextPoolId)
}
53 changes: 53 additions & 0 deletions app/upgrades/v13/upgrades_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package v13_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/osmosis-labs/osmosis/v12/app/apptesting"

v13 "github.com/osmosis-labs/osmosis/v12/app/upgrades/v13"
)

type UpgradeTestSuite struct {
apptesting.KeeperTestHelper
}

func (suite *UpgradeTestSuite) SetupTest() {
suite.Setup()
}

func TestUpgradeSuite(t *testing.T) {
suite.Run(t, new(UpgradeTestSuite))
}

func (suite *UpgradeTestSuite) TestMigrateNextPoolIdAndCreatePool() {
suite.SetupTest() // reset

const (
expectedNextPoolId uint64 = 3
)

ctx := suite.Ctx
gammKeeper := suite.App.GAMMKeeper
swaprouterKeeper := suite.App.SwapRouterKeeper

// prepate two pools
gammKeeper.SetNextPoolId(ctx, expectedNextPoolId)

// system under test.
v13.MigrateNextPoolId(ctx, gammKeeper, swaprouterKeeper)

// validate swaprouter's next pool id.
actualNextPoolId := swaprouterKeeper.GetNextPoolId(ctx)
suite.Require().Equal(expectedNextPoolId, actualNextPoolId)

// validate gamm pool count.
actualGammPoolCount := gammKeeper.GetPoolCount(ctx)
suite.Require().Equal(expectedNextPoolId-1, actualGammPoolCount)

// create a pool after migration.
actualCreatedPoolId := suite.PrepareBalancerPool()
suite.Require().Equal(expectedNextPoolId, actualCreatedPoolId)
}
15 changes: 3 additions & 12 deletions proto/osmosis/gamm/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,15 @@ package osmosis.gamm.v1beta1;
import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";

// Params holds parameters for the incentives module
message Params {
repeated cosmos.base.v1beta1.Coin pool_creation_fee = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "yaml:\"pool_creation_fee\"",
(gogoproto.nullable) = false
];
}

option go_package = "github.com/osmosis-labs/osmosis/v12/x/gamm/types";

// GenesisState defines the gamm module's genesis state.
message GenesisState {
repeated google.protobuf.Any pools = 1
[ (cosmos_proto.accepts_interface) = "PoolI" ];
// will be renamed to next_pool_id in an upcoming version
// next poold_id = 2. TODO: deprecate by adding: reserved 7;
p0mvn marked this conversation as resolved.
Show resolved Hide resolved
p0mvn marked this conversation as resolved.
Show resolved Hide resolved
uint64 next_pool_number = 2;
Params params = 3 [ (gogoproto.nullable) = false ];
// gamm pool count
uint64 pool_count = 3;
}
13 changes: 11 additions & 2 deletions proto/osmosis/swaprouter/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,23 @@ import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";

option go_package = "github.com/osmosis-labs/osmosis/v12/x/swaprouter/types";

// Params holds parameters for the swaprouter module
message Params {}
message Params {
repeated cosmos.base.v1beta1.Coin pool_creation_fee = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.moretags) = "yaml:\"pool_creation_fee\"",
(gogoproto.nullable) = false
];
}

// GenesisState defines the swaprouter module's genesis state.
message GenesisState {
// the next_pool_id
uint64 next_pool_id = 1;
// params is the container of swaprouter parameters.
Params params = 1 [ (gogoproto.nullable) = false ];
Params params = 2 [ (gogoproto.nullable) = false ];
}
10 changes: 10 additions & 0 deletions proto/osmosis/swaprouter/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ service Query {
option (google.api.http).get =
"/osmosis/gamm/v1beta1/{pool_id}/estimate/swap_exact_amount_out";
}

rpc NumPools(NumPoolsRequest) returns (NumPoolsResponse) {
option (google.api.http).get = "/osmosis/gamm/v1beta1/num_pools";
}
}

//=============================== Params
Expand Down Expand Up @@ -75,3 +79,9 @@ message EstimateSwapExactAmountOutResponse {
(gogoproto.nullable) = false
];
}

//=============================== NumPools
message NumPoolsRequest {}
message NumPoolsResponse {
uint64 num_pools = 1 [ (gogoproto.moretags) = "yaml:\"num_pools\"" ];
}
5 changes: 5 additions & 0 deletions proto/osmosis/swaprouter/v1beta1/query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ queries:
query_func: "k.EstimateSwapExactAmountOut"
cli:
cmd: "EstimateSwapExactAmountOut"
NumPools:
proto_wrapper:
query_func: "k.NumPools"
cli:
cmd: "NumPools"
17 changes: 13 additions & 4 deletions tests/e2e/configurer/chain/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,25 @@ import (
appparams "github.com/osmosis-labs/osmosis/v12/app/params"
"github.com/osmosis-labs/osmosis/v12/tests/e2e/configurer/config"
"github.com/osmosis-labs/osmosis/v12/tests/e2e/util"
gammtypes "github.com/osmosis-labs/osmosis/v12/x/gamm/types"
lockuptypes "github.com/osmosis-labs/osmosis/v12/x/lockup/types"
swaprouterqueryproto "github.com/osmosis-labs/osmosis/v12/x/swaprouter/client/queryproto"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
)

func (n *NodeConfig) CreatePool(poolFile, from string) uint64 {
// TODO: deprecate isLegacy after concentrated-liquidity is released.
// It is needed because pool creation module is different before and after
// concentrated-liquidity upgrade.
func (n *NodeConfig) CreatePool(poolFile, from string, isLegacy bool) uint64 {
n.LogActionF("creating pool from file %s", poolFile)
cmd := []string{"osmosisd", "tx", "gamm", "create-pool", fmt.Sprintf("--pool-file=/osmosis/%s", poolFile), fmt.Sprintf("--from=%s", from)}

moduleName := "swaprouter"
if isLegacy {
moduleName = "gamm"
}

cmd := []string{"osmosisd", "tx", moduleName, "create-pool", fmt.Sprintf("--pool-file=/osmosis/%s", poolFile), fmt.Sprintf("--from=%s", from)}
_, _, err := n.containerManager.ExecTxCmd(n.t, n.chainId, n.Name, cmd)
require.NoError(n.t, err)

Expand All @@ -30,7 +39,7 @@ func (n *NodeConfig) CreatePool(poolFile, from string) uint64 {
bz, err := n.QueryGRPCGateway(path)
require.NoError(n.t, err)

var numPools gammtypes.QueryNumPoolsResponse
var numPools swaprouterqueryproto.NumPoolsResponse
err = util.Cdc.UnmarshalJSON(bz, &numPools)
require.NoError(n.t, err)
poolID := numPools.NumPools
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/configurer/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ func (uc *UpgradeConfigurer) CreatePreUpgradeState() error {
chainA.SendIBC(chainB, chainB.NodeConfigs[0].PublicAddress, initialization.StakeToken)
chainB.SendIBC(chainA, chainA.NodeConfigs[0].PublicAddress, initialization.StakeToken)

chainANode.CreatePool("pool1A.json", initialization.ValidatorWalletName)
chainBNode.CreatePool("pool1B.json", initialization.ValidatorWalletName)
chainANode.CreatePool("pool1A.json", initialization.ValidatorWalletName, true)
chainBNode.CreatePool("pool1B.json", initialization.ValidatorWalletName, true)

// enable superfluid assets on chainA
chainA.EnableSuperfluidAsset("gamm/pool/1")
Expand Down
3 changes: 0 additions & 3 deletions tests/e2e/e2e_setup_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build e2e
// +build e2e

package e2e

import (
Expand Down
11 changes: 4 additions & 7 deletions tests/e2e/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build e2e
// +build e2e

package e2e

import (
Expand Down Expand Up @@ -34,7 +31,7 @@ func (s *IntegrationTestSuite) TestIBCTokenTransferAndCreatePool() {

chainANode, err := chainA.GetDefaultNode()
s.NoError(err)
chainANode.CreatePool("ibcDenomPool.json", initialization.ValidatorWalletName)
chainANode.CreatePool("ibcDenomPool.json", initialization.ValidatorWalletName, false)
}

// TestSuperfluidVoting tests that superfluid voting is functioning as expected.
Expand All @@ -49,7 +46,7 @@ func (s *IntegrationTestSuite) TestSuperfluidVoting() {
chainANode, err := chainA.GetDefaultNode()
s.NoError(err)

poolId := chainANode.CreatePool("nativeDenomPool.json", chainA.NodeConfigs[0].PublicAddress)
poolId := chainANode.CreatePool("nativeDenomPool.json", chainA.NodeConfigs[0].PublicAddress, false)

// enable superfluid assets
chainA.EnableSuperfluidAsset(fmt.Sprintf("gamm/pool/%d", poolId))
Expand Down Expand Up @@ -132,7 +129,7 @@ func (s *IntegrationTestSuite) TestAddToExistingLock() {
s.NoError(err)
// ensure we can add to new locks and superfluid locks
// create pool and enable superfluid assets
poolId := chainANode.CreatePool("nativeDenomPool.json", chainA.NodeConfigs[0].PublicAddress)
poolId := chainANode.CreatePool("nativeDenomPool.json", chainA.NodeConfigs[0].PublicAddress, false)
chainA.EnableSuperfluidAsset(fmt.Sprintf("gamm/pool/%d", poolId))

// setup wallets and send gamm tokens to these wallets on chainA
Expand Down Expand Up @@ -171,7 +168,7 @@ func (s *IntegrationTestSuite) TestTWAP() {
s.NoError(err)

// Triggers the creation of TWAP records.
poolId := chainANode.CreatePool(poolFile, initialization.ValidatorWalletName)
poolId := chainANode.CreatePool(poolFile, initialization.ValidatorWalletName, false)
swapWalletAddr := chainANode.CreateWallet(walletName)

timeBeforeSwap := chainANode.QueryLatestBlockTime()
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/initialization/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ import (
tmjson "github.com/tendermint/tendermint/libs/json"

epochtypes "github.com/osmosis-labs/osmosis/v12/x/epochs/types"
gammtypes "github.com/osmosis-labs/osmosis/v12/x/gamm/types"
incentivestypes "github.com/osmosis-labs/osmosis/v12/x/incentives/types"
minttypes "github.com/osmosis-labs/osmosis/v12/x/mint/types"
poolitypes "github.com/osmosis-labs/osmosis/v12/x/pool-incentives/types"
swaproutertypes "github.com/osmosis-labs/osmosis/v12/x/swaprouter/types"
twaptypes "github.com/osmosis-labs/osmosis/v12/x/twap/types"
txfeestypes "github.com/osmosis-labs/osmosis/v12/x/txfees/types"

Expand Down Expand Up @@ -242,7 +242,7 @@ func initGenesis(chain *internalChain, votingPeriod, expeditedVotingPeriod time.
return err
}

err = updateModuleGenesis(appGenState, gammtypes.ModuleName, &gammtypes.GenesisState{}, updateGammGenesis)
err = updateModuleGenesis(appGenState, swaproutertypes.ModuleName, &swaproutertypes.GenesisState{}, updateSwaprouterGenesis)
if err != nil {
return err
}
Expand Down Expand Up @@ -352,7 +352,7 @@ func updateTxfeesGenesis(txfeesGenState *txfeestypes.GenesisState) {
txfeesGenState.Basedenom = OsmoDenom
}

func updateGammGenesis(gammGenState *gammtypes.GenesisState) {
func updateSwaprouterGenesis(gammGenState *swaproutertypes.GenesisState) {
gammGenState.Params.PoolCreationFee = tenOsmo
}

Expand Down
Loading