-
Notifications
You must be signed in to change notification settings - Fork 608
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
Gamm Spec Out V3 - Modulize File Structure #541
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
46620fb
Change proto Pool -> BalancerPool
mattverse a720994
Proto changes implementation
mattverse 0a4b0f5
Change proto
mattverse d804fc6
Revert Pool Query from BalancerPool
mattverse ec54a65
Change method names accordingly
mattverse 3e876f1
Adjust marshal.go to struct change
mattverse c7620c0
Fix test
mattverse ce85d2f
Revert Pool Params, remove Exitfee, Swapfee query
mattverse 81f6b74
Merge branch 'mattverse/gamm-spec-out' into mattverse/gamm-spec-out-v2
mattverse 6531615
Remove unused Yaml from gamm query import
mattverse c2759a6
Add Pool Params Query
mattverse 389e8ca
Merge branch 'mattverse/gamm-spec-out' into mattverse/gamm-spec-out-v2
mattverse b188e17
Revert yaml import
mattverse 0c51405
Revert marshal back to poolParams
mattverse 9efed1a
WIP: move balancerPool.proto into pool-models folder
mattverse bfa6735
WIP: moving balancer_pool.go logic from types -> pool-models
mattverse a62b2e3
WIP: Change in file structure
mattverse 58f4870
WIP: Changing packages
mattverse e6bcb00
Use types from balancer package
mattverse 9a29cd6
Revert go mod back to original state
mattverse 229bd59
Register Codec
mattverse 35e5a06
WIP: Fixing CLI test
mattverse 747813a
Fix proto Any field to Balancer specific
mattverse 3d04a93
Remove BalancerPoolParamsI
mattverse 8ec9a8d
Add switch cases to poolParams Query, clean up code
mattverse 8ffe3e8
WIP Merging main
mattverse efdb376
Merge branch 'main' into mattverse/gamm-spec-out-v3
mattverse 26981f9
Merge branch 'main' into mattverse/gamm-spec-out-v3.1
mattverse 209ddd6
Fix type from proto
mattverse 60b84e2
Cleanup code for test codes
mattverse eccdfee
Cleanup code for merge
mattverse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
syntax = "proto3"; | ||
package osmosis.gamm.poolmodels; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "osmosis/gamm/pool-models/balancer/balancerPool.proto"; | ||
import "osmosis/gamm/v1beta1/pool.proto"; | ||
|
||
option go_package = "github.com/osmosis-labs/osmosis/x/gamm/pool-models/balancer"; | ||
|
||
service Msg { | ||
rpc CreateBalancerPool(MsgCreateBalancerPool) | ||
returns (MsgCreateBalancerPoolResponse); | ||
} | ||
|
||
// ===================== MsgCreatePool | ||
message MsgCreateBalancerPool { | ||
string sender = 1 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; | ||
|
||
BalancerPoolParams poolParams = 2 | ||
[ (gogoproto.moretags) = "yaml:\"pool_params\"" ]; | ||
|
||
repeated osmosis.gamm.v1beta1.PoolAsset poolAssets = 3 | ||
[ (gogoproto.nullable) = false ]; | ||
|
||
string future_pool_governor = 4 | ||
[ (gogoproto.moretags) = "yaml:\"future_pool_governor\"" ]; | ||
} | ||
|
||
message MsgCreateBalancerPoolResponse {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
syntax = "proto3"; | ||
package osmosis.gamm.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
|
||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "github.com/osmosis-labs/osmosis/x/gamm/types"; | ||
|
||
message PoolAsset { | ||
// Coins we are talking about, | ||
// the denomination must be unique amongst all PoolAssets for this pool. | ||
cosmos.base.v1beta1.Coin token = 1 | ||
[ (gogoproto.moretags) = "yaml:\"token\"", (gogoproto.nullable) = false ]; | ||
// Weight that is not normalized. This weight must be less than 2^50 | ||
string weight = 2 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", | ||
(gogoproto.moretags) = "yaml:\"weight\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
mattverse marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// Weight that is normalized s.t. the sum of all pool assets' weights | ||
// equals 1. If the user provides this value, it is ignored. This should only | ||
// ever be set by the state machine. This is left as a TODO for a future PR. | ||
// string normalizedWeight = 3 [ | ||
// (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
// (gogoproto.moretags) = "yaml:\"normalized_weight\"", | ||
// (gogoproto.nullable) = true | ||
// ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should this still be behind a v1beta1?
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.
Are you referring to the entire file itself? If my understanding is right upon your question, pool-models is declared as a whole new package in gamm, thats where this is coming from.
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.
I see, tbh I don't really understand the v1beta1 stuff. Lets make an issue for this question, and then ask regen folks post-holidays
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.
haha. I'm supposing its just a legacy in structuring the proto files from the cosmos-sdk and that it does not have any additional functionallities. I didn't have any issues when I wasn't using v1beta1 as a package file structure, they should be good to be removed as well