-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gamm Spec Out V3 - Modulize File Structure (#541)
* Change proto Pool -> BalancerPool * Proto changes implementation * Change proto * Revert Pool Query from BalancerPool * Change method names accordingly * Adjust marshal.go to struct change * Fix test * Revert Pool Params, remove Exitfee, Swapfee query * Remove unused Yaml from gamm query import * Add Pool Params Query * Revert yaml import * Revert marshal back to poolParams * WIP: move balancerPool.proto into pool-models folder * WIP: moving balancer_pool.go logic from types -> pool-models * WIP: Change in file structure * WIP: Changing packages * Use types from balancer package * Revert go mod back to original state * Register Codec * WIP: Fixing CLI test * Fix proto Any field to Balancer specific * Remove BalancerPoolParamsI * Add switch cases to poolParams Query, clean up code * Merge branch 'main' into mattverse/gamm-spec-out-v3 * Fix type from proto * Cleanup code for test codes * Cleanup code for merge
- Loading branch information
Showing
41 changed files
with
2,752 additions
and
2,381 deletions.
There are no files selected for viewing
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 | ||
]; | ||
|
||
// 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.