-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rebuild generated protobuf encoders/decoders
- Loading branch information
1 parent
0056718
commit 61ccf48
Showing
41 changed files
with
4,405 additions
and
496 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 |
---|---|---|
|
@@ -14,6 +14,7 @@ enum AdminType { | |
TOKENREGISTRY = 2; | ||
ETHBRIDGE = 3; | ||
ADMIN = 4; | ||
MARGIN = 5; | ||
} | ||
|
||
message AdminAccount { | ||
|
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,12 @@ | ||
# pool.proto | ||
|
||
The Feature Toggle `FEATURE_TOGGLE_MARGIN_CLI_ALPHA` as described in `docs/general/FeatureToggles.md`, introduces additional fields to the `Pool` message that should not be exposed to the mainline. | ||
|
||
To avoid having those fields exposed in the mainline code, we generated two versions of the `pool.pb.go` file: | ||
|
||
- `pool_FEATURE_TOGGLE_MARGIN_CLI_ALPHA.pb.go`: generated protobuf code that contains the `FEATURE_TOGGLE_MARGIN_CLI_ALPHA` additional fields of the Pool message | ||
- `pool_NO_FEATURE_TOGGLE_MARGIN_CLI_ALPHA.pb.go`: generated protobuf code that contains the original Pool message without the additional fields from `FEATURE_TOGGLE_MARGIN_CLI_ALPHA` | ||
|
||
Whenever the protobuf files need to be re-generated, we should make sure to include the relevant changes of the Pool message generated codes to one of those files. | ||
|
||
Also please make sure that the `pool.pb.go` file is not added and commited to the repository. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
syntax = "proto3"; | ||
package sifnode.clp.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "sifnode/clp/v1/types.proto"; | ||
|
||
option go_package = "github.com/Sifchain/sifnode/x/clp/types"; | ||
|
||
message Pool { | ||
Asset external_asset = 1; | ||
string native_asset_balance = 2 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"native_asset_balance\"" | ||
]; | ||
string external_asset_balance = 3 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"external_asset_balance\"" | ||
]; | ||
string pool_units = 4 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"pool_units\"" | ||
]; | ||
string swap_price_native = 5 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.moretags) = "yaml:\"swap_price_native \"" | ||
]; | ||
string swap_price_external = 6 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.moretags) = "yaml:\"swap_price_external \"" | ||
]; | ||
string reward_period_native_distributed = 7 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false, | ||
(gogoproto.moretags) = "yaml:\"reward_period_native_distributed\"" | ||
]; | ||
string external_liabilities = 8 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false | ||
]; | ||
string external_custody = 9 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false | ||
]; | ||
string native_liabilities = 10 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false | ||
]; | ||
string native_custody = 11 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Uint", | ||
(gogoproto.nullable) = false | ||
]; | ||
string health = 12 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.nullable) = false | ||
]; | ||
string interest_rate = 13 [ | ||
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", | ||
(gogoproto.nullable) = false | ||
]; | ||
int64 last_height_interest_rate_computed = 14; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
syntax = "proto3"; | ||
package sifnode.margin.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "cosmos/base/query/v1beta1/pagination.proto"; | ||
import "sifnode/margin/v1/types.proto"; | ||
|
||
option go_package = "github.com/Sifchain/sifnode/x/margin/types"; | ||
|
||
service Query { | ||
rpc GetMTP(MTPRequest) returns (MTPResponse) {} | ||
rpc GetPositions(PositionsRequest) returns (PositionsResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/positions/{pagination.key}"; | ||
} | ||
rpc GetPositionsForAddress(PositionsForAddressRequest) | ||
returns (PositionsForAddressResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/mtps-for-address/{address}/{pagination.key}"; | ||
} | ||
rpc GetPositionsByPool(PositionsByPoolRequest) returns (PositionsByPoolResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/mtps-by-pool/{asset}/{pagination.key}"; | ||
} | ||
rpc GetParams(ParamsRequest) returns (ParamsResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/params"; | ||
} | ||
rpc GetStatus(StatusRequest) returns (StatusResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/status"; | ||
} | ||
rpc GetSQParams(GetSQParamsRequest) returns (GetSQParamsResponse) {} | ||
rpc GetWhitelist(WhitelistRequest) returns (WhitelistResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/whitelist"; | ||
} | ||
rpc IsWhitelisted(IsWhitelistedRequest) returns (IsWhitelistedResponse) { | ||
option (google.api.http).get = "/sifchain/margin/v1/is-whitelisted"; | ||
} | ||
} | ||
|
||
message MTPRequest { | ||
string address = 1; | ||
uint64 id = 2; | ||
} | ||
|
||
message MTPResponse { MTP mtp = 1; } | ||
|
||
message PositionsForAddressRequest { | ||
string address = 1; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} | ||
|
||
message PositionsForAddressResponse { | ||
repeated MTP mtps = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message PositionsByPoolRequest { | ||
string asset = 1; | ||
cosmos.base.query.v1beta1.PageRequest pagination = 2; | ||
} | ||
|
||
message PositionsByPoolResponse { | ||
repeated MTP mtps = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message PositionsRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
message PositionsResponse { | ||
repeated MTP mtps = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message ParamsRequest {} | ||
|
||
message ParamsResponse { | ||
Params params = 1; | ||
} | ||
|
||
message StatusRequest { | ||
|
||
} | ||
|
||
message StatusResponse { | ||
uint64 open_mtp_count = 1; | ||
uint64 lifetime_mtp_count = 2; | ||
} | ||
|
||
message WhitelistRequest { | ||
cosmos.base.query.v1beta1.PageRequest pagination = 1; | ||
} | ||
|
||
message WhitelistResponse { | ||
repeated string whitelist = 1; | ||
cosmos.base.query.v1beta1.PageResponse pagination = 2; | ||
} | ||
|
||
message GetSQParamsRequest { | ||
string pool = 1; | ||
} | ||
|
||
message GetSQParamsResponse { | ||
int64 begin_block = 1; | ||
} | ||
|
||
message IsWhitelistedRequest { | ||
string address = 1; | ||
} | ||
|
||
message IsWhitelistedResponse { | ||
string address = 1; | ||
bool is_whitelisted = 2; | ||
} |
Oops, something went wrong.