Skip to content

Commit

Permalink
buf lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Jan 24, 2025
1 parent 084d1c9 commit c1f1cc3
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 5 deletions.
1 change: 1 addition & 0 deletions proto/ojo/oracle/v1/abci.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ message InjectedVoteExtensionTx {
bytes extended_commit_info = 3;
}

// Elys Asset Amount Depth
message AssetAmountDepth {
string asset = 1;
string amount = 2 [
Expand Down
7 changes: 6 additions & 1 deletion proto/ojo/oracle/v1/elys.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ option go_package = "github.com/ojo-network/ojo/x/oracle/types";

option (gogoproto.goproto_getters_all) = false;

// Elys AssetInfo
message AssetInfo {
string denom = 1;
string display = 2;
Expand All @@ -17,6 +18,7 @@ message AssetInfo {
uint64 decimal = 5;
}

// Elys Price
message Price {
string asset = 1;
string price = 2 [
Expand All @@ -30,17 +32,19 @@ message Price {
uint64 block_height = 6;
}


// Elys PriceFeeder
message PriceFeeder {
string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
bool is_active = 2;
}

// Elys Pool
message Pool {
uint64 pool_id = 1;
repeated PoolAsset pool_assets = 2 [ (gogoproto.nullable) = false ];
}

// Elys PoolAsset
message PoolAsset {
cosmos.base.v1beta1.Coin token = 1 [ (gogoproto.nullable) = false ];
string weight = 2 [
Expand All @@ -55,6 +59,7 @@ message PoolAsset {
];
}

// Elys AccountedPool
message AccountedPool {
uint64 pool_id = 1;
repeated cosmos.base.v1beta1.Coin total_tokens = 2
Expand Down
4 changes: 4 additions & 0 deletions proto/ojo/oracle/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,22 @@ message QueryValidatorRewardSetResponse {
ValidatorRewardSet validators = 1 [(gogoproto.nullable) = false];
}

// QueryGetPriceRequest is the request type for the Query/GetPriceRequest RPC method.
message QueryGetPriceRequest {
string asset = 1;
string source = 2;
uint64 timestamp = 3;
}

// QueryGetPriceResponse is the response type for the Query/GetPriceRequest RPC method.
message QueryGetPriceResponse {
Price price = 1 [ (gogoproto.nullable) = false ];
}

// QueryAllPriceRequest is the request type for the Query/AllPriceRequest RPC method.
message QueryAllPriceRequest {}

// QueryAllPriceResponse is the response type for the Query/AllPriceRequest RPC method.
message QueryAllPriceResponse {
repeated Price price = 1 [ (gogoproto.nullable) = false ];
}
37 changes: 35 additions & 2 deletions proto/ojo/oracle/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ option (gogoproto.goproto_getters_all) = false;
// Msg defines the oracle Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;

// AggregateExchangeRatePrevote defines a method for submitting an aggregate
// exchange rate prevote.
rpc AggregateExchangeRatePrevote(MsgAggregateExchangeRatePrevote)
Expand All @@ -29,28 +29,35 @@ service Msg {
rpc DelegateFeedConsent(MsgDelegateFeedConsent)
returns (MsgDelegateFeedConsentResponse);

// FeedPrice defines a method for setting and elys price.
rpc FeedPrice(MsgFeedPrice)
returns (MsgFeedPriceResponse);

// FeedMultiplePrices defines a method for setting multiple elys prices.
rpc FeedMultiplePrices(MsgFeedMultiplePrices)
returns (MsgFeedMultiplePricesResponse);

// SetPriceFeeder defines a method for setting an elys price feeder.
rpc SetPriceFeeder(MsgSetPriceFeeder)
returns (MsgSetPriceFeederResponse);

// DeletePriceFeeder defines a method for deleting an elys price feeder.
rpc DeletePriceFeeder(MsgDeletePriceFeeder)
returns (MsgDeletePriceFeederResponse);

// proposals
// RemoveAssetInfo defines a method for removing an elys asset info.
rpc RemoveAssetInfo(MsgRemoveAssetInfo)
returns (MsgRemoveAssetInfoResponse);

// AddPriceFeeders defines a method for adding elys price feeders.
rpc AddPriceFeeders(MsgAddPriceFeeders)
returns (MsgAddPriceFeedersResponse);

// RemovePriceFeeders defines a method for removing elys price feeders.
rpc RemovePriceFeeders(MsgRemovePriceFeeders)
returns (MsgRemovePriceFeedersResponse);

// CreateAssetInfo defines a method for creating elys asset infos.
rpc CreateAssetInfo(MsgCreateAssetInfo)
returns (MsgCreateAssetInfoResponse);

Expand Down Expand Up @@ -133,6 +140,7 @@ message MsgDelegateFeedConsent {
// type.
message MsgDelegateFeedConsentResponse {}

// FeedPrice defines a feed price object for feeding an elys price.
message FeedPrice {
string asset = 1;
string price = 2 [
Expand All @@ -142,61 +150,84 @@ message FeedPrice {
];
string source = 3;
}

// MsgFeedPrice defines a message to feed an elys price.
message MsgFeedPrice {
option (cosmos.msg.v1.signer) = "provider";
string provider = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
FeedPrice feed_price = 2 [ (gogoproto.nullable) = false ];
}

// MsgFeedPriceResponse defines the Msg/FeedPrice response
// type.
message MsgFeedPriceResponse {}

// MsgSetPriceFeeder defines a message to set an elys price feeder.
message MsgSetPriceFeeder {
option (cosmos.msg.v1.signer) = "feeder";
string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
bool is_active = 2;
}

// MsgSetPriceFeederResponse defines the Msg/SetPriceFeederResponse response
// type.
message MsgSetPriceFeederResponse {}

// MsgDeletePriceFeeder defines a message to delete an elys price feeder.
message MsgDeletePriceFeeder {
option (cosmos.msg.v1.signer) = "feeder";
string feeder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
}

// MsgDeletePriceFeederResponse defines the Msg/DeleteFeederResponse response
// type.
message MsgDeletePriceFeederResponse {}

// MsgFeedMultiplePrices defines a message to feed multiple elys prices.
message MsgFeedMultiplePrices {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
repeated FeedPrice feed_prices = 2 [ (gogoproto.nullable) = false ];
}

// MsgFeedMultiplePricesResponse defines the Msg/FeedMultiplePrices response
// type.
message MsgFeedMultiplePricesResponse {}

// MsgRemoveAssetInfo represents a message to remove an elys asset info.
message MsgRemoveAssetInfo {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
string denom = 2;
}

// MsgRemoveAssetInfo defines the Msg/RemoveAssetInfo response
// type.
message MsgRemoveAssetInfoResponse {}

// MsgAddPriceFeeders represents a message to add elys price feeders.
message MsgAddPriceFeeders {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
repeated string feeders = 2;
}

// MsgAddPriceFeedersResponse defines the Msg/AddPriceFeeders response
// type.
message MsgAddPriceFeedersResponse {}

// MsgRemovePriceFeeders represents a message to remove elys price feeders.
message MsgRemovePriceFeeders {
option (cosmos.msg.v1.signer) = "authority";
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
repeated string feeders = 2;
}

// MsgRemovePriceFeedersResponse defines the Msg/RemovePriceFeeders response
// type.
message MsgRemovePriceFeedersResponse {}

// MsgCreateAssetInfo represents a message to create elys asset info.
message MsgCreateAssetInfo {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
Expand All @@ -207,6 +238,8 @@ message MsgCreateAssetInfo {
uint64 decimal = 6;
}

// MsgCreateAssetInfoResponse defines the Msg/CreateAssetInfo response
// type.
message MsgCreateAssetInfoResponse {}

// MsgLegacyGovUpdateParams defines the Msg/MsgLegacyGovUpdateParams request type.
Expand Down
1 change: 1 addition & 0 deletions x/oracle/types/abci.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions x/oracle/types/elys.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions x/oracle/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c1f1cc3

Please sign in to comment.