Skip to content

Commit

Permalink
implement shared proto file
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jun 21, 2023
1 parent 42a2e17 commit e70ac41
Show file tree
Hide file tree
Showing 10 changed files with 1,276 additions and 949 deletions.
20 changes: 1 addition & 19 deletions proto/osmosis/gamm/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";
import "osmosis/gamm/v1beta1/shared.proto";

// Params holds parameters for the incentives module
message Params {
Expand All @@ -26,22 +27,3 @@ message GenesisState {
Params params = 3 [ (gogoproto.nullable) = false ];
MigrationRecords migration_records = 4;
}

// MigrationRecords contains all the links between balancer and concentrated
// pools
message MigrationRecords {
repeated BalancerToConcentratedPoolLink balancer_to_concentrated_pool_links =
1 [ (gogoproto.nullable) = false ];
}

// BalancerToConcentratedPoolLink defines a single link between a single
// balancer pool and a single concentrated liquidity pool. This link is used to
// allow a balancer pool to migrate to a single canonical full range
// concentrated liquidity pool position
// A balancer pool can be linked to a maximum of one cl pool, and a cl pool can
// be linked to a maximum of one balancer pool.
message BalancerToConcentratedPoolLink {
option (gogoproto.equal) = true;
uint64 balancer_pool_id = 1;
uint64 cl_pool_id = 2;
}
1 change: 1 addition & 0 deletions proto/osmosis/gamm/v1beta1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package osmosis.gamm.v1beta1;

import "gogoproto/gogo.proto";
import "osmosis/gamm/v1beta1/genesis.proto";
import "osmosis/gamm/v1beta1/shared.proto";
import "cosmos_proto/cosmos.proto";
import "amino/amino.proto";

Expand Down
28 changes: 28 additions & 0 deletions proto/osmosis/gamm/v1beta1/shared.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
syntax = "proto3";
package osmosis.gamm.v1beta1;

import "gogoproto/gogo.proto";
import "google/protobuf/any.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/base/v1beta1/coin.proto";

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

// MigrationRecords contains all the links between balancer and concentrated
// pools
message MigrationRecords {
repeated BalancerToConcentratedPoolLink balancer_to_concentrated_pool_links =
1 [ (gogoproto.nullable) = false ];
}

// BalancerToConcentratedPoolLink defines a single link between a single
// balancer pool and a single concentrated liquidity pool. This link is used to
// allow a balancer pool to migrate to a single canonical full range
// concentrated liquidity pool position
// A balancer pool can be linked to a maximum of one cl pool, and a cl pool can
// be linked to a maximum of one balancer pool.
message BalancerToConcentratedPoolLink {
option (gogoproto.equal) = true;
uint64 balancer_pool_id = 1;
uint64 cl_pool_id = 2;
}
25 changes: 0 additions & 25 deletions proto/osmosis/pool-incentives/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,3 @@ message GenesisState {
(gogoproto.moretags) = "yaml:\"pool_to_gauges\""
];
}

// MigrationRecords contains all the links between balancer and concentrated
// pools.
//
// This is copied over from the gamm proto file in order to circumnavigate
// the circular dependency between the two modules.
message MigrationRecords {
repeated BalancerToConcentratedPoolLink balancer_to_concentrated_pool_links =
1 [ (gogoproto.nullable) = false ];
}

// BalancerToConcentratedPoolLink defines a single link between a single
// balancer pool and a single concentrated liquidity pool. This link is used to
// allow a balancer pool to migrate to a single canonical full range
// concentrated liquidity pool position
// A balancer pool can be linked to a maximum of one cl pool, and a cl pool can
// be linked to a maximum of one balancer pool.
//
// This is copied over from the gamm proto file in order to circumnavigate
// the circular dependency between the two modules.
message BalancerToConcentratedPoolLink {
option (gogoproto.equal) = true;
uint64 balancer_pool_id = 1;
uint64 cl_pool_id = 2;
}
33 changes: 33 additions & 0 deletions proto/osmosis/pool-incentives/v1beta1/shared.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";
package osmosis.poolincentives.v1beta1;

import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "osmosis/pool-incentives/v1beta1/incentives.proto";

option go_package = "github.com/osmosis-labs/osmosis/v16/x/pool-incentives/types";

// MigrationRecords contains all the links between balancer and concentrated
// pools.
//
// This is copied over from the gamm proto file in order to circumnavigate
// the circular dependency between the two modules.
message MigrationRecords {
repeated BalancerToConcentratedPoolLink balancer_to_concentrated_pool_links =
1 [ (gogoproto.nullable) = false ];
}

// BalancerToConcentratedPoolLink defines a single link between a single
// balancer pool and a single concentrated liquidity pool. This link is used to
// allow a balancer pool to migrate to a single canonical full range
// concentrated liquidity pool position
// A balancer pool can be linked to a maximum of one cl pool, and a cl pool can
// be linked to a maximum of one balancer pool.
//
// This is copied over from the gamm proto file in order to circumnavigate
// the circular dependency between the two modules.
message BalancerToConcentratedPoolLink {
option (gogoproto.equal) = true;
uint64 balancer_pool_id = 1;
uint64 cl_pool_id = 2;
}
Loading

0 comments on commit e70ac41

Please sign in to comment.