-
Notifications
You must be signed in to change notification settings - Fork 618
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(x/gamm): remove CreatePool and pool id index boilerplate in gamm (merge) #3739
Conversation
@@ -337,17 +350,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( | |||
) | |||
appKeepers.TokenFactoryKeeper = &tokenFactoryKeeper | |||
|
|||
appKeepers.SwapRouterKeeper = swaprouter.NewKeeper( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Moved up top to be consistent with CL main. It is also convenient for initializing pool incentives keeper close to a similar logic in gamm
@@ -109,12 +109,12 @@ func (q Querier) Pools( | |||
}, nil | |||
} | |||
|
|||
// NumPools returns total number of pools. | |||
// TODO: mark deprecated and move to swaprouter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: tracked in #3556
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Going to merge with 1 approval once CI passes. This has been QAed on |
Closes: #XXX
What is the purpose of the change
Currently, we update the pool id index in both
x/gamm
andx/swaprouter
. Since the goal is to fully migrate the index tox/swaproter
, we start to remove any references it the oldx/gamm
index.We still need to keep the state entry in
x/gamm
. However, every method, function or query, utilizing it can be refactored to either swithc to queryingx/swaprouter
index or be removed entirely.Brief Changelog
As a result, of sunsetting the index in
x/gamm
, the folllowing changes have been made:CreatePool
method fromx/gamm
. Its callers instead useCreatePool
inx/swaprouter
.GetNextPoolIdAndIncrement
function inx/gamm
since the updates to the index should not happen anymoreTesting and Verifying
This change is already covered by existing tests
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no