Skip to content

Commit

Permalink
add proto files
Browse files Browse the repository at this point in the history
  • Loading branch information
akremstudy committed Oct 17, 2023
1 parent f2e7597 commit a459e41
Show file tree
Hide file tree
Showing 7 changed files with 2,135 additions and 0 deletions.
46 changes: 46 additions & 0 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46437,6 +46437,42 @@ paths:
}
tags:
- Query
/tellor-io/layer/dispute/params:
get:
summary: Parameters queries the parameters of the module.
operationId: LayerDisputeParams
responses:
'200':
description: A successful response.
schema:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
description: >-
QueryParamsResponse is response type for the Query/Params RPC
method.
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
tags:
- Query
/layer/oracle/get_reportsby_qid/{qId}:
get:
summary: Queries a list of GetReportsbyQid items.
Expand Down Expand Up @@ -75482,6 +75518,16 @@ definitions:
description: |-
Version defines the versioning scheme used to negotiate the IBC verison in
the connection handshake.
layer.dispute.Params:
type: object
description: Params defines the parameters for the module.
layer.dispute.QueryParamsResponse:
type: object
properties:
params:
description: params holds all the parameters of this module.
type: object
description: QueryParamsResponse is response type for the Query/Params RPC method.
layer.oracle.MicroReport:
type: object
properties:
Expand Down
46 changes: 46 additions & 0 deletions proto/layer/dispute/dispute.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
syntax = "proto3";
package layer.dispute;

option go_package = "github.com/tellor-io/layer/x/dispute/types";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";
import "layer/dispute/payment_info.proto";

message Dispute {

bytes hashId = 1; // represents the hash of Report+category
uint64 disputeId = 2;
DisputeCategory category = 3;
uint64 disputeFee = 4;
uint64 startTime = 5;
uint64 endTime = 6;
uint64 block = 7;
DisputeStatus status = 8;
MicroReport report = 9;
repeated PaymentInfo feePayers = 10 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin feeTotal = 11 [(gogoproto.nullable) = false];
uint64 round = 12;
repeated uint64 prevDisputeIds = 13;
}

enum DisputeCategory {
INVALID = 0;
WARNING = 1;
MINOR = 2;
MAJOR = 3;
}

enum DisputeStatus {
PREVOTE = 0; // CURRENTLY IN WAITING PERIOD
VOTING = 1; // VOTING IN PROGRESS
RESOLVED = 2; // VOTING CONCLUDED AND QUORUM REACHED
UNRESOLVED = 3; // VOTING FAILED TO REACH QUORUM
FAILED = 4; // FEES NOT MET TO BEGIN VOTING
}

message MicroReport {
string reporter = 1;
string qid = 2;
string value = 3;
uint64 timestamp = 4;
}
12 changes: 12 additions & 0 deletions proto/layer/dispute/dispute_params.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto3";
package layer.dispute;

option go_package = "github.com/tellor-io/layer/x/dispute/types";
import "gogoproto/gogo.proto";
import "layer/dispute/dispute.proto";

message DisputeParams {

MicroReport report = 1 [(gogoproto.nullable) = false];
DisputeCategory category = 2;
}
12 changes: 12 additions & 0 deletions proto/layer/dispute/payment_info.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto3";
package layer.dispute;

option go_package = "github.com/tellor-io/layer/x/dispute/types";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

message PaymentInfo {

bytes disputer = 1; //sdk.AccAddress type
cosmos.base.v1beta1.Coin amount = 2 [(gogoproto.nullable) = false];
}
Loading

0 comments on commit a459e41

Please sign in to comment.