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

Assign ID for poolDenom #456

Merged
merged 16 commits into from
Sep 18, 2023
16 changes: 10 additions & 6 deletions proto/duality/dex/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
syntax = "proto3";

package duality.dex;

import "gogoproto/gogo.proto";
import "duality/dex/params.proto";
import "duality/dex/limit_order_tranche_user.proto";
import "duality/dex/limit_order_tranche.proto";
import "duality/dex/tick_liquidity.proto";
import "duality/dex/pool_metadata.proto";

// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/duality-labs/duality/x/dex/types";

// GenesisState defines the dex module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated TickLiquidity tickLiquidityList = 2 [(gogoproto.nullable) = true];
repeated LimitOrderTranche inactiveLimitOrderTrancheList = 6 [(gogoproto.nullable) = true];
repeated LimitOrderTrancheUser limitOrderTrancheUserList = 7 [(gogoproto.nullable) = true];


Params params = 1 [(gogoproto.nullable) = false];
repeated TickLiquidity tickLiquidityList = 2 [(gogoproto.nullable) = true ];
repeated LimitOrderTranche inactiveLimitOrderTrancheList = 3 [(gogoproto.nullable) = true ];
repeated LimitOrderTrancheUser limitOrderTrancheUserList = 4 [(gogoproto.nullable) = true ];
repeated PoolMetadata poolMetadataList = 5 [(gogoproto.nullable) = false];
uint64 poolCount = 6;
// this line is used by starport scaffolding # genesis/proto/state
}

9 changes: 6 additions & 3 deletions proto/duality/dex/pool.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ option go_package = "github.com/duality-labs/duality/x/dex/types";
import "gogoproto/gogo.proto";
import "duality/dex/pool_reserves.proto";

// NOTE: This struct is never actually stored in the KV store. It is merely a convenience wrapper for holding both sides of a pool.

message Pool {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment that this is not stored in DB

PoolReserves lower_tick0 = 1;
PoolReserves upper_tick1 = 2;
}
uint64 ID = 1;
PoolReserves lower_tick0 = 2;
PoolReserves upper_tick1 = 3;
}
13 changes: 13 additions & 0 deletions proto/duality/dex/pool_metadata.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
syntax = "proto3";
package duality.dex;

option go_package = "github.com/duality-labs/duality/x/dex/types";

import "duality/dex/pair_id.proto";

message PoolMetadata {
uint64 ID = 1;
int64 tick = 2;
uint64 fee = 3;
PairID pairID = 4;
}
Loading